Inheritance diagram for code::DataSlice:
DataHistory uses this type in order to arrange its data by slice.
Public Types | |
typedef std::vector< SmartPtr< std::vector< std::string > > > | StorageType |
Short-hand. | |
Public Member Functions | |
DataSlice (const DataColumn &dataColumn) | |
Make a DataSlice from a DataColumn. | |
DataSlice (const std::string &name="SomeSlice", const std::string &unit="dimensionless") | |
Make an empty slice. | |
bool | append (DataColumn &dataColumn) |
Append a DataColumn to the end of this DataSlice. | |
size_t | size () const |
Return the number of elements in this column. | |
SmartPtr< DataColumn > | column (size_t offset) const |
Return the DataColumn at a particular offset in this DataSlice. | |
DataField | clone () const |
Return a completely separate copy of this field. | |
const std::string & | name () const |
Return field ID. | |
const std::string & | unit () const |
Return default unit specifier. | |
bool | validUnit (const std::string &unit) const |
Return true only if the internal unit can be converted to the specified unit. | |
Static Public Attributes | |
static const size_t | bufferSize = 4096 |
Size of character buffer used internally for sprintf(). | |
Protected Attributes | |
StorageType | myData |
Data. | |
std::string | myName |
Field name. | |
std::string | myUnit |
Default unit specifier. | |
Friends | |
bool | operator< (const DataField &a, const DataField &b) |
Allows you to sort DataField objects by their name. |
typedef std::vector< SmartPtr< std::vector< std::string > > > code::DataSlice::StorageType |
Short-hand.
code::DataSlice::DataSlice | ( | const DataColumn & | dataColumn | ) |
Make a DataSlice from a DataColumn.
code::DataSlice::DataSlice | ( | const std::string & | name = "SomeSlice" , |
|
const std::string & | unit = "dimensionless" | |||
) |
Make an empty slice.
bool code::DataSlice::append | ( | DataColumn & | dataColumn | ) |
Append a DataColumn to the end of this DataSlice.
Return false on failed unit conversion; otherwise, return true.
DataField code::DataField::clone | ( | ) | const [inline, inherited] |
SmartPtr< DataColumn > code::DataSlice::column | ( | size_t | offset | ) | const |
Return the DataColumn at a particular offset in this DataSlice.
Return NULL pointer on illegal offset.
const std::string& code::DataField::name | ( | ) | const [inline, inherited] |
Return field ID.
size_t code::DataSlice::size | ( | ) | const |
Return the number of elements in this column.
const std::string& code::DataField::unit | ( | ) | const [inline, inherited] |
Return default unit specifier.
bool code::DataField::validUnit | ( | const std::string & | unit | ) | const [inherited] |
Return true only if the internal unit can be converted to the specified unit.
Allows you to sort DataField objects by their name.
const size_t code::DataField::bufferSize = 4096 [static, inherited] |
Size of character buffer used internally for sprintf().
StorageType code::DataSlice::myData [protected] |
Data.
std::string code::DataField::myName [protected, inherited] |
Field name.
std::string code::DataField::myUnit [protected, inherited] |
Default unit specifier.