BusBoy
2
|
An array of primitive values of a single type. More...
#include <MetadataArray.h>
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 CloneableMetadataElement * | clone () const |
size_t | getSize () const |
MetadataArray & | operator= (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 MetadataArray * | castToArray (const MetadataElement *element) |
static MetadataArray * | castToArray (MetadataElement *element) |
static const MetadataArray & | castToArray (const MetadataElement &element) |
static MetadataArray & | castToArray (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) |
An array of primitive values of a single type.
This class is immutable. Use is as follows:
Notes on usage:
BUSBOY::MetadataArray::MetadataArray | ( | ) |
BUSBOY::MetadataArray::MetadataArray | ( | const MetadataArray & | array | ) |
BUSBOY::MetadataArray::~MetadataArray | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
virtual |
Implements BUSBOY::CloneableMetadataElement.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
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 |
|
virtual |
Implements BUSBOY::MetadataElement.
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 |
|
virtual |
Implements BUSBOY::MetadataElement.
MetadataArray & BUSBOY::MetadataArray::operator= | ( | const MetadataArray & | array | ) |
bool BUSBOY::MetadataArray::operator== | ( | const MetadataArray & | array | ) | const |
|
virtual |
Implements BUSBOY::MetadataElement.
|
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.
Copyright 2014 Google Inc. All rights reserved.