Changeset 22699 for trunk/psModules/src/concepts/pmConcepts.h
- Timestamp:
- Feb 26, 2009, 2:45:31 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConcepts.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConcepts.h
r22688 r22699 37 37 38 38 /// Function to call to parse a concept once it has been read 39 typedef psMetadataItem* (*pmConceptParseFunc)(const psMetadataItem *concept, ///< Concept to parse 40 const psMetadataItem *pattern, ///< Pattern for parsing 41 pmConceptSource source, ///< Source of concept 42 const psMetadata *cameraFormat, ///< Camera format definition 43 const pmFPA *fpa, ///< FPA for concept, or NULL 44 const pmChip *chip, ///< Chip for concept, or NULL 45 const pmCell *cell ///< Cell for concept, or NULL 46 ); 39 typedef psMetadataItem* (*pmConceptParseFunc)( 40 const psMetadataItem *concept, ///< Concept to parse 41 const psMetadataItem *pattern, ///< Pattern for parsing 42 pmConceptSource source, ///< Source of concept 43 const psMetadata *cameraFormat, ///< Camera format definition 44 const pmFPA *fpa, ///< FPA for concept, or NULL 45 const pmChip *chip, ///< Chip for concept, or NULL 46 const pmCell *cell ///< Cell for concept, or NULL 47 ); 47 48 48 49 /// Function to call to format a concept for writing 49 typedef psMetadataItem* (*pmConceptFormatFunc)(const psMetadataItem *concept, ///< Concept to format 50 pmConceptSource source, ///< Source of concept 51 const psMetadata *cameraFormat, ///< Camera format definition 52 const pmFPA *fpa, ///< FPA for concept, or NULL 53 const pmChip *chip, ///< Chip for concept, or NULL 54 const pmCell *cell ///< Cell for concept, or NULL 55 ); 50 typedef psMetadataItem* (*pmConceptFormatFunc)( 51 const psMetadataItem *concept, ///< Concept to format 52 pmConceptSource source, ///< Source of concept 53 const psMetadata *cameraFormat, ///< Camera format definition 54 const pmFPA *fpa, ///< FPA for concept, or NULL 55 const pmChip *chip, ///< Chip for concept, or NULL 56 const pmCell *cell ///< Cell for concept, or NULL 57 ); 58 59 /// Function to call to copy a concept 60 typedef psMetadataItem* (*pmConceptCopyFunc)( 61 const psMetadataItem *target, ///< Target concept 62 const psMetadataItem *source, ///< Source concept 63 const psMetadata *cameraFormat, ///< Camera format definition 64 const pmFPA *fpa, ///< Source FPA for concept, or NULL 65 const pmChip *chip, ///< Source chip for concept, or NULL 66 const pmCell *cell ///< Source cell for concept, or NULL 67 ); 68 56 69 57 70 /// A "concept" specification … … 59 72 /// Defines the name, default comment, blank value, and functions to parse (after reading) and format (before 60 73 /// writing) the concept. 61 typedef struct 62 { 74 typedef struct { 63 75 psMetadataItem *blank; ///< Blank value of concept; also contains the name and comment 64 pmConceptParseFunc parse; ///< Function to call to read the concept 65 pmConceptFormatFunc format; ///< Function to call to write the concept 76 pmConceptParseFunc parse; ///< Function to call to read the concept, or NULL 77 pmConceptFormatFunc format; ///< Function to call to write the concept, or NULL 78 pmConceptCopyFunc copy; ///< Function to call to copy the concept, or NULL 66 79 bool required; ///< Is concept required (throw an error on problems)? 67 80 } … … 70 83 /// Allocator for pmConceptSpec 71 84 pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, ///< Blank value; contains the name 72 pmConceptParseFunc parse, ///< Function to call to parse the concept 73 pmConceptFormatFunc format, ///< Function to call to format the concept 85 pmConceptParseFunc parse, ///< Function to call to parse the concept/NULL 86 pmConceptFormatFunc format, ///< Function to call to format the concept/NULL 87 pmConceptCopyFunc copy, ///< Function to call to copy the concept, or NULL 74 88 bool required ///< Is concept required? 75 89 ); … … 95 109 pmConceptParseFunc parse, ///< Function to call to parse the concept, or NULL 96 110 pmConceptFormatFunc format, ///< Function to call to format the concept, or NULL 111 pmConceptCopyFunc copy, ///< Function to call to copy the concept, or NULL 97 112 bool required, ///< Is concept required? 98 113 pmFPALevel level ///< Level at which to store concept in the FPA hierarchy 99 114 ); 100 115 101 /// Get a list of defined concepts for a particular level.102 ps List *pmConceptsList(pmFPALevel level);116 /// Get the specifications for defined concepts of a particular level 117 psMetadata *pmConceptsSpecs(pmFPALevel level); 103 118 104 /// Read the concepts for the given set of fpa, chip, cell105 ///106 /// Attempts to read as many concepts as possible from the specified source for the specified FPA, chip and107 /// cell. That is, it will read chip- and cell-level concepts in addition to fpa-level concepts, if the chip108 /// and cell are provided.109 bool pmConceptsRead(pmFPA *fpa, ///< FPA for which to read concepts110 pmChip *chip, ///< Chip for which to read concepts, or NULL111 pmCell *cell, ///< Cell for which to read concepts, or NULL112 pmConceptSource source, ///< The source of the concepts to read113 pmConfig *config ///< Configuration114 );115 119 116 120 /// Set the concepts within the FPA to the blank value 117 121 bool pmConceptsBlankFPA(pmFPA *fpa ///< FPA for which to set blank concepts 118 );119 120 /// Read concepts for an FPA; optionally, read concepts at all lower levels.121 ///122 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the123 /// concepts from the specified source. It also allows concepts to be read at lower levels by iterating over124 /// the components.125 bool pmConceptsReadFPA(pmFPA *fpa, ///< FPA for which to read concepts126 pmConceptSource source, ///< Source for concepts127 bool propagateDown, ///< Propagate to lower levels?128 pmConfig *config ///< Configuration129 );130 131 /// Write concepts for an FPA; optionally, write concepts at all lower levels.132 ///133 /// This function writes all concepts for the FPA to the specified "source". It also allows concepts to be134 /// written for all lower levels by iterating over the components.135 bool pmConceptsWriteFPA(const pmFPA *fpa, ///< FPA for which to write concepts136 pmConceptSource source, ///< Source for concepts137 bool propagateDown, ///< Propagate to lower levels?138 pmConfig *config ///< Configuration139 122 ); 140 123 … … 143 126 ); 144 127 145 /// Read concepts for a chip; optionally, read concepts at the FPA and cell levels.146 ///147 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the148 /// concepts from the specified source. It also allows concepts to be read at the fpa level (through the149 /// parent), and the cell level by iterating over the components.150 bool pmConceptsReadChip(pmChip *chip, ///< Chip for which to read concepts151 pmConceptSource source, ///< Source for concepts152 bool propagateUp, ///< Propagate to higher levels?153 bool propagateDown, ///< Propagate to lower levels?154 pmConfig *config ///< Configuration155 );156 157 /// Write concepts for a chip; optionally, write concepts at the FPA and cell levels.158 ///159 /// This function writes all concepts for the chip to the specified "source". It also allows concepts to be160 /// written for the FPA, and the cell level by iterating over the components.161 bool pmConceptsWriteChip(const pmChip *chip, ///< Chip for which to write concepts162 pmConceptSource source, ///< Source for concepts163 bool propagateUp,///< Propagate to higher levels?164 bool propagateDown, ///< Propagate to lower levels?165 pmConfig *config ///< Configuration166 );167 168 128 /// Set the concepts within the cell to the blank value 169 129 bool pmConceptsBlankCell(pmCell *cell ///< Cell for which to set blank concepts 170 );171 172 /// Read concepts for a cell; optionally, read concepts for the parents.173 ///174 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the175 /// concepts from the specified source. It also allows concepts to be read at upper levels through the176 /// parents (note, it would not read concepts for all chips, but only the parent of this cell).177 bool pmConceptsReadCell(pmCell *cell, ///< Cell for which to read concepts178 pmConceptSource source, ///< Source for concepts179 bool propagateUp, ///< Propagate to higher levels?180 pmConfig *config ///< Configuration181 );182 183 /// Write concepts for a cell; optionally, write concepts for the parents.184 ///185 /// This function writes all concepts for the chip to the specified "source". It also allows concepts to be186 /// written for the upper levels through the parents (note, it would not write concepts for all chips, but187 /// only the parent of this cell).188 bool pmConceptsWriteCell(const pmCell *cell, ///< FPA for which to write concepts189 pmConceptSource source, ///< Source for concepts190 bool propagateUp, ///< Propagate to higher levels?191 pmConfig *config ///< Configuration192 130 ); 193 131 … … 202 140 /// Frees the registered concepts so there is no memory leak when the user checks "persistent" memory. 203 141 void pmConceptsDone(void); 204 205 /// Copy all the concepts within an FPA to another FPA206 ///207 /// Iterates over all components of the FPA, and copies the concepts metadata from the source to the target.208 bool pmFPACopyConcepts(pmFPA *target, ///< The target FPA209 const pmFPA *source ///< The source FPA210 );211 212 /// Copy the concepts within an FPA to another FPA; optionally recurse to lower levels213 bool pmConceptsCopyFPA(pmFPA *target, ///< Target FPA214 const pmFPA *source, ///< Source FPA215 bool chips, ///< Recurse to chips level?216 bool cells ///< Recurse to cells level?217 );218 219 /// Copy the concepts within a chip to another chip; optionally recurse to lower level220 bool pmConceptsCopyChip(pmChip *target, ///< Target chip221 const pmChip *source, ///< Source chip222 bool cells ///< Recurse to cells level?223 );224 225 /// Copy the concepts within a cell to another cell226 bool pmConceptsCopyCell(pmCell *target, ///< Target cell227 const pmCell *source ///< Source cell228 );229 142 230 143 /// Interpolate a concept name to the actual value
Note:
See TracChangeset
for help on using the changeset viewer.
