code::DataField Class Reference

Inheritance diagram for code::DataField:

code::DataCell code::DataColumn code::DataSlice List of all members.

Detailed Description

A field in a DataRow or DataTable.

The descendant 'DataCell' represents a field in a DataRow. The descendant 'DataColumn' represents a field in a DataTable.

Each descendant stores data internally as one or more string values. Numeric accessors and mutators perform the necessary conversions.

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


Public Member Functions

DataField clone () const
 Return a completely separate copy of this field.
 DataField ()
 Build an uninitialized object.
 DataField (const std::string &name, const std::string &unit)
 Allow for the initialization of all four members.
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

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.


Constructor & Destructor Documentation

code::DataField::DataField (  )  [inline]

Build an uninitialized object.

code::DataField::DataField ( const std::string &  name,
const std::string &  unit 
)

Allow for the initialization of all four members.


Member Function Documentation

DataField code::DataField::clone (  )  const [inline]

Return a completely separate copy of this field.

Reimplemented in code::DataColumn.

const std::string& code::DataField::name (  )  const [inline]

Return field ID.

const std::string& code::DataField::unit (  )  const [inline]

Return default unit specifier.

bool code::DataField::validUnit ( const std::string &  unit  )  const

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]

Allows you to sort DataField objects by their name.


Member Data Documentation

const size_t code::DataField::bufferSize = 4096 [static]

Size of character buffer used internally for sprintf().

std::string code::DataField::myName [protected]

Field name.

std::string code::DataField::myUnit [protected]

Default unit specifier.


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