IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 6, 2007, 2:10:36 PM (19 years ago)
Author:
Paul Price
Message:

Adding ability to determine whether a concept is required or not, and using this ability to downgrade errors into warnings.

File:
1 edited

Legend:

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

    r11749 r12285  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-02-12 22:22:15 $
     6 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2007-03-07 00:10:36 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    6262    pmConceptParseFunc parse;           ///< Function to call to read the concept
    6363    pmConceptFormatFunc format;         ///< Function to call to write the concept
     64    bool required;                      ///< Is concept required (throw an error on problems)?
    6465}
    6566pmConceptSpec;
     
    6869pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, ///< Blank value; contains the name
    6970                                  pmConceptParseFunc parse, ///< Function to call to parse the concept
    70                                   pmConceptFormatFunc format ///< Function to call to format the concept
     71                                  pmConceptFormatFunc format, ///< Function to call to format the concept
     72                                  bool required ///< Is concept required?
    7173                                 );
     74
     75/// Get whether a particular concept is required
     76bool pmConceptGetRequired(const char *name, ///< Name of concept
     77                          pmFPALevel level ///< Level at which concept resides
     78    );
     79
     80/// Set whether a particular concept is required
     81bool pmConceptSetRequired(const char *name, ///< Name of concept
     82                          pmFPALevel level, ///< Level at which concept resides
     83                          bool required ///< Whether concept is required or not
     84    );
    7285
    7386/// Register a new concept for parsing and formatting
     
    8093                       pmConceptParseFunc parse, ///< Function to call to parse the concept, or NULL
    8194                       pmConceptFormatFunc format, ///< Function to call to format the concept, or NULL
     95                       bool required,   ///< Is concept required?
    8296                       pmFPALevel level ///< Level at which to store concept in the FPA hierarchy
    8397                      );
Note: See TracChangeset for help on using the changeset viewer.