BusBoy
2
|
Base class for the different types of metadata. More...
#include <MetadataElement.h>
Public Types | |
enum | Type { FIELD, ARRAY, LIST, MAP, KEY } |
Public Member Functions | |
virtual Type | getMetadataElementType () const =0 |
virtual bool | operator== (const MetadataElement &element) const =0 |
virtual bool | operator!= (const MetadataElement &element) const =0 |
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 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... | |
Static Protected Member Functions | |
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) |
Base class for the different types of metadata.
Enumerator | |
---|---|
FIELD |
Implemented by MetadataField. |
ARRAY |
Implemented by MetadataArray. |
LIST |
Implemented by MetadataList. |
MAP |
Implemented by MetadataMap. |
KEY |
Implemented by MetadataKey. |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
const T* BUSBOY::MetadataElement::castElement | ( | const MetadataElement * | element, |
Type | type | ||
) |
T* BUSBOY::MetadataElement::castElement | ( | MetadataElement * | element, |
Type | type | ||
) |
const T& BUSBOY::MetadataElement::castElement | ( | const MetadataElement & | element, |
Type | type | ||
) |
T& BUSBOY::MetadataElement::castElement | ( | MetadataElement & | element, |
Type | type | ||
) |
|
static |
Parses the string equivalent of the enum.
For example: "KEY" –> KEY
|
static |
Returns the string equivalent of the enum.
For example: KEY –> "KEY"
|
pure virtual |
Implemented in BUSBOY::MetadataArray, BUSBOY::MetadataField, BUSBOY::MetadataMap, BUSBOY::MetadataList, and BUSBOY::MetadataKey.
|
pure virtual |
Implemented in BUSBOY::MetadataArray, BUSBOY::MetadataField, BUSBOY::MetadataMap, BUSBOY::MetadataList, and BUSBOY::MetadataKey.
|
pure virtual |
Implemented in BUSBOY::MetadataArray, BUSBOY::MetadataField, BUSBOY::MetadataMap, BUSBOY::MetadataList, and BUSBOY::MetadataKey.
Copyright 2014 Google Inc. All rights reserved.