IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11724


Ignore:
Timestamp:
Feb 8, 2007, 3:26:00 PM (19 years ago)
Author:
Paul Price
Message:

Renaming psMetadataItemTransfer to psMetadataItemSupplement

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

Legend:

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

    r11706 r11724  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.151 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-02-08 21:17:02 $
     14 *  @version $Revision: 1.152 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-02-09 01:26:00 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    492492
    493493// may need to extend this to change the keyname in the copy
    494 bool psMetadataItemTransfer(psMetadata *out,
    495                             const psMetadata *in,
    496                             const char *key)
    497 {
    498     if (in == NULL) {
    499         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    500                 "psMetadataItemTransfer:  'in' cannot be NULL.\n");
    501         return false;
    502     }
    503     if (out == NULL) {
    504         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    505                 "psMetadataItemTransfer:  'out' cannot be NULL.\n");
    506         return false;
    507     }
    508     if (key == NULL) {
    509         psError(PS_ERR_BAD_PARAMETER_NULL, true,
    510                 "psMetadataItemTransfer:  'key' cannot be NULL.\n");
    511         return false;
    512     }
     494bool psMetadataItemSupplement(psMetadata *out,
     495                              const psMetadata *in,
     496                              const char *key)
     497{
     498    PS_ASSERT_METADATA_NON_NULL(in, false);
     499    PS_ASSERT_METADATA_NON_NULL(out, false);
     500    PS_ASSERT_STRING_NON_EMPTY(key, false);
    513501
    514502    psMetadataItem *item = psMetadataLookup(in, key);
    515503    if (!item) {
    516         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    517                 "psMetadataItemTransfer:  Could not find 'key' in psMetadata 'in'.\n");
     504        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Could not find '%s' in metadata.\n", key);
    518505        return false;
    519506    }
    520507    if (!psMetadataAddItem(out, item, PS_LIST_TAIL, PS_META_REPLACE) ) {
    521         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    522                 "psMetadataItemTransfer:  Could not add item to psMetadata 'out'.\n");
     508        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Could not add %s to metadata.\n", key);
    523509        return false;
    524510    }
  • trunk/psLib/src/types/psMetadata.h

    r11706 r11724  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.97 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2007-02-08 21:17:02 $
     11*  @version $Revision: 1.98 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2007-02-09 01:26:00 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    480480
    481481
    482 /** Copy a metadata item from one psMetadata to another.
    483  *
    484  *  Creates a copy of a psMetadataItem from in and appends it to out.  If out
    485  *  is NULL, a new container is created.
     482/** Supplements a metadata with an item from another metadata.
     483 *
     484 *  Supplements the output metadata with the metadata item of the specified name from the input metadata.  If
     485 *  out is NULL, a new container is created.
    486486 *
    487487 *  @return bool:       True if successful, otherwise false.
    488488 */
    489 bool psMetadataItemTransfer(
     489bool psMetadataItemSupplement(
    490490    psMetadata *out,                   ///< output Metadata container for copying.
    491491    const psMetadata *in,              ///< Metadata collection from which to copy.
Note: See TracChangeset for help on using the changeset viewer.