AlToolMetaData
Wrapper around tool metadata.
Synopsis
#include <AlToolMetaData.h>
class AlToolMetaData : public AlObject
AlToolMetaData();
virtual ~AlToolMetaData();
virtual AlObject* copyWrapper() const;
virtual statusCode deleteObject();
virtual AlObjectType type() const;
statusCode reset();
int numItems() const;
const char* itemLabel( int i ) const;
const char* itemValue( int i ) const;
statusCode add( const char* label, const char* value );
statusCode replace( const char* label, const char* newValue );
AlToolMetaData::aAlToolMetaData()
Description
Constructor for AlToolMetaData class.
AlToolMetaData::~AlToolMetaData()
Description
Destructor for AlToolMetaData class.
AlObject* AlToolMetaData::copyWrapper() const
Description
Returns an exact copy of the AlToolMetaData wrapper.
statusCode AlToolMetaData::deleteObject()
Description
Deletes the AlToolMetaData wrapper.
Return codes
sSuccess - the object was deleted
sInvalidObject - the locator was invalid
AlObjectType AlToolMetaData::type() const
Description
Returns the class identifier kMetaDataType
.
statusCode AlToolMetaData::reset()
Description
Clear all the metadata entries.
Does not clear the title.
Return Codes
sInvalidObject - this wrapper is invalid.
sSuccess - reset was performed
int AlToolMetaData::numItems() const
Description
Returns the number of meta data items. If this wrapper is invalid -1
will be
returned.
const char* AlToolMetaData::itemLabel( int i ) const
Description
Returns the name of the meta data at location i
. If i
is no valid index,
nullptr
is returned.
Arguments
i - index of the metadata to get.
const char* AlToolMetaData::itemValue( int i ) const
Description
Returns the value of the meta data at location i
. If i
is no valid index,
nullptr
is returned.
statusCode AlToolMetaData::add( const char* label, const char* value )
Description
Add the given (label, value) pair to the metadata. If label
exists, its value
will be updated.
If you want to only update existing entries, use AlToolMetaData::replace
.
Arguments
< label - label of the metadata pair
< value - value for the metadata pair
Return Codes
sInvalidObject - this wrapper is invalid
sSuccess - the metadata was added
statusCode AlToolMetaData::replace( const char* label, const char* newValue )
Description
Replace the given value for the item with the matching label. If no entry was found for label, no new one will be created.
Arguments
< label - label of the metadata pair
< newValue - value to set for the existing label