A base class for composite data values.
More...
#include <CompositeData.h>
A base class for composite data values.
- See also
- AbstractData, DataType, ByteArray, DateTime, SimpleData
Definition at line 49 of file CompositeData.h.
te::dt::CompositeData::CompositeData |
( |
| ) |
|
|
inline |
te::dt::CompositeData::CompositeData |
( |
std::size_t |
nComponents | ) |
|
It prepares the internal container for at least nComponents.
- Parameters
-
nComponents | The number of expected components for the composite. |
te::dt::CompositeData::CompositeData |
( |
const std::string & |
name | ) |
|
te::dt::CompositeData::CompositeData |
( |
const CompositeData & |
rhs | ) |
|
Copy constructor.
- Parameters
-
rhs | The right-hand-side composite. |
te::dt::CompositeData::~CompositeData |
( |
| ) |
|
void te::dt::CompositeData::add |
( |
const std::string & |
name, |
|
|
AbstractData * |
value |
|
) |
| |
It adds the value as the last component of the composite data.
- Parameters
-
value | The component value at the specified index. If there is another component at the specified index it will be released. |
- Note
- The component index is 0-based!
It creates a new clone of the composite.
- Returns
- A new clone of the composite. The caller will take its ownership.
Implements te::dt::AbstractData.
int te::dt::CompositeData::getTypeCode |
( |
| ) |
const |
|
inlinevirtual |
AbstractData* te::dt::CompositeData::getValue |
( |
std::size_t |
i | ) |
const |
It returns the i-th component value of the composite data.
- Parameters
-
i | The position index of the component. |
- Returns
- The i-th component value. The caller will not take the ownership of the returned pointer.
- Note
- The component index is 0-based!
Copy constructor.
- Parameters
-
rhs | The right-hand-side composite. |
- Returns
- A reference to this composite.
void te::dt::CompositeData::setName |
( |
const std::string & |
name | ) |
|
void te::dt::CompositeData::setValue |
( |
std::size_t |
i, |
|
|
AbstractData * |
value |
|
) |
| |
It sets the i-th component value of the composite data.
- Parameters
-
i | The position index of the component. |
value | The component value at the specified index. If there is another component at the specified index it will be released. |
- Note
- The component index is 0-based!
- Warning
- Make sure you have prepared the composite for having at least i + 1 components.
std::string te::dt::CompositeData::toString |
( |
| ) |
const |
|
virtual |
It returns the data value in a string representation.
- Returns
- The data value in a string representation.
Implements te::dt::AbstractData.
std::string te::dt::CompositeData::m_name |
|
private |
std::vector<std::string> te::dt::CompositeData::m_names |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/terralib5/src/terralib/datatype/CompositeData.h