IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 5, 2005, 5:04:35 PM (21 years ago)
Author:
drobbin
Message:

made changes based on revisions in psLib SDRS rev. 15

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psMetadata.h

    r4401 r4457  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2005-06-27 20:38:12 $
     13*  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2005-07-06 03:04:35 $
    1515*
    1616*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5555    PS_META_ARRAY                      ///< Array data (Stored as item.data.V).
    5656} psMetadataType;
    57 
    5857#define PS_META_IS_PRIMITIVE(TYPE) \
    5958(TYPE == PS_META_S32 || \
     
    7776    PS_META_DEFAULT = 0,               ///< default behaviour (duplicate entry is an error)
    7877    PS_META_REPLACE = 0x1000000,       ///< allow entry to be replaced
    79     PS_META_DUPLICATE_OK = 0x2000000   ///< allow duplicate entries
     78    PS_META_DUPLICATE_OK = 0x2000000,  ///< allow duplicate entries
     79    PS_META_NULL = 0x4000000           ///< psMetadataItem.data is a NULL value
    8080} psMetadataFlags;
    8181
     
    9494    psList*  list;                     ///< Metadata in linked-list
    9595    psHash*  table;                    ///< Metadata in a hash table
     96    void *lock;                        ///< Optional lock for thread safety
    9697}
    9798psMetadata;
     
    104105{
    105106    psListIterator* iter;              ///< iterator for the psMetadata's psList
    106     regex_t* preg;                     ///< the subsetting regular expression
     107    regex_t* regex;                    ///< the subsetting regular expression
    107108}
    108109psMetadataIterator;
     
    116117{
    117118    const psS32 id;                    ///< Unique ID for metadata item.
    118     char *name;                        ///< Name of metadata item.
     119    psString name;                     ///< Name of metadata item.
    119120    psMetadataType type;               ///< Type of metadata item.
    120121    union {
     
    127128        psPtr V;                       ///< Pointer to other type of data.
    128129    } data;                            ///< Union for data types.
    129     char *comment;                     ///< Optional comment ("", not NULL).
     130    psString comment;                  ///< Optional comment ("", not NULL).
    130131}
    131132psMetadataItem;
     
    151152    const char *comment,               ///< Comment for metadata item.
    152153    ...                                ///< Arguments for name formatting and metadata item data.
    153 );
     154)
     155;
    154156
    155157/** Create a metadata item with specified string data.
     
    261263    psMetadata*  md,                   ///< Metadata collection to insert metadat item.
    262264    const psMetadataItem* item,        ///< Metadata item to be added.
    263     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     265    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    264266    psS32 flags                        ///< Options flag mask, see psMetadataFlags enum
    265267);
     
    273275bool psMetadataAdd(
    274276    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    275     int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     277    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    276278    const char *name,                  ///< Name of metadata item.
    277279    int format,                        ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     
    289291bool psMetadataAddV(
    290292    psMetadata* md,                    ///< Metadata collection to insert metadata item.
    291     int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     293    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    292294    const char *name,                  ///< Name of metadata item.
    293295    int format,                        ///< Type of metadata item (psMetadataType) and options (psMetadataFlags)
     
    298300
    299301/** Add a psS32 value to metadata collection.
    300  * 
    301  *  @return bool:  True for success, False for failure. 
     302 *
     303 *  @return bool:  True for success, False for failure.
    302304 */
    303305bool psMetadataAddS32(
    304306    psMetadata* md,                    ///< Metadata collection to insert metadata item
    305     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     307    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    306308    const char* name,                  ///< Name of metadata item
    307309    const char* comment,               ///< Comment for metadata item
     
    310312
    311313/** Add a psF32 value to metadata collection.
    312  * 
     314 *
    313315 *  @return bool:  True for success, False for failure.
    314316*/
    315317bool psMetadataAddF32(
    316318    psMetadata* md,                    ///< Metadata collection to insert metadata item
    317     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     319    long location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    318320    const char* name,                  ///< Name of metadata item
    319321    const char* comment,               ///< Comment for metadata item
     
    322324
    323325/** Add a psF64 value to metadata collection.
    324  * 
     326 *
    325327 *  @return bool:  True for success, False for failure.
    326328*/
    327329bool psMetadataAddF64(
    328330    psMetadata* md,                    ///< Metadata collection to insert metadata item
    329     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     331    long location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    330332    const char* name,                  ///< Name of metadata item
    331333    const char* comment,               ///< Comment for metadata item
     
    334336
    335337/** Add a psList to metadata collection.
    336  *       
     338 *
    337339 *  @return psBool:  True for success, False for failure.
    338340 */
    339341psBool psMetadataAddList(
    340342    psMetadata* md,                    ///< Metadata collection to insert metadata item
    341     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     343    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    342344    const char* name,                  ///< Name of metadata item
    343345    const char* comment,               ///< Comment for metadata item
     
    346348
    347349/** Add a string to metadata collection.
    348  * 
     350 *
    349351 *  @return bool:  True for success, False for failure.
    350352 */
    351353bool psMetadataAddStr(
    352354    psMetadata* md,                    ///< Metadata collection to insert metadata item
    353     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     355    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    354356    const char* name,                  ///< Name of metadata item
    355357    const char* comment,               ///< Comment for metadata item
     
    358360
    359361/** Add a vector to metadata collection.
    360  * 
     362 *
    361363 *  @return psBool:  True for success, False for failure.
    362364 */
    363365psBool psMetadataAddVector(
    364366    psMetadata* md,                    ///< Metadata collection to insert metadata item
    365     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     367    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    366368    const char* name,                  ///< Name of metadata item
    367369    const char* comment,               ///< Comment for metadata item
     
    370372
    371373/** Add a array to metadata collection.
    372  * 
     374 *
    373375 *  @return psBool:  True for success, False for failure.
    374376 */
    375377psBool psMetadataAddArray(
    376378    psMetadata* md,                    ///< Metadata collection to insert metadata item
    377     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     379    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    378380    const char* name,                  ///< Name of metadata item
    379381    const char* comment,               ///< Comment for metadata item
     
    382384
    383385/** Add an Image to metadata collection.
    384  * 
     386 *
    385387 *  @return psBool:  True for success, False for failure.
    386388 */
    387389psBool psMetadataAddImage(
    388390    psMetadata* md,                    ///< Metadata collection to insert metadata item
    389     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     391    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    390392    const char* name,                  ///< Name of metadata item
    391393    const char* comment,               ///< Comment for metadata item
     
    394396
    395397/** Add a Hash to metadata collection.
    396  * 
     398 *
    397399 *  @return psBool:  True for success, False for failure.
    398400 */
    399401psBool psMetadataAddHash(
    400402    psMetadata* md,                    ///< Metadata collection to insert metadata item
    401     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     403    long location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    402404    const char* name,                  ///< Name of metadata item
    403405    const char* comment,               ///< Comment for metadata item
     
    406408
    407409/** Add a LookupTable to metadata collection.
    408  * 
     410 *
    409411 *  @return psBool:  True for success, False for failure.
    410412 */
    411413psBool psMetadataAddLookupTable(
    412414    psMetadata* md,                    ///< Metadata collection to insert metadata item
    413     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     415    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    414416    const char* name,                  ///< Name of metadata item
    415417    const char* comment,               ///< Comment for metadata item
     
    418420
    419421/** Add an Unknown (psPtr) to metadata collection.
    420  * 
     422 *
    421423 *  @return psBool:  True for success, False for failure.
    422424 */
    423425psBool psMetadataAddUnknown(
    424426    psMetadata* md,                    ///< Metadata collection to insert metadata item
    425     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     427    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    426428    const char* name,                  ///< Name of metadata item
    427429    const char* comment,               ///< Comment for metadata item
     
    430432
    431433/** Add Metadata to metadata collection.
    432  * 
     434 *
    433435 *  @return psBool:  True for success, False for failure.
    434436 */
    435437psBool psMetadataAddMetadata(
    436438    psMetadata* md,                    ///< Metadata collection to insert metadata item
    437     psS32 location,                    ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     439    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    438440    const char* name,                  ///< Name of metadata item
    439441    const char* comment,               ///< Comment for metadata item
     
    453455bool psMetadataRemove(
    454456    psMetadata*  md,                   ///< Metadata collection to remove metadata item.
    455     int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     457    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    456458    const char * key                   ///< Name of metadata key.
    457459);
     
    549551psMetadataItem* psMetadataGet(
    550552    const psMetadata* md,              ///< Metadata collection to retrieve metadata item.
    551     int location                       ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     553    long location                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    552554);
    553555
     
    562564psMetadataIterator* psMetadataIteratorAlloc(
    563565    psMetadata* md,                    ///< the psMetadata to iterate with
    564     int location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     566    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    565567    const char* regex
    566568    ///< A regular expression for subsetting the psMetadata.  If NULL, no
     
    575577bool psMetadataIteratorSet(
    576578    psMetadataIterator* iterator,      ///< psMetadata iterator
    577     int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
     579    long location                      ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    578580);
    579581
Note: See TracChangeset for help on using the changeset viewer.