IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 4:35:39 PM (20 years ago)
Author:
Paul Price
Message:

Adding const where appropriate. Adding doxygen documentation to header files. Removing comments on functions defined in the header file, so that there's only a single source.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConcepts.c

    r9570 r9572  
    2525}
    2626
    27 pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, // Blank value; contains the name
    28                                   pmConceptParseFunc parse, // Function to call to parse the concept
    29                                   pmConceptFormatFunc format // Function to call to format the concept
    30                                  )
     27pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, pmConceptParseFunc parse,
     28                                  pmConceptFormatFunc format)
    3129{
    3230    pmConceptSpec *spec = psAlloc(sizeof(pmConceptSpec));
     
    4139
    4240
    43 bool pmConceptRegister(psMetadataItem *blank, // Blank value; contains the name
    44                        pmConceptParseFunc parse, // Function to call to parse the concept
    45                        pmConceptFormatFunc format, // Function to call to format the concept
    46                        pmFPALevel level // Level at which to store concept in the FPA hierarchy
    47                       )
     41bool pmConceptRegister(psMetadataItem *blank, pmConceptParseFunc parse,
     42                       pmConceptFormatFunc format, pmFPALevel level)
    4843{
    4944    PS_ASSERT_PTR_NON_NULL(blank, false);
     
    185180// Write all registered concepts for the specified level
    186181static bool conceptsWrite(psMetadata **specs, // One of the concepts specifications
    187                           pmFPA *fpa,   // The FPA
    188                           pmChip *chip, // The chip
    189                           pmCell *cell, // The cell
     182                          const pmFPA *fpa,   // The FPA
     183                          const pmChip *chip, // The chip
     184                          const pmCell *cell, // The cell
    190185                          pmConceptSource source, // The source of the concepts to write
    191186                          psDB *db,      // Database handle
    192                           psMetadata *concepts // The concepts to write out
     187                          const psMetadata *concepts // The concepts to write out
    193188                         )
    194189{
     
    218213}
    219214
    220 // Set the concepts for a given FPA to blanks
    221 bool pmConceptsBlankFPA(pmFPA *fpa    // FPA for which to set blank concepts
    222                        )
    223 {
    224     PS_ASSERT_PTR_NON_NULL(fpa, false);
    225     psTrace("psModules.concepts", 5, "Blanking FPA concepts: %p %p\n", conceptsFPA, fpa->concepts);
    226     return conceptsBlank(&conceptsFPA, fpa->concepts);
    227 }
    228 
    229 // Read the concepts for the given set of fpa, chip, cell
    230 bool pmConceptsRead(pmFPA *fpa,         // FPA for which to read concepts
    231                     pmChip *chip,       // Chip for which to read concepts, or NULL
    232                     pmCell *cell,       // Cell for which to read concepts, or NULL
    233                     pmConceptSource source, // The source of the concepts to read
    234                     psDB *db            // Database handle
    235                    )
     215
     216bool pmConceptsRead(pmFPA *fpa, pmChip *chip, pmCell *cell, pmConceptSource source, psDB *db)
    236217{
    237218    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    248229
    249230
    250 // Read the concepts for a given FPA
    251 bool pmConceptsReadFPA(pmFPA *fpa,      // FPA for which to read concepts
    252                        pmConceptSource source, // The source of the concepts to read
    253                        bool propagateDown, // Propagate to lower levels?
    254                        psDB *db        // Database handle
    255                       )
     231bool pmConceptsBlankFPA(pmFPA *fpa)
     232{
     233    PS_ASSERT_PTR_NON_NULL(fpa, false);
     234    psTrace("psModules.concepts", 5, "Blanking FPA concepts: %p %p\n", conceptsFPA, fpa->concepts);
     235    return conceptsBlank(&conceptsFPA, fpa->concepts);
     236}
     237
     238
     239bool pmConceptsReadFPA(pmFPA *fpa, pmConceptSource source, bool propagateDown, psDB *db)
    256240{
    257241    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    271255}
    272256
    273 // Read the concepts for a given FPA
    274 bool pmConceptsWriteFPA(pmFPA *fpa,     // FPA for which to write concepts
    275                         pmConceptSource source, // The source of the concepts to read
    276                         bool propagateDown, // Propagate to lower levels?
    277                         psDB *db        // Database handle
    278                        )
     257bool pmConceptsWriteFPA(const pmFPA *fpa, pmConceptSource source, bool propagateDown, psDB *db)
    279258{
    280259    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    293272}
    294273
    295 // Set the concepts for a given chip to blanks
    296 bool pmConceptsBlankChip(pmChip *chip // FPA for which to set blank concepts
    297                         )
     274bool pmConceptsBlankChip(pmChip *chip)
    298275{
    299276    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    302279}
    303280
    304 // Read the concepts for a given FPA
    305 bool pmConceptsReadChip(pmChip *chip,   // Chip for which to read concepts
    306                         pmConceptSource source, // The source of the concepts to read
    307                         bool propagateUp, // Propagate to higher levels?
    308                         bool propagateDown, // Propagate to lower levels?
    309                         psDB *db        // Database handle
    310                        )
     281bool pmConceptsReadChip(pmChip *chip, pmConceptSource source, bool propagateUp,
     282                        bool propagateDown, psDB *db)
    311283{
    312284    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    330302}
    331303
    332 // Read the concepts for a given FPA
    333 bool pmConceptsWriteChip(pmChip *chip,  // Chip for which to write concepts
    334                          pmConceptSource source, // The source of the concepts to read
    335                          bool propagateUp, // Propagate to higher levels?
    336                          bool propagateDown, // Propagate to lower levels?
    337                          psDB *db        // Database handle
    338                         )
     304bool pmConceptsWriteChip(const pmChip *chip, pmConceptSource source, bool propagateUp,
     305                         bool propagateDown, psDB *db)
    339306{
    340307    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    357324}
    358325
    359 // Set the concepts for a given chip to blanks
    360 bool pmConceptsBlankCell(pmCell *cell // Cell for which to set blank concepts
    361                         )
     326bool pmConceptsBlankCell(pmCell *cell)
    362327{
    363328    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    366331}
    367332
    368 // Read the concepts for a given FPA
    369 bool pmConceptsReadCell(pmCell *cell,   // Cell for which to read concepts
    370                         pmConceptSource source, // The source of the concepts to read
    371                         bool propagateUp, // Propagate to higher levels?
    372                         psDB *db        // Database handle
    373                        )
     333bool pmConceptsReadCell(pmCell *cell, pmConceptSource source, bool propagateUp, psDB *db)
    374334{
    375335    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    394354}
    395355
    396 // Read the concepts for a given FPA
    397 bool pmConceptsWriteCell(pmCell *cell,  // FPA for which to write concepts
    398                          pmConceptSource source, // The source of the concepts to read
    399                          bool propagateUp, // Propagate to higher levels?
    400                          psDB *db       // Database handle
    401                         )
     356bool pmConceptsWriteCell(const pmCell *cell, pmConceptSource source, bool propagateUp, psDB *db)
    402357{
    403358    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    423378{
    424379    conceptsInitialised = true;
     380
     381    p_psMemAllocatePersistent(true);
    425382
    426383    bool init = false;                  // Did we initialise anything?
     
    761718    }
    762719
     720    p_psMemAllocatePersistent(false);
     721
    763722    return init;
    764723}
     
    777736
    778737
    779 // Copy concepts from one FPA to another
    780 bool pmFPACopyConcepts(pmFPA *target,   // The target FPA
    781                        pmFPA *source    // The target FPA
    782                       )
     738bool pmFPACopyConcepts(pmFPA *target, const pmFPA *source)
    783739{
    784740    PS_ASSERT_PTR_NON_NULL(target, false);
Note: See TracChangeset for help on using the changeset viewer.