#include <metadataHolder.h>
Public Member Functions | |
AdditionalMetadataHolder (const MetadataHolder &primary, bool invert=false) | |
virtual const Metadata & | getMeta (const std::string &key, bool searchDefaults=true, bool searchSecondary=true) const |
Returns Metadata of the specified key. | |
virtual bool | hasMeta (const std::string &key, bool searchDefaults=true, bool searchSecondary=true) const |
Asks the wrapper and the wrapped MetadataHolder instance if they contain metadata of the specified key. |
This class can be used to specify additional metadata to an existing MetadataHolder instance if we don't want to modify its contents.
iopc::AdditionalMetadataHolder::AdditionalMetadataHolder | ( | const MetadataHolder & | primary, | |
bool | invert = false | |||
) | [inline] |
primary | The MetadataHolder instance being wrapped | |
invert | Specifies the search order. If invert is false (by default), the wrapped instance is searched first, otherwise this wrapper is searched before the wrapped MetadataHolder. |
virtual const Metadata& iopc::AdditionalMetadataHolder::getMeta | ( | const std::string & | key, | |
bool | searchDefaults = true , |
|||
bool | searchSecondary = true | |||
) | const [virtual] |
Returns Metadata of the specified key.
key | Key of the requested metadata | |
searchDefaults | Allows to skip the default metadata search | |
searchSecondary | Allows to skip the secondary location of both this wrapper and the wrapped MetadataHolder instance |
IopcIncorrectUsageException | if no metadata of such key is found |
Reimplemented from iopc::MetadataHolder.
bool iopc::AdditionalMetadataHolder::hasMeta | ( | const std::string & | key, | |
bool | searchDefaults = true , |
|||
bool | searchSecondary = true | |||
) | const [virtual] |
Asks the wrapper and the wrapped MetadataHolder instance if they contain metadata of the specified key.
key | Key of the requested metadata | |
searchDefaults | Allows to skip the default metadata search | |
searchSecondary | Allows to skip the secondary location metadata search |
Reimplemented from iopc::MetadataHolder.