Class representing an array of DataBox's. More...
#include <DataBoxArray.hpp>
Public Member Functions | |
virtual DataValue * | clone () |
Clone method. This clones the array. | |
DataBoxArray (std::string typeName, int size) | |
Constructor. This initializes the array as static, with the given size. | |
DataBoxArray (std::string typeName) | |
Default constructor. This initializes the array as dynamic. | |
unsigned int | getSize () |
Gives the size of the array. | |
DataType | getType () |
bool | isDynamic () |
Tests if the array is dynamic or not. | |
virtual | operator std::string () const |
String cast operation. Converts the DataBox array into its string representation. | |
shared_ptr< DataBox > & | operator[] (const int index) |
Getter. Returns a pointer to the object at a specific position in the array. | |
void | pushBack (shared_ptr< DataBox > box) |
Operation that appends a DataBox to the end of the array. This is only valid in dynamic arrays. | |
Protected Member Functions | |
void | copyFrom (const DataValue &otherValue) |
Protected Attributes | |
std::vector< shared_ptr < DataBox > > | array_ |
bool | isDynamic_ |
DataType | type_ |
Class representing an array of DataBox's.
Definition at line 47 of file DataBoxArray.hpp.
DataBoxArray::DataBoxArray | ( | std::string | typeName | ) |
Default constructor. This initializes the array as dynamic.
typeName | Name of the type of DataBoxes stored in this array. |
Definition at line 40 of file DataBoxArray.cpp.
DataBoxArray::DataBoxArray | ( | std::string | typeName, | |
int | size | |||
) |
Constructor. This initializes the array as static, with the given size.
typeName | Name of the type of DataBoxes stored in this array. | |
size | Size of the static integer array. |
Definition at line 46 of file DataBoxArray.cpp.
DataValue * DataBoxArray::clone | ( | ) | [virtual] |
Clone method. This clones the array.
Implements mermaid::support::data::DataValue.
Definition at line 57 of file DataBoxArray.cpp.
unsigned int mermaid::support::data::DataArray< DataBox >::getSize | ( | ) | [inline, inherited] |
Gives the size of the array.
Definition at line 99 of file DataArray.hpp.
bool mermaid::support::data::DataArray< DataBox >::isDynamic | ( | ) | [inline, inherited] |
Tests if the array is dynamic or not.
Definition at line 91 of file DataArray.hpp.
DataBoxArray::operator std::string | ( | ) | const [virtual] |
String cast operation. Converts the DataBox array into its string representation.
Implements mermaid::support::data::DataValue.
Definition at line 62 of file DataBoxArray.cpp.
shared_ptr<DataBox >& mermaid::support::data::DataArray< DataBox >::operator[] | ( | const int | index | ) | [inline, inherited] |
Getter. Returns a pointer to the object at a specific position in the array.
index | Position of the array to be accessed. |
Definition at line 71 of file DataArray.hpp.
void DataBoxArray::pushBack | ( | shared_ptr< DataBox > | box | ) |
Operation that appends a DataBox to the end of the array. This is only valid in dynamic arrays.
box | DataBox to be appended. |
Reimplemented from mermaid::support::data::DataArray< DataBox >.
Definition at line 84 of file DataBoxArray.cpp.