Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages   Examples  

Table Class Reference
[Utilities]


Detailed Description

Container for reported data.

Author:
Ralf Gerstenberger

See also:
TableDefinition Report
All data are reported in tables. The structure of a Table is defined by a TableDefinition. A Table cannot be created manually. To get a Table the user has to use a Report object.

Since:
1.0


Public Member Functions

Table attributes
const char * getLabel () const
 get Label of table

long getNumberOfLines () const
 get number of lines in table

long getNumberOfColumns () const
 get number of columns in table

const char * getLabelOfColumn (unsigned long i) const
 get column labels

ColumnType getTypeOfColumn (unsigned long i) const
 get column types

Output random access
Get the data of a specific field in table.

long getINTEGER (unsigned long col, unsigned long line)
 Get INTEGER value from field (col, line).

double getREAL (unsigned long col, unsigned long line)
 Get REAL value from field (col, line).

std::string getSTRING (unsigned long col, unsigned long line)
 Get STRING value from field (col, line).


Friends

class odemx::Report
Input streaming
The data can be entered into a table in a streaming like fashion. The data type has to match the column type. CtrlCode can be used to skip columns or the rest of a line. Skipped columns are filed with default data (0, 0.0, "");

Table & operator<< (Table &t, int d)
 enter int value

Table & operator<< (Table &t, unsigned int d)
 enter unsigned int value

Table & operator<< (Table &t, long d)
 enter long value

Table & operator<< (Table &t, unsigned long d)
 enter unsigned long value

Table & operator<< (Table &t, float d)
 enter float value

Table & operator<< (Table &t, double d)
 enter double value

Table & operator<< (Table &t, std::string d)
 enter std::string value

Table & operator<< (Table &t, const char *d)
 enter const char* value

Table & operator<< (Table &t, CtrlCode d)
 enter control codes

Output streaming
The data of a table can be read in a streaming like fashion. The data type has to match the column type.

Table & operator>> (Table &t, long &d)
 read long value

Table & operator>> (Table &t, double &d)
 read double value

Table & operator>> (Table &t, std::string &d)
 read std::string value


Member Function Documentation

long getINTEGER unsigned long  col,
unsigned long  line
 

Get INTEGER value from field (col, line).

Note:
Column col must be an INTEGER column.

double getREAL unsigned long  col,
unsigned long  line
 

Get REAL value from field (col, line).

Note:
Column col must be an INTEGER or a REAL column.

std::string getSTRING unsigned long  col,
unsigned long  line
 

Get STRING value from field (col, line).

Note:
Type conversion from INTEGER to STRING and from REAL to STRING is done if required.


Generated on Mon Aug 11 10:36:07 2003 for ODEMx by doxygen1.3