Luiza
v03-01
|
Table column class for different content types. More...
#include <GloriaTableColumn.h>
Public Member Functions | |
vector< T > & | Data () |
Direct access to the data stored in the table. | |
T & | At (int i) |
Direct access to single cell. | |
T & | EmptyVal () |
Element used to initialize empty cells when new row is added. | |
int | Size () |
Column size (size of vector storing column elements) | |
void | Clear () |
Clear column (clear vector of column elements) | |
void | Push_Back (T val) |
Add element to the column. | |
void | AddRow () |
Add empty cell at the end of the column. | |
void | Resize (int Nrow) |
Resize column to given number of rows. | |
void | DeleteRow (int iRow) |
Delete given cell. | |
int | ValSize (int i) |
Returns size of given cell. More... | |
long | LongVal (int i, int j=0) |
Return value of element stored in given cell as long. More... | |
double | DoubleVal (int i, int j=0) |
Return value of element stored in given cell as double. More... | |
string | StringVal (int i) |
Return element stored in given cell as string. More... | |
string | StringVal (int i, int j) |
Return element stored in given cell as string. More... | |
GloriaTableColumn * | Clone () |
Return pointer to column copy. | |
GloriaTableColumn * | EmptyClone () |
Return pointer to empty column duplicate. | |
void | CopyCellValue (GloriaTableColumn *source, int isource, int itarget=-1) |
Copy cell content from other column. | |
long * | CreateSortIndex (bool reverse=false) |
Generate list of cell indexes ordered by cell value. | |
void | SortByIndex (long *index) |
Sort column cells according to the index table. | |
Public Member Functions inherited from gloria::GloriaTableColumn | |
string & | Name () |
Column name. Used to address columns in the table. | |
string & | Unit () |
Units for values stored in this column. | |
string & | Comment () |
Column comment, can be used to store additional information. | |
TableColumnType & | Type () |
Column type defining type of elements stored. | |
string | TypeName () |
Column type name (string) for elements stored. | |
Table column class for different content types.
|
virtual |
Return value of element stored in given cell as double.
Can be used for all column types except StringColumn (if this case 0. is returned). Second argument is used only if cell is a vector. Integers are converted to floats.
Implements gloria::GloriaTableColumn.
|
virtual |
Return value of element stored in given cell as long.
Can be used only for LongColumn or LongVectorColumn. For other column types 0 is returned. Second argument is used only if cell is a vector.
Implements gloria::GloriaTableColumn.
|
virtual |
Return element stored in given cell as string.
If cell contains a vector all elements are included, separated by space (' '). If unit is defined it is appended at the end of the sting.
Implements gloria::GloriaTableColumn.
|
virtual |
Return element stored in given cell as string.
If cell contains a vector only one vector element (indicated by second argument) is returned. If unit is defined it is appended at the end of the sting.
Implements gloria::GloriaTableColumn.
|
virtual |
Returns size of given cell.
Returns:
Implements gloria::GloriaTableColumn.