IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 20, 2004, 6:12:37 PM (22 years ago)
Author:
eugene
Message:

substantial API changes based on change to PSLib SDRS

File:
1 edited

Legend:

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

    r619 r753  
    1010typedef enum {                          ///< type of val is:
    1111    PS_META_ITEM_SET = 0,               ///< NULL; metadata is in psMetadataType.items
    12     PS_META_FLOAT,                      ///< float (.f)
    13     PS_META_INT,                        ///< int (.i)
     12    PS_META_S32,                        ///< int (.i)
     13    PS_META_F32,                        ///< float (.f)
     14    PS_META_F64,                        ///< float (.f)
    1415    PS_META_STR,                        ///< string (.v)
    1516    PS_META_IMG,                        ///< image (.v)
     
    3435    psMetadataType type;                ///< type of this item
    3536    psMetadataFlags flags;              ///< flags associated with this item
    36     const union {
    37         double d;                       ///< double value
    38         float f;                        ///< floating value
    39         int i;                          ///< integer value
    40         void *v;                        ///< other type
    41     } val;                              ///< value of metadata
     37    union {
     38        psS32 S32;                      ///< integer value
     39        psF32 F32;                      ///< floating value
     40        psF64 F64;                      ///< double value
     41        void *V;                        ///< other type
     42    } data;                             ///< value of metadata
    4243    char *comment;                      ///< optional comment ("", not NULL)
    4344    psDlist *restrict items;            ///< list of psMetadataItems with the same name
     
    5657
    5758/** Constructor */
    58 psMetadataItem *psMetadataItemAlloc(int typeFlags, ///< type of this piece of metadata + flags
    59                                     const void *val, ///< value of new item N.b. a pointer even if the item
    60                                                      ///< is of type e.g. int
     59psMetadataItem *psMetadataItemAlloc(const char *name, ///< name of new item of metadata (sprintf format)
     60                                    int format, ///< type of this piece of metadata + flags
    6161                                    const char *comment, ///< comment associated with item
    62                                     const char *name, ///< name of new item of metadata (may be in sprintf
    63                                                       ///< format)
    64                                     ... ///< possible arguments for name format
    65     );
    66 psMetadataItem *psVMetadataItemAlloc(
    67     int typeFlags,                      // type of this piece of metadata + flags
    68     const void *data,                   // value of new item
    69     const char *comment,                // comment associated with item; may be NULL
    70     const char *name,                   // name of new item of metadata (may be an sprintf format)
    71     va_list ap                          // possible arguments for name format
    72     );
     62                                    ...)        ///< arguments for name and data
     63;
     64
     65psMetadataItem *psMetadataItemAllocV(const char *name, ///< name of new item of metadata (sprintf format)
     66                                    int format, ///< type of this piece of metadata + flags
     67                                    const char *comment, ///< comment associated with item
     68                                    va_list ap) ///< arguments for name and data
     69;
    7370
    7471/** Destructor */
    75 void psMetadataItemFree(psMetadataItem *ms ///< piece of metadata to destroy
    76     );
     72void psMetadataItemFree(psMetadataItem *ms) ///< piece of metadata to destroy
     73;
     74
    7775/** Constructor */
    78 psMetadata *psMetadataAlloc(void);   ///< make a new set of metadata
     76psMetadata *psMetadataAlloc(void)   ///< make a new set of metadata
     77;
    7978
    8079/** Destructor */
    81 void psMetadataFree(psMetadata *md ///< destroy a set of metadata
    82     );
     80void psMetadataFree(psMetadata *md) ///< destroy a set of metadata
     81;
    8382
    8483/**** Utilities **********************************************************************/
     
    8685/// Add item to the end of the metadata
    8786psMetadataItem *psMetadataAppendItem(psMetadata *restrict md, ///< metadata to add to
    88                                      psMetadataItem *restrict item ///< Metatdata item to add
    89     );
     87                                     psMetadataItem *restrict item) ///< Metatdata item to add
     88;
    9089
    9190/// Add item to the end of the metadata.  Combines psMetadataItemAlloc and psMetadataAppendItem
    9291psMetadataItem *psMetadataAppend(psMetadata *restrict md, ///< Metadata to add to
    93                                  int typeFlags, ///< type of this piece of metadata + flags
    94                                  const void *val, ///< value of new item N.b. a pointer even if the item
    95                                                   ///< is of type e.g. int
     92                                 const char *name, ///< name of new item of metadata (sprintf format)
     93                                 int format, ///< type of this piece of metadata + flags
    9694                                 const char *comment, ///< comment associated with item
    97                                  const char *name, ///< name of new item of metadata (may be in sprintf
    98                                                    ///< format)
    99                                  ...    ///< possible arguments for name format
    100     );
     95                                 ...)   ///< possible arguments for name format
     96;
    10197
    10298/// delete item from the metadata
     
    125121                         const char *prefix        ///< print this at the beginning of each line
    126122    );
     123
     124/// Read only header from image file.
     125psMetadata *
     126psMetadataReadHeader(psMetadata *out,   ///< read data to this structure
     127                     const char *ext,   ///< MEF extension name ("PHU" for primary header)
     128                     int extnum,        ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     129                     const char *file)  ///< file to read from
     130;
     131
     132/// Read only header from image file descriptor.
     133psMetadata *
     134psMetadataFReadHeader(psMetadata *out,  ///< read data to this structure
     135                      const char *ext,  ///< MEF extension name ("PHU" for primary header)
     136                      int extnum,       ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1)
     137                      FILE *f)          ///< file descriptor to read from
     138;
     139
    127140/* \} */ // End of AstroGroup Functions
    128141#endif
Note: See TracChangeset for help on using the changeset viewer.