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

An array of primitive values of a single type. More...

#include <MetadataArray.h>

Inheritance diagram for BUSBOY::MetadataArray:
BUSBOY::CloneableMetadataElement BUSBOY::MetadataElement

Public Member Functions

 MetadataArray ()
 
 MetadataArray (const MetadataArray &array)
 
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
 
size_t getSize () const
 
MetadataArrayoperator= (const MetadataArray &array)
 
bool operator== (const MetadataArray &array) const
 
bool operator== (const MetadataElement &element) const
 
bool operator!= (const MetadataArray &array) const
 
bool operator!= (const MetadataElement &element) const
 
std::string str ()
 Returns a formatted representation of the array. More...
 
 ~MetadataArray ()
 
std::string * toString () const
 NOTE: The array of returned strings is allocated on the heap with new[] - it should be disposed of with delete[]. More...
 
void toString (std::string *strs) const
 NOTE: The caller must allocate an array of at least getSize() string pointers. More...
 

Static Public Member Functions

static MetadataArray createBoolean (const bool *val, size_t size)
 
static MetadataArray createInteger (const int *val, size_t size)
 
static MetadataArray createByte (const char *val, size_t size)
 
static MetadataArray createFloat (const float *val, size_t size)
 
static MetadataArray createDouble (const double *val, size_t size)
 
static MetadataArray createLongDouble (const long double *val, size_t size)
 
static MetadataArray createString (const char **val, size_t size)
 
static MetadataArray createString (const std::string *val, size_t size)
 
static MetadataArray createSize_t (const size_t *val, size_t size)
 
static MetadataArray parseArray (const std::string *str, Primitive::Type type, size_t size)
 
static const MetadataArraycastToArray (const MetadataElement *element)
 
static MetadataArraycastToArray (MetadataElement *element)
 
static const MetadataArraycastToArray (const MetadataElement &element)
 
static MetadataArraycastToArray (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

An array of primitive values of a single type.

This class is immutable. Use is as follows:

Notes on usage:

Constructor & Destructor Documentation

BUSBOY::MetadataArray::MetadataArray ( )
BUSBOY::MetadataArray::MetadataArray ( const MetadataArray array)
BUSBOY::MetadataArray::~MetadataArray ( )

Member Function Documentation

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

Returns a formatted representation of the array.

The type is followed by a comma separated list of the values.

std::string * BUSBOY::MetadataArray::toString ( ) const

NOTE: The array of returned strings is allocated on the heap with new[] - it should be disposed of with delete[].

void BUSBOY::MetadataArray::toString ( std::string *  strs) const

NOTE: The caller must allocate an array of at least getSize() string pointers.


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

Copyright 2014 Google Inc. All rights reserved.