mermaid::support::data::DataBoxArray Class Reference

Class representing an array of DataBox's. More...

#include <DataBoxArray.hpp>

Inheritance diagram for mermaid::support::data::DataBoxArray:
Inheritance graph
[legend]
Collaboration diagram for mermaid::support::data::DataBoxArray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual DataValueclone ()
 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_

Detailed Description

Class representing an array of DataBox's.

Author:
Marco Barbosa

Definition at line 47 of file DataBoxArray.hpp.


Constructor & Destructor Documentation

DataBoxArray::DataBoxArray ( std::string  typeName  ) 

Default constructor. This initializes the array as dynamic.

Parameters:
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.

Parameters:
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.


Member Function Documentation

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.

Returns:
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.

Returns:
True if the array is dynamic, false otherwise.

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.

Parameters:
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.

Parameters:
box DataBox to be appended.

Reimplemented from mermaid::support::data::DataArray< DataBox >.

Definition at line 84 of file DataBoxArray.cpp.

Generated on Fri Mar 4 22:15:45 2011 for MeRMaID::support by  doxygen 1.6.3