code::DataSlice Class Reference

Inheritance diagram for code::DataSlice:

code::DataField List of all members.

Detailed Description

A set of columns corresponding to the same field.

DataHistory uses this type in order to arrange its data by slice.

Author:
Thomas E. Vaughan (original)
Author
lakshman
Date
2009/06/02 20:17:37


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< DataColumncolumn (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.


Member Typedef Documentation

typedef std::vector< SmartPtr< std::vector< std::string > > > code::DataSlice::StorageType

Short-hand.


Constructor & Destructor Documentation

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.


Member Function Documentation

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]

Return a completely separate copy of this field.

Reimplemented in code::DataColumn.

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.


Friends And Related Function Documentation

bool operator< ( const DataField a,
const DataField b 
) [friend, inherited]

Allows you to sort DataField objects by their name.


Member Data Documentation

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.


Generated on Fri May 4 13:40:11 2012 for WDSS-IIw2 by  doxygen 1.4.7