BusBoy
2
|
A map of names to arbitrary metadata elements. More...
#include <MetadataMap.h>
Public Member Functions | |
MetadataMap () | |
void | putElement (const std::string &name, const CloneableMetadataElement &element) |
Assign an element to a name. More... | |
void | putElement (const std::string &name, MetadataElement *element) |
Assign an element to a name. More... | |
MetadataElement * | getElement (const std::string &name) const |
Returns a pointer to this object's internal copy of the element. More... | |
bool | contains (const std::string &name) const |
size_t | getSize () const |
std::set< std::string > | getAllNames () const |
MetadataElement::Type | getMetadataElementType () const |
bool | operator== (const MetadataMap &map) const |
bool | operator== (const MetadataElement &element) const |
bool | operator!= (const MetadataMap &map) const |
bool | operator!= (const MetadataElement &element) const |
~MetadataMap () | |
Public Member Functions inherited from BUSBOY::MetadataElement | |
template<typename T > | |
const T * | castElement (const MetadataElement *element, Type type) |
template<typename T > | |
T * | castElement (MetadataElement *element, Type type) |
template<typename T > | |
const T & | castElement (const MetadataElement &element, Type type) |
template<typename T > | |
T & | castElement (MetadataElement &element, Type type) |
Static Public Member Functions | |
static const MetadataMap * | castToMap (const MetadataElement *element) |
static MetadataMap * | castToMap (MetadataElement *element) |
static const MetadataMap & | castToMap (const MetadataElement &element) |
static MetadataMap & | castToMap (MetadataElement &element) |
Static Public Member Functions inherited from BUSBOY::MetadataElement | |
static Type | enumFromString (std::string strType) |
Parses the string equivalent of the enum. More... | |
static std::string | enumToString (Type type) |
Returns the string equivalent of the enum. More... | |
Additional Inherited Members | |
Public Types inherited from BUSBOY::MetadataElement | |
enum | Type { FIELD, ARRAY, LIST, MAP, KEY } |
Static Protected Member Functions inherited from BUSBOY::MetadataElement | |
template<typename T > | |
static const T * | castElement (const MetadataElement *element, Type type) |
template<typename T > | |
static T * | castElement (MetadataElement *element, Type type) |
template<typename T > | |
static const T & | castElement (const MetadataElement &element, Type type) |
template<typename T > | |
static T & | castElement (MetadataElement &element, Type type) |
A map of names to arbitrary metadata elements.
BUSBOY::MetadataMap::MetadataMap | ( | ) |
BUSBOY::MetadataMap::~MetadataMap | ( | ) |
|
static |
|
static |
|
static |
|
static |
bool BUSBOY::MetadataMap::contains | ( | const std::string & | name | ) | const |
std::set< std::string > BUSBOY::MetadataMap::getAllNames | ( | ) | const |
MetadataElement * BUSBOY::MetadataMap::getElement | ( | const std::string & | name | ) | const |
Returns a pointer to this object's internal copy of the element.
|
virtual |
Implements BUSBOY::MetadataElement.
size_t BUSBOY::MetadataMap::getSize | ( | ) | const |
bool BUSBOY::MetadataMap::operator!= | ( | const MetadataMap & | map | ) | const |
|
virtual |
Implements BUSBOY::MetadataElement.
bool BUSBOY::MetadataMap::operator== | ( | const MetadataMap & | map | ) | const |
|
virtual |
Implements BUSBOY::MetadataElement.
void BUSBOY::MetadataMap::putElement | ( | const std::string & | name, |
const CloneableMetadataElement & | element | ||
) |
Assign an element to a name.
This class makes its own copy of the element. The element may be disposed of after the call returns
void BUSBOY::MetadataMap::putElement | ( | const std::string & | name, |
MetadataElement * | element | ||
) |
Assign an element to a name.
The element must be allocated on the heap with new. This class takes ownership of the element and is responsible for deleting it.
Copyright 2014 Google Inc. All rights reserved.