BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
BUSBOY::MetadataElement Class Referenceabstract

Base class for the different types of metadata. More...

#include <MetadataElement.h>

Inheritance diagram for BUSBOY::MetadataElement:
BUSBOY::CloneableMetadataElement BUSBOY::MetadataList BUSBOY::MetadataMap BUSBOY::MetadataArray BUSBOY::MetadataField BUSBOY::MetadataKey

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)
 

Detailed Description

Base class for the different types of metadata.

Member Enumeration Documentation

Enumerator
FIELD 

Implemented by MetadataField.

ARRAY 

Implemented by MetadataArray.

LIST 

Implemented by MetadataList.

MAP 

Implemented by MetadataMap.

KEY 

Implemented by MetadataKey.

Member Function Documentation

template<typename T >
template const MetadataMap * BUSBOY::MetadataElement::castElement< MetadataMap > ( const MetadataElement element,
Type  type 
)
staticprotected
template<typename T >
template MetadataMap * BUSBOY::MetadataElement::castElement< MetadataMap > ( MetadataElement element,
Type  type 
)
staticprotected
template<typename T >
template const MetadataMap & BUSBOY::MetadataElement::castElement< MetadataMap > ( const MetadataElement element,
Type  type 
)
staticprotected
template<typename T >
template MetadataMap & BUSBOY::MetadataElement::castElement< MetadataMap > ( MetadataElement element,
Type  type 
)
staticprotected
template<typename T >
const T* BUSBOY::MetadataElement::castElement ( const MetadataElement element,
Type  type 
)
template<typename T >
T* BUSBOY::MetadataElement::castElement ( MetadataElement element,
Type  type 
)
template<typename T >
const T& BUSBOY::MetadataElement::castElement ( const MetadataElement element,
Type  type 
)
template<typename T >
T& BUSBOY::MetadataElement::castElement ( MetadataElement element,
Type  type 
)
MetadataElement::Type BUSBOY::MetadataElement::enumFromString ( std::string  strType)
static

Parses the string equivalent of the enum.

For example: "KEY" –> KEY

std::string BUSBOY::MetadataElement::enumToString ( MetadataElement::Type  type)
static

Returns the string equivalent of the enum.

For example: KEY –> "KEY"

virtual Type BUSBOY::MetadataElement::getMetadataElementType ( ) const
pure virtual
virtual bool BUSBOY::MetadataElement::operator!= ( const MetadataElement element) const
pure virtual
virtual bool BUSBOY::MetadataElement::operator== ( const MetadataElement element) const
pure virtual

The documentation for this class was generated from the following files:

Copyright 2014 Google Inc. All rights reserved.