mermaid::support::data::DoubleArray Class Reference

Class representing an array of double values. More...

#include <DoubleArray.hpp>

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

List of all members.

Public Member Functions

virtual DataValueclone ()
 Clone method. This clones the array.
 DoubleArray (int size)
 Constructor. This initializes the array as static, with the given size.
 DoubleArray ()
 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 double array into its string representation.
shared_ptr< Double > & operator[] (const int index)
 Getter. Returns a pointer to the object at a specific position in the array.
void pushBack (shared_ptr< Double > value)
 Operation that adds a data element at the end of the array. This operation is only valid in dynamic arrays.
void pushBack (double d)
 Operation that appends a double value 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< Double > > array_
bool isDynamic_
DataType type_

Detailed Description

Class representing an array of double values.

Author:
Marco Barbosa

Definition at line 47 of file DoubleArray.hpp.


Constructor & Destructor Documentation

DoubleArray::DoubleArray (  ) 

Default constructor. This initializes the array as dynamic.

Definition at line 41 of file DoubleArray.cpp.

DoubleArray::DoubleArray ( int  size  ) 

Constructor. This initializes the array as static, with the given size.

Parameters:
size Size of the static double array.

Definition at line 46 of file DoubleArray.cpp.


Member Function Documentation

DataValue * DoubleArray::clone (  )  [virtual]

Clone method. This clones the array.

Implements mermaid::support::data::DataValue.

Definition at line 57 of file DoubleArray.cpp.

unsigned int mermaid::support::data::DataArray< Double >::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< Double >::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.

DoubleArray::operator std::string (  )  const [virtual]

String cast operation. Converts the double array into its string representation.

Implements mermaid::support::data::DataValue.

Definition at line 62 of file DoubleArray.cpp.

shared_ptr<Double >& mermaid::support::data::DataArray< Double >::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 mermaid::support::data::DataArray< Double >::pushBack ( shared_ptr< Double value  )  [inline, inherited]

Operation that adds a data element at the end of the array. This operation is only valid in dynamic arrays.

Parameters:
value Value to be added at the end of the array.

Definition at line 79 of file DataArray.hpp.

void DoubleArray::pushBack ( double  d  ) 

Operation that appends a double value to the end of the array. This is only valid in dynamic arrays.

Parameters:
d Double value to be appended.

Definition at line 83 of file DoubleArray.cpp.

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