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::MetadataField Class Reference

A single primitive value. More...

#include <MetadataField.h>

Inheritance diagram for BUSBOY::MetadataField:
BUSBOY::CloneableMetadataElement BUSBOY::MetadataElement

Public Member Functions

 MetadataField ()
 
 MetadataField (const MetadataField &field)
 
bool getBooleanValue () const
 
char getByteValue () const
 
int getIntegerValue () const
 
float getFloatValue () const
 
double getDoubleValue () const
 
long double getLongDoubleValue () const
 
std::string getStringValue () const
 
size_t getSize_tValue () const
 
Primitive::Type getPrimitiveType () const
 
MetadataElement::Type getMetadataElementType () const
 
virtual CloneableMetadataElementclone () const
 
MetadataFieldoperator= (const MetadataField &field)
 
bool operator== (const MetadataField &field) const
 
bool operator== (const MetadataElement &element) const
 
bool operator!= (const MetadataField &field) const
 
bool operator!= (const MetadataElement &element) const
 
std::string str ()
 Returns a formatted representation of the field, including value and type. More...
 
 ~MetadataField ()
 
std::string toString () const
 

Static Public Member Functions

static MetadataField createBoolean (const bool val)
 
static MetadataField createInteger (const int val)
 
static MetadataField createByte (const char val)
 
static MetadataField createFloat (const float val)
 
static MetadataField createDouble (const double val)
 
static MetadataField createLongDouble (const long double val)
 
static MetadataField createString (const char *val)
 
static MetadataField createString (const std::string &val)
 
static MetadataField createSize_t (const size_t val)
 
static MetadataField parseField (const std::string &str, Primitive::Type type)
 
static const MetadataFieldcastToField (const MetadataElement *element)
 
static MetadataFieldcastToField (MetadataElement *element)
 
static const MetadataFieldcastToField (const MetadataElement &element)
 
static MetadataFieldcastToField (MetadataElement &element)
 

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 single primitive value.

This class is immutable. Use is as follows:

Constructor & Destructor Documentation

BUSBOY::MetadataField::MetadataField ( )
BUSBOY::MetadataField::MetadataField ( const MetadataField field)
BUSBOY::MetadataField::~MetadataField ( )

Member Function Documentation

const MetadataField * BUSBOY::MetadataField::castToField ( const MetadataElement element)
static
MetadataField * BUSBOY::MetadataField::castToField ( MetadataElement element)
static
const MetadataField & BUSBOY::MetadataField::castToField ( const MetadataElement element)
static
MetadataField & BUSBOY::MetadataField::castToField ( MetadataElement element)
static
CloneableMetadataElement * BUSBOY::MetadataField::clone ( ) const
virtual
MetadataField BUSBOY::MetadataField::createBoolean ( const bool  val)
static
MetadataField BUSBOY::MetadataField::createByte ( const char  val)
static
MetadataField BUSBOY::MetadataField::createDouble ( const double  val)
static
MetadataField BUSBOY::MetadataField::createFloat ( const float  val)
static
MetadataField BUSBOY::MetadataField::createInteger ( const int  val)
static
MetadataField BUSBOY::MetadataField::createLongDouble ( const long double  val)
static
MetadataField BUSBOY::MetadataField::createSize_t ( const size_t  val)
static
MetadataField BUSBOY::MetadataField::createString ( const char *  val)
static
MetadataField BUSBOY::MetadataField::createString ( const std::string &  val)
static
bool BUSBOY::MetadataField::getBooleanValue ( ) const
char BUSBOY::MetadataField::getByteValue ( ) const
double BUSBOY::MetadataField::getDoubleValue ( ) const
float BUSBOY::MetadataField::getFloatValue ( ) const
int BUSBOY::MetadataField::getIntegerValue ( ) const
long double BUSBOY::MetadataField::getLongDoubleValue ( ) const
MetadataElement::Type BUSBOY::MetadataField::getMetadataElementType ( ) const
virtual
Primitive::Type BUSBOY::MetadataField::getPrimitiveType ( ) const
size_t BUSBOY::MetadataField::getSize_tValue ( ) const
std::string BUSBOY::MetadataField::getStringValue ( ) const
bool BUSBOY::MetadataField::operator!= ( const MetadataField field) const
bool BUSBOY::MetadataField::operator!= ( const MetadataElement element) const
virtual
MetadataField & BUSBOY::MetadataField::operator= ( const MetadataField field)
bool BUSBOY::MetadataField::operator== ( const MetadataField field) const
bool BUSBOY::MetadataField::operator== ( const MetadataElement element) const
virtual
MetadataField BUSBOY::MetadataField::parseField ( const std::string &  str,
Primitive::Type  type 
)
static
std::string BUSBOY::MetadataField::str ( )

Returns a formatted representation of the field, including value and type.

std::string BUSBOY::MetadataField::toString ( ) const

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

Copyright 2014 Google Inc. All rights reserved.