IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2004, 5:01:04 PM (22 years ago)
Author:
Paul Price
Message:

Standardised on /< as Doxygen comment for variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psMetaData.h

    r294 r344  
    88
    99/** Possible types of metadata. */
    10 typedef enum {                          //!< type of val is:
    11     PS_META_ITEM_SET = 0,               //!< NULL; metadata is in psMetaDataType.items
    12     PS_META_FLOAT,                      //!< float (.f)
    13     PS_META_INT,                        //!< int (.i)
    14     PS_META_STR,                        //!< string (.v)
    15     PS_META_IMG,                        //!< image (.v)
    16     PS_META_JPEG,                       //!< JPEG (.v)
    17     PS_META_PNG,                        //!< PNG (.v)
    18     PS_META_ASTROM,                     //!< astrometric coefficients (.v)
    19     PS_META_UNKNOWN,                    //!< other (.v)
    20     PS_META_NTYPE                       //!< Number of types; must be last
     10typedef enum {                          ///< type of val is:
     11    PS_META_ITEM_SET = 0,               ///< NULL; metadata is in psMetaDataType.items
     12    PS_META_FLOAT,                      ///< float (.f)
     13    PS_META_INT,                        ///< int (.i)
     14    PS_META_STR,                        ///< string (.v)
     15    PS_META_IMG,                        ///< image (.v)
     16    PS_META_JPEG,                       ///< JPEG (.v)
     17    PS_META_PNG,                        ///< PNG (.v)
     18    PS_META_ASTROM,                     ///< astrometric coefficients (.v)
     19    PS_META_UNKNOWN,                    ///< other (.v)
     20    PS_META_NTYPE                       ///< Number of types; must be last
    2121} psMetaDataType;
    2222
    2323/** Metadata flags (not exclusive with psMetaDataType). */
    2424typedef enum {
    25     PS_META_TYPE_MASK =     0xffff,     //!< the type enum must fit in this mask
    26     PS_META_UNIQUE =       0x10000,     //!< the name must be unique (default)
    27     PS_META_NON_UNIQUE =   0x20000,     //!< the name may be repeated, and should be disambiguated for us
     25    PS_META_TYPE_MASK =     0xffff,     ///< the type enum must fit in this mask
     26    PS_META_UNIQUE =       0x10000,     ///< the name must be unique (default)
     27    PS_META_NON_UNIQUE =   0x20000,     ///< the name may be repeated, and should be disambiguated for us
    2828} psMetaDataFlags;
    2929
    3030/** A struct to define a single item of metadata */
    3131typedef struct {
    32     const int id;                       //!< unique ID for this item
    33     char *restrict name;                //!< Name of item
    34     psMetaDataType type;                //!< type of this item
    35     psMetaDataFlags flags;              //!< flags associated with this item
     32    const int id;                       ///< unique ID for this item
     33    char *restrict name;                ///< Name of item
     34    psMetaDataType type;                ///< type of this item
     35    psMetaDataFlags flags;              ///< flags associated with this item
    3636    const union {
    37         float f;                        //!< floating value
    38         int i;                          //!< integer value
    39         void *v;                        //!< other type
    40     } val;                              //!< value of metadata
    41     char *comment;                      //!< optional comment ("", not NULL)
    42     psDlist *restrict items;            //!< list of psMetaDataItems with the same name
     37        float f;                        ///< floating value
     38        int i;                          ///< integer value
     39        void *v;                        ///< other type
     40    } val;                              ///< value of metadata
     41    char *comment;                      ///< optional comment ("", not NULL)
     42    psDlist *restrict items;            ///< list of psMetaDataItems with the same name
    4343} psMetaDataItem;
    4444
    4545/** A set of metadata */
    4646typedef struct {
    47     psDlist *restrict list;             //!< list of psMetaDataItem
    48     psHash *restrict table;             //!< hash table of the same metadata
     47    psDlist *restrict list;             ///< list of psMetaDataItem
     48    psHash *restrict table;             ///< hash table of the same metadata
    4949} psMetaDataSet;
    5050
     
    5555
    5656/** Constructor */
    57 psMetaDataItem *psMetaDataItemAlloc(int typeFlags, //!< type of this piece of metadata + flags
    58                                     const void *val, //!< value of new item N.b. a pointer even if the item
    59                                                      //!< is of type e.g. int
    60                                     const char *comment, //!< comment associated with item
    61                                     const char *name, //!< name of new item of metadata (may be in sprintf
    62                                                       //!< format)
    63                                     ... //!< possible arguments for name format
     57psMetaDataItem *psMetaDataItemAlloc(int typeFlags, ///< type of this piece of metadata + flags
     58                                    const void *val, ///< value of new item N.b. a pointer even if the item
     59                                                     ///< is of type e.g. int
     60                                    const char *comment, ///< comment associated with item
     61                                    const char *name, ///< name of new item of metadata (may be in sprintf
     62                                                      ///< format)
     63                                    ... ///< possible arguments for name format
    6464    );
    6565
    6666/** Destructor */
    67 void psMetaDataItemFree(psMetaDataItem *ms //!< piece of metadata to destroy
     67void psMetaDataItemFree(psMetaDataItem *ms ///< piece of metadata to destroy
    6868    );
    6969/** Constructor */
    70 psMetaDataSet *psMetaDataSetAlloc(void);   //!< make a new set of metadata
     70psMetaDataSet *psMetaDataSetAlloc(void);   ///< make a new set of metadata
    7171
    7272/** Destructor */
    73 void psMetaDataSetFree(psMetaDataSet *ms //!< destroy a set of metadata
     73void psMetaDataSetFree(psMetaDataSet *ms ///< destroy a set of metadata
    7474    );
    7575
     
    7777
    7878/// Add entry to the end of the metadata set
    79 psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, //!< Metadata set to add to
    80                                  psMetaDataItem *restrict item //!< Metatdata to add
     79psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, ///< Metadata set to add to
     80                                 psMetaDataItem *restrict item ///< Metatdata to add
    8181    );
    8282
    8383/// delete entry from the metadata set
    84 psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, //!< Metadata set to delete from
    85                                  const char *restrict key //!< Key to delete
     84psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, ///< Metadata set to delete from
     85                                 const char *restrict key ///< Key to delete
    8686    );
    8787
    8888/// reset the iterator to the start of the list
    89 void psMetaDataSetIterator(psMetaDataSet *ms //!< Metadata set to set iterator for
     89void psMetaDataSetIterator(psMetaDataSet *ms ///< Metadata set to set iterator for
    9090    );
    9191
    9292/// get the next entry in the sequence
    93 psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, //!< Metadata set to get from
    94                                   const char *restrict match //!< Match this
     93psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, ///< Metadata set to get from
     94                                  const char *restrict match ///< Match this
    9595    );
    9696
    9797/// find the metadata with the specified key
    98 psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, //!< Metadata set to look up
    99                                  const char *restrict key //!< Key to find
     98psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, ///< Metadata set to look up
     99                                 const char *restrict key ///< Key to find
    100100    );
    101101
    102102/// print metadata item to the specified stream
    103 void psMetaDataItemPrint(FILE *fd,              //!< file descriptor to write to
    104                          const psMetaDataItem *restrict ms, //!< item of metadata to print
    105                          const char *prefix        //!< print this at the beginning of each line
     103void psMetaDataItemPrint(FILE *fd,              ///< file descriptor to write to
     104                         const psMetaDataItem *restrict ms, ///< item of metadata to print
     105                         const char *prefix        ///< print this at the beginning of each line
    106106    );
    107107/* \} */ // End of AstroGroup Functions
Note: See TracChangeset for help on using the changeset viewer.