IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11706


Ignore:
Timestamp:
Feb 8, 2007, 11:17:02 AM (19 years ago)
Author:
jhoblitt
Message:

change psMetadata*Alloc() functions to pass in file/lineno, func
whitespace fixes

Location:
trunk/psLib/src/types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadata.c

    r11669 r11706  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.150 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-02-06 21:55:28 $
     14 *  @version $Revision: 1.151 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-02-08 21:17:02 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    139139/*****************************************************************************/
    140140
    141 psMetadataItem* psMetadataItemAlloc(const char *name,
    142                                     psDataType type,
    143                                     const char *comment,
    144                                     ...)
     141psMetadataItem* p_psMetadataItemAlloc(const char *file,
     142                                      unsigned int lineno,
     143                                      const char *func,
     144                                      const char *name,
     145                                      psDataType type,
     146                                      const char *comment,
     147                                      ...)
    145148{
    146149    va_list argPtr;
     
    151154
    152155    // Call metadata item allocation
    153     metadataItem = psMetadataItemAllocV(name, type, comment, argPtr);
     156    metadataItem = p_psMetadataItemAllocV(file, lineno, func, name, type, comment, argPtr);
    154157
    155158    // Clean up stack after variable arguement has been used
     
    196199
    197200
    198 psMetadataItem* psMetadataItemAllocV(const char *name,
     201psMetadataItem* p_psMetadataItemAllocV(const char *file,
     202                                     unsigned int lineno,
     203                                     const char *func,
     204                                     const char *name,
    199205                                     psDataType type,
    200206                                     const char *comment,
     
    207213
    208214    // Allocate metadata item
    209     metadataItem = (psMetadataItem*) psAlloc(sizeof(psMetadataItem));
     215    metadataItem = (psMetadataItem*) p_psAlloc(file, lineno, func, sizeof(psMetadataItem));
    210216    metadataItem->data.V = NULL;
    211217
     
    318324}
    319325
    320 psMetadata* psMetadataAlloc(void)
     326psMetadata* p_psMetadataAlloc(const char *file,
     327                              unsigned int lineno,
     328                              const char *func)
    321329{
    322330    psList* list = NULL;
     
    325333
    326334    // Allocate metadata
    327     metadata = (psMetadata*) psAlloc(sizeof(psMetadata));
     335    metadata = (psMetadata*) p_psAlloc(file, lineno, func, sizeof(psMetadata));
    328336    // Set deallocator
    329337    psMemSetDeallocator(metadata, (psFreeFunc) metadataFree);
     
    347355
    348356
    349 psMetadataItem *psMetadataItemCopy(const psMetadataItem *in)
     357psMetadataItem *p_psMetadataItemCopy(const char *file,
     358                                     unsigned int lineno,
     359                                     const char *func,
     360                                     const psMetadataItem *in)
    350361{
    351362    PS_ASSERT_PTR_NON_NULL(in,NULL);
     
    355366    #define PS_METADATA_ITEM_COPY_CASE(NAME,TYPE) \
    356367case PS_DATA_##NAME: \
    357     newItem = psMetadataItemAlloc(in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \
     368    newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \
    358369    break; \
    359370
     
    376387            psVector *vecCopy = psVectorCopy(NULL, (psVector*)(in->data.V),
    377388                                             ((psVector*)(in->data.V))->type.type);
    378             newItem = psMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy);
     389            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_VECTOR, in->comment, vecCopy);
    379390            psFree(vecCopy);    // Drop reference
    380391            break;
     
    390401                }
    391402            }
    392             newItem = psMetadataItemAlloc(in->name, PS_DATA_TIME, in->comment, timeCopy);
     403            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_TIME, in->comment, timeCopy);
    393404            if (timeCopy) {
    394405                psFree(timeCopy);   // Drop reference
     
    399410            // Metadata: copy the next level and stuff that in too
    400411            psMetadata *metadata = psMetadataCopy(NULL, in->data.md);
    401             newItem = psMetadataItemAlloc(in->name, PS_DATA_METADATA, in->comment, metadata);
     412            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_METADATA, in->comment, metadata);
    402413            psFree(metadata);       // Drop reference
    403414            break;
     
    406417            psRegion *region = in->data.V; // The region
    407418            psRegion *new = psRegionAlloc(region->x0, region->x1, region->y0, region->y1); // Copy of the region
    408             newItem = psMetadataItemAlloc(in->name, PS_DATA_REGION, in->comment, new);
     419            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_REGION, in->comment, new);
    409420            psFree(new);                  // Drop reference
    410421            break;
     
    413424        // Other kinds of pointers
    414425        psLogMsg(__func__, PS_LOG_WARN, "Copying a pointer in the metadata item: %x\n", in->type);
    415         newItem = psMetadataItemAlloc(in->name, in->type, in->comment, in->data.V);
     426        newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, in->type, in->comment, in->data.V);
    416427        break;
    417428    }
     
    420431}
    421432
    422 psMetadata *psMetadataCopy(psMetadata *out,
    423                            const psMetadata *in)
     433psMetadata *p_psMetadataCopy(const char *file,
     434                             unsigned int lineno,
     435                             const char *func,
     436                             psMetadata *out,
     437                             const psMetadata *in)
    424438{
    425439
     
    437451    bool outAlloced = false;
    438452    if (out ==  NULL) {
    439         out = psMetadataAlloc();
     453        out = p_psMetadataAlloc(file, lineno, func);
    440454        outAlloced = true;
    441455    }
     
    957971
    958972// XXX should md be const?
    959 psMetadataIterator* psMetadataIteratorAlloc(const psMetadata* md,
    960         long location,
    961         const char* regex)
     973psMetadataIterator* p_psMetadataIteratorAlloc(const char *file,
     974                                              unsigned int lineno,
     975                                              const char *func,
     976                                              const psMetadata* md,
     977                                              long location,
     978                                              const char* regex)
    962979{
    963980    PS_ASSERT_PTR_NON_NULL(md,NULL);
    964981    PS_ASSERT_PTR_NON_NULL(md->list,NULL);
    965982
    966     psMetadataIterator* newIter = psAlloc(sizeof(psMetadataIterator));
     983    psMetadataIterator* newIter = p_psAlloc(file, lineno, func, sizeof(psMetadataIterator));
    967984    psMemSetDeallocator(newIter, (psFreeFunc) metadataIteratorFree);
    968985
  • trunk/psLib/src/types/psMetadata.h

    r11669 r11706  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.96 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2007-02-06 21:55:28 $
     11*  @version $Revision: 1.97 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2007-02-08 21:17:02 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6767#define PS_METADATA_TYPE_MASK 0x00FFFFFF
    6868
     69
    6970/** Metadata data structure.
    7071 *
     
    8283psMetadata;
    8384
     85
    8486/** Metadata iterator
    8587 *
     
    9294}
    9395psMetadataIterator;
     96
    9497
    9598/** Metadata item data structure.
     
    124127psMetadataItem;
    125128
     129
    126130/** Create a metadata item.
    127131 *
     
    139143 * @return psMetadataItem* : Pointer metadata item.
    140144 */
     145#ifdef DOXYGEN
    141146psMetadataItem* psMetadataItemAlloc(
    142147    const char *name,                  ///< Name of metadata item.
     
    144149    const char *comment,               ///< Comment for metadata item.
    145150    ...                                ///< Arguments for name formatting and metadata item data.
    146 )
    147 ;
     151);
     152#else // ifdef DOXYGEN
     153psMetadataItem* p_psMetadataItemAlloc(
     154    const char *file,                   ///< File of caller
     155    unsigned int lineno,                ///< Line number of caller
     156    const char *func,                   ///< Function name of caller
     157    const char *name,                  ///< Name of metadata item.
     158    psDataType type,                   ///< Type of metadata item.
     159    const char *comment,               ///< Comment for metadata item.
     160    ...                                ///< Arguments for name formatting and metadata item data.
     161);
     162#define psMetadataItemAlloc(name, type, ...) \
     163      p_psMetadataItemAlloc(__FILE__, __LINE__, __func__, name, type, __VA_ARGS__)
     164#endif // ifdef DOXYGEN
     165
    148166
    149167/** Checks the type of a particular pointer.
     
    157175);
    158176
     177// XXX Although all of the psMetadataItemAlloc[type] prototypes are allocators,
     178// I've decided not to modify them all to pass in file, lineno, func.
     179// Hopefully these prototypes will become macros or generated by macros some day
     180// so this can be done automatically.  -JH
    159181
    160182/** Create a metadata item with specified string data.
     
    171193);
    172194
     195
    173196/** Create a metadata item with specified psF32 data.
    174197 *
     
    197220);
    198221
     222
    199223/** Create a metadata item with specified psS8 data.
    200224 *
     
    210234);
    211235
     236
    212237/** Create a metadata item with specified psS16 data.
    213238 *
     
    223248);
    224249
     250
    225251/** Create a metadata item with specified psS32 data.
    226252 *
     
    236262);
    237263
     264
    238265/** Create a metadata item with specified psS64 data.
    239266 *
     
    249276);
    250277
     278
    251279/** Create a metadata item with specified psU8 data.
    252280 *
     
    262290);
    263291
     292
    264293/** Create a metadata item with specified psU16 data.
    265294 *
     
    275304);
    276305
     306
    277307/** Create a metadata item with specified psU32 data.
    278308 *
     
    288318);
    289319
     320
    290321/** Create a metadata item with specified psU64 data.
    291322 *
     
    301332);
    302333
     334
    303335/** Create a metadata item with specified bool data.
    304336 *
     
    313345    bool value                         ///< the value of the metadata item.
    314346);
     347
    315348
    316349/** Create a metadata item with specified psPtr data.
     
    328361);
    329362
    330 #ifndef SWIG
     363
    331364/** Create a metadata item with va_list.
    332365 *
     
    344377 * @return psMetadataItem* : Pointer metadata item.
    345378 */
     379#ifndef SWIG
     380#ifdef DOXYGEN
    346381psMetadataItem* psMetadataItemAllocV(
    347382    const char *name,                  ///< Name of metadata item.
     
    350385    va_list list                       ///< Arguments for name formatting and metadata item data.
    351386);
     387#else // ifdef DOXYGEN
     388psMetadataItem* p_psMetadataItemAllocV(
     389    const char *file,                   ///< File of caller
     390    unsigned int lineno,                ///< Line number of caller
     391    const char *func,                   ///< Function name of caller
     392    const char *name,                  ///< Name of metadata item.
     393    psDataType type,                   ///< Type of metadata item.
     394    const char *comment,               ///< Comment for metadata item.
     395    va_list list                       ///< Arguments for name formatting and metadata item data.
     396);
     397#define psMetadataItemAllocV(name, type, comment, list) \
     398      p_psMetadataItemAllocV(__FILE__, __LINE__, __func__, name, type,comment, list)
     399#endif // ifdef DOXYGEN
    352400#endif // #ifndef SWIG
     401
    353402
    354403/** Create a metadata collection.
     
    359408 *  @return psMetadata* : Pointer metadata.
    360409 */
     410#ifdef DOXYGEN
    361411psMetadata* psMetadataAlloc(void);
     412#else // ifdef DOXYGEN
     413psMetadata* p_psMetadataAlloc(
     414    const char *file,                   ///< File of caller
     415    unsigned int lineno,                ///< Line number of caller
     416    const char *func                    ///< Function name of caller
     417);
     418#define psMetadataAlloc() \
     419      p_psMetadataAlloc(__FILE__, __LINE__, __func__)
     420#endif // ifdef DOXYGEN
    362421
    363422
    364423/** Checks the type of a particular pointer.
    365424 *
    366  *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
     425 *  Uses the appropriate deallocation function in psMemBlock to check the ptr
     426 *  datatype.
    367427 *
    368428 *  @return bool:       True if the pointer matches a psMetadata structure, false otherwise.
     
    372432);
    373433
     434
    374435/** Creates a new copy of a psMetadataItem.
    375436 *
    376437 * @return psMetadataItem*: the copy of the psMetadataItem
    377438 */
     439#ifdef DOXYGEN
    378440psMetadataItem *psMetadataItemCopy(
    379     const psMetadataItem *in           ///< metadata item to be copied
    380 );
     441    const psMetadataItem *in            ///< metadata item to be copied
     442);
     443#else // ifdef DOXYGEN
     444psMetadataItem *p_psMetadataItemCopy(
     445    const char *file,                   ///< File of caller
     446    unsigned int lineno,                ///< Line number of caller
     447    const char *func,                   ///< Function name of caller
     448    const psMetadataItem *in            ///< metadata item to be copied
     449);
     450#define psMetadataItemCopy(in) \
     451      p_psMetadataItemCopy(__FILE__, __LINE__, __func__, in)
     452#endif // ifdef DOXYGEN
     453
    381454
    382455/** Create a copy of an existing psMetadata collection.
    383456 *
    384  *  Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and
    385  *  returns them in out, or creates a new container if out is NULL.  If an error occurs,
    386  *  NULL is returned but out may still have been updated if it is non-NULL.
     457 *  Creates a new copy of all the psMetadataItems in the psMetadata collection,
     458 *  in, and returns them in out, or creates a new container if out is NULL.  If
     459 *  an error occurs, NULL is returned but out may still have been updated if it
     460 *  is non-NULL.
    387461 *
    388462 *  @return psMetadata*:        the copy of the psMetadata container.
    389463 */
     464#ifdef DOXYGEN
    390465psMetadata *psMetadataCopy(
    391466    psMetadata *out,                   ///< output Metadata container for copying.
    392467    const psMetadata *in               ///< Metadata collection to be copied.
    393468);
     469#else // ifdef DOXYGEN
     470psMetadata *p_psMetadataCopy(
     471    const char *file,                   ///< File of caller
     472    unsigned int lineno,                ///< Line number of caller
     473    const char *func,                   ///< Function name of caller
     474    psMetadata *out,                    ///< output Metadata container for copying.
     475    const psMetadata *in                ///< Metadata collection to be copied.
     476);
     477#define psMetadataCopy(out, in) \
     478      p_psMetadataCopy(__FILE__, __LINE__, __func__, out, in)
     479#endif // ifdef DOXYGEN
     480
    394481
    395482/** Copy a metadata item from one psMetadata to another.
    396483 *
    397  *  Creates a copy of a psMetadataItem from in and appends it to out.  If out is NULL,
    398  *  a new container is created.
     484 *  Creates a copy of a psMetadataItem from in and appends it to out.  If out
     485 *  is NULL, a new container is created.
    399486 *
    400487 *  @return bool:       True if successful, otherwise false.
     
    405492    const char *key                    ///< key to identify the metadata item for copying.
    406493);
     494
    407495
    408496/** Add existing metadata item to metadata collection.
     
    420508);
    421509
     510
    422511/** Create and add a metadata item to metadata collection.
    423512 *
     
    435524);
    436525
     526
     527/** Create and add a metadata item to metadata collection.
     528 *
     529 * Creates a new metadata item add to the metadata collection.
     530 *
     531 * @return bool: True for success, false for failure.
     532 */
    437533#ifndef SWIG
    438 /** Create and add a metadata item to metadata collection.
    439  *
    440  * Creates a new metadata item add to the metadata collection.
    441  *
    442  * @return bool: True for success, false for failure.
    443  */
    444534bool psMetadataAddV(
    445535    psMetadata* md,                    ///< Metadata collection to insert metadata item.
     
    452542#endif // #ifndef SWIG
    453543
     544
    454545/** Add a bool value to metadata collection.
    455546 *
     
    465556);
    466557
     558
    467559/** Add a psS8 value to metadata collection.
    468560 *
     
    478570);
    479571
     572
    480573/** Add a psS16 value to metadata collection.
    481574 *
     
    491584);
    492585
     586
    493587/** Add a psS32 value to metadata collection.
    494588 *
     
    504598);
    505599
     600
    506601/** Add a psS64 value to metadata collection.
    507602 *
     
    517612);
    518613
     614
    519615/** Add a psU8 value to metadata collection.
    520616 *
     
    530626);
    531627
     628
    532629/** Add a psU16 value to metadata collection.
    533630 *
     
    543640);
    544641
     642
    545643/** Add a psU32 value to metadata collection.
    546644 *
     
    556654);
    557655
     656
    558657/** Add a psU64 value to metadata collection.
    559658 *
     
    568667    psU64 value                        ///< Value for metadata item data
    569668);
     669
    570670
    571671/** Add a psF32 value to metadata collection.
     
    582682);
    583683
     684
    584685/** Add a psF64 value to metadata collection.
    585686 *
     
    595696);
    596697
     698
    597699/** Add a psList to metadata collection.
    598700 *
     
    608710);
    609711
     712
    610713/** Add a string to metadata collection.
    611714 *
     
    621724);
    622725
     726
    623727/** Add a vector to metadata collection.
    624728 *
     
    634738);
    635739
     740
    636741/** Add a array to metadata collection.
    637742 *
     
    647752);
    648753
     754
    649755/** Add an Image to metadata collection.
    650756 *
     
    660766);
    661767
     768
    662769/** Add a Time to metadata collection.
    663770 *
     
    673780);
    674781
     782
    675783/** Add a Hash to metadata collection.
    676784 *
     
    686794);
    687795
     796
    688797/** Add a LookupTable to metadata collection.
    689798 *
     
    699808);
    700809
     810
    701811/** Add an Unknown (psPtr) to metadata collection.
    702812 *
     
    712822);
    713823
     824
    714825/** Add a psPtr to metadata collection.
    715826 *
     
    725836);
    726837
     838
    727839/** Add Metadata to metadata collection.
    728840 *
     
    737849    psMetadata* value                  ///< Metadata for metadata item data
    738850);
     851
    739852
    740853/** Removes an item from metadata by key name.
     
    746859    const char *key                    ///< Name of metadata key.
    747860);
     861
    748862
    749863/** Removes an item from metadata by index number.
     
    756870);
    757871
     872
    758873/** Find an item in the metadata collection based on key name.
    759874 *
     
    769884);
    770885
     886
    771887/** Find an item in the metadata collection based on key name and return its double precision value.
    772888 *
    773889 *  Items may be found in the metadata by providing a key. If the key is
    774  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    775  *  returned.
     890 *  non-unique, the value of the first item is returned. If the item is not
     891 *  found, zero is returned.
    776892 *
    777893 * @return psF64 : Value of metadata item.
     
    783899);
    784900
     901
    785902/** Find an item in the metadata collection based on key name and return its single precision value.
    786903 *
    787904 *  Items may be found in the metadata by providing a key. If the key is
    788  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    789  *  returned.
     905 *  non-unique, the value of the first item is returned. If the item is not
     906 *  found, zero is returned.
    790907 *
    791908 * @return psF32 : Value of metadata item.
     
    797914);
    798915
     916
    799917/** Find an item in the metadata collection based on key name and return its integer value.
    800918 *
    801919 *  Items may be found in the metadata by providing a key. If the key is
    802  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    803  *  returned.
     920 *  non-unique, the value of the first item is returned. If the item is not
     921 *  found, zero is returned.
    804922 *
    805923 * @return psS8 : Value of metadata item.
     
    811929);
    812930
     931
    813932/** Find an item in the metadata collection based on key name and return its integer value.
    814933 *
    815934 *  Items may be found in the metadata by providing a key. If the key is
    816  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    817  *  returned.
     935 *  non-unique, the value of the first item is returned. If the item is not
     936 *  found, zero is returned.
    818937 *
    819938 * @return psS16 : Value of metadata item.
     
    825944);
    826945
     946
    827947/** Find an item in the metadata collection based on key name and return its integer value.
    828948 *
    829949 *  Items may be found in the metadata by providing a key. If the key is
    830  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    831  *  returned.
     950 *  non-unique, the value of the first item is returned. If the item is not
     951 *  found, zero is returned.
    832952 *
    833953 * @return psS32 : Value of metadata item.
     
    839959);
    840960
     961
    841962/** Find an item in the metadata collection based on key name and return its integer value.
    842963 *
    843964 *  Items may be found in the metadata by providing a key. If the key is
    844  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    845  *  returned.
     965 *  non-unique, the value of the first item is returned. If the item is not
     966 *  found, zero is returned.
    846967 *
    847968 * @return psS64 : Value of metadata item.
     
    853974);
    854975
     976
    855977/** Find an item in the metadata collection based on key name and return its integer value.
    856978 *
    857979 *  Items may be found in the metadata by providing a key. If the key is
    858  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    859  *  returned.
     980 *  non-unique, the value of the first item is returned. If the item is not
     981 *  found, zero is returned.
    860982 *
    861983 * @return psU8 : Value of metadata item.
     
    867989);
    868990
     991
    869992/** Find an item in the metadata collection based on key name and return its integer value.
    870993 *
    871994 *  Items may be found in the metadata by providing a key. If the key is
    872  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    873  *  returned.
     995 *  non-unique, the value of the first item is returned. If the item is not
     996 *  found, zero is returned.
    874997 *
    875998 * @return psU16 : Value of metadata item.
     
    8811004);
    8821005
     1006
    8831007/** Find an item in the metadata collection based on key name and return its integer value.
    8841008 *
    8851009 *  Items may be found in the metadata by providing a key. If the key is
    886  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    887  *  returned.
     1010 *  non-unique, the value of the first item is returned. If the item is not
     1011 *  found, zero is returned.
    8881012 *
    8891013 * @return psU32 : Value of metadata item.
     
    8951019);
    8961020
     1021
    8971022/** Find an item in the metadata collection based on key name and return its integer value.
    8981023 *
    8991024 *  Items may be found in the metadata by providing a key. If the key is
    900  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    901  *  returned.
     1025 *  non-unique, the value of the first item is returned. If the item is not
     1026 *  found, zero is returned.
    9021027 *
    9031028 * @return psU64 : Value of metadata item.
     
    9091034);
    9101035
     1036
    9111037/** Find an item in the metadata collection based on key name and return its boolean value.
    9121038 *
    9131039 *  Items may be found in the metadata by providing a key. If the key is
    914  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    915  *  returned.
     1040 *  non-unique, the value of the first item is returned. If the item is not
     1041 *  found, zero is returned.
    9161042 *
    9171043 * @return bool : Value of metadata item.
     
    9231049);
    9241050
     1051
    9251052/** Find an item in the metadata collection based on key name and return its integer value.
    9261053 *
    9271054 *  Items may be found in the metadata by providing a key. If the key is
    928  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    929  *  returned.
     1055 *  non-unique, the value of the first item is returned. If the item is not
     1056 *  found, zero is returned.
    9301057 *
    9311058 * @return void* : Value of metadata item.
     
    9361063    const char *key                    ///< Name of metadata key.
    9371064);
     1065
    9381066
    9391067/** Find an item in the metadata collection based on list index.
     
    9491077);
    9501078
     1079
    9511080/** Creates a psMetadataIterator to iterate over the specified psMetadata.
    9521081 *
     
    9571086 *  @return psMetadataIterator*        a new psMetadataIterator, of NULL if error occurred
    9581087 */
     1088#ifdef DOXYGEN
    9591089psMetadataIterator* psMetadataIteratorAlloc(
    960     const psMetadata* md,  ///< the psMetadata to iterate with
    961     long location,   ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     1090    const psMetadata* md,               ///< the psMetadata to iterate with
     1091    long location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
    9621092    const char* regex
    9631093    ///< A regular expression for subsetting the psMetadata.  If NULL, no
    9641094    ///< subsetting is performed.
    9651095);
     1096#else // ifdef DOXYGEN
     1097psMetadataIterator* p_psMetadataIteratorAlloc(
     1098    const char *file,                   ///< File of caller
     1099    unsigned int lineno,                ///< Line number of caller
     1100    const char *func,                   ///< Function name of caller
     1101    const psMetadata* md,               ///< the psMetadata to iterate with
     1102    long location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     1103    const char* regex
     1104    ///< A regular expression for subsetting the psMetadata.  If NULL, no
     1105    ///< subsetting is performed.
     1106);
     1107#define psMetadataIteratorAlloc(md, location, regex) \
     1108      p_psMetadataIteratorAlloc(__FILE__, __LINE__, __func__, md, location, regex)
     1109#endif // ifdef DOXYGEN
     1110
    9661111
    9671112/** Set the iterator of the psMetadat to a given position.  If location is
     
    9751120);
    9761121
     1122
    9771123/** Position the specified iterator to the next matching item in psMetadata,
    9781124 *  given the regular expression of the iterator
     
    9841130    psMetadataIterator* iterator       ///< iterator to move
    9851131);
     1132
    9861133
    9871134/** Position the specified iterator to the previous matching item in psMetadata,
     
    9961143);
    9971144
     1145
    9981146/** Find an item in the metadata collection based on key name and return its metadata value.
    9991147 *
    10001148 *  Items may be found in the metadata by providing a key. If the key is
    1001  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    1002  *  returned.
     1149 *  non-unique, the value of the first item is returned. If the item is not
     1150 *  found, zero is returned.
    10031151 *
    10041152 *  @return psMetadata*:        Value of metadata item.
     
    10101158);
    10111159
     1160
    10121161/** Find an item in the metadata collection based on key name and return its string value.
    10131162 *
    10141163 *  Items may be found in the metadata by providing a key. If the key is
    1015  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    1016  *  returned.
     1164 *  non-unique, the value of the first item is returned. If the item is not
     1165 *  found, zero is returned.
    10171166 *
    10181167 *  @return psString:           Value of metadata item.
     
    10241173);
    10251174
     1175
    10261176/** Find an item in the metadata collection based on key name and return it as a psTime pointer.
    10271177 *
    10281178 *  Items may be found in the metadata by providing a key. If the key is
    1029  *  non-unique, the value of the first item is returned. If the item is not found, zero is
    1030  *  returned.
     1179 *  non-unique, the value of the first item is returned. If the item is not
     1180 *  found, zero is returned.
    10311181 *
    10321182 *  @return psTime:           Value of metadata item.
Note: See TracChangeset for help on using the changeset viewer.