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

A sequential list of arbitrary metadata elements. More...

#include <MetadataList.h>

Inheritance diagram for BUSBOY::MetadataList:
BUSBOY::MetadataElement

Public Member Functions

 MetadataList ()
 
void addElement (const CloneableMetadataElement &element)
 Add an element. More...
 
void addElement (MetadataElement *element)
 Add an element. More...
 
MetadataElementgetElement (size_t index) const
 Returns a pointer to this object's internal copy of the element. More...
 
size_t getSize () const
 
MetadataElement::Type getMetadataElementType () const
 
bool operator== (const MetadataList &list) const
 
bool operator== (const MetadataElement &element) const
 
bool operator!= (const MetadataList &list) const
 
bool operator!= (const MetadataElement &element) const
 
 ~MetadataList ()
 
- 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 MetadataListcastToList (const MetadataElement *element)
 
static MetadataListcastToList (MetadataElement *element)
 
static const MetadataListcastToList (const MetadataElement &element)
 
static MetadataListcastToList (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)
 

Detailed Description

A sequential list of arbitrary metadata elements.

Constructor & Destructor Documentation

BUSBOY::MetadataList::MetadataList ( )
BUSBOY::MetadataList::~MetadataList ( )

Member Function Documentation

void BUSBOY::MetadataList::addElement ( const CloneableMetadataElement element)

Add an element.

This class makes its own copy of the element. The element may be disposed of after the call returns

void BUSBOY::MetadataList::addElement ( MetadataElement element)

Add an element.

The element must be allocated on the heap with new. This class takes ownership of the element and is responsible for deleting it.

const MetadataList * BUSBOY::MetadataList::castToList ( const MetadataElement element)
static
MetadataList * BUSBOY::MetadataList::castToList ( MetadataElement element)
static
const MetadataList & BUSBOY::MetadataList::castToList ( const MetadataElement element)
static
MetadataList & BUSBOY::MetadataList::castToList ( MetadataElement element)
static
MetadataElement * BUSBOY::MetadataList::getElement ( size_t  index) const

Returns a pointer to this object's internal copy of the element.

MetadataElement::Type BUSBOY::MetadataList::getMetadataElementType ( ) const
virtual
size_t BUSBOY::MetadataList::getSize ( ) const
bool BUSBOY::MetadataList::operator!= ( const MetadataList list) const
bool BUSBOY::MetadataList::operator!= ( const MetadataElement element) const
virtual
bool BUSBOY::MetadataList::operator== ( const MetadataList list) const
bool BUSBOY::MetadataList::operator== ( const MetadataElement element) const
virtual

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

Copyright 2014 Google Inc. All rights reserved.