Isis 3.0 Developer's Reference (API) |
Home |
Format ascii tables. More...
#include <Column.h>
Public Types | |
enum | Align { NoAlign = 0, Right = 1, Left = 2, Decimal = 3 } |
Alignment of data in the Column. More... | |
enum | Type { NoType = 0, Integer = 1, Real = 2, String = 3, Pixel = 4 } |
Type of data in the Column. More... | |
Public Member Functions | |
Column () | |
Constructor. | |
Column (std::string name, int width, Column::Type type, Column::Align align=Right) | |
Constructor with parameter. | |
void | SetName (std::string name) |
Sets the Column name, or header. | |
void | SetWidth (unsigned int width) |
Sets the width of the Column, in text columns. | |
void | SetType (Column::Type type) |
Sets the data type of the Column. | |
void | SetAlignment (Column::Align alignment) |
Sets the alignment of the Column. | |
void | SetPrecision (unsigned int precision) |
Sets the precision of the Column, for real number values. | |
std::string | Name () |
get the Column's name | |
unsigned int | Width () |
get the Column's width | |
Column::Type | DataType () |
Returns the type of data this column will contain. | |
Column::Align | Alignment () |
get the Column's alignment | |
unsigned int | Precision () |
get the Column's precision |
Format ascii tables.
This class takes in a series of string vectors and writes them out to a file as a table. Formatting options are up to the user.
enum Isis::Column::Align |
Alignment of data in the Column.
enum Isis::Column::Type |
Type of data in the Column.
Isis::Column::Column | ( | ) |
Constructor.
Sets the precision for decimal-aligned columns to 4
Isis::Column::Column | ( | std::string | name, | |
int | width, | |||
Column::Type | type, | |||
Column::Align | align = Right | |||
) |
Constructor with parameter.
name | The name of the column, used as the header | |
width | The width (in characters) to make the column | |
type | The type of information the column is to represent | |
align | The alignment, within the column, the data is to conform to |
Column::Align Isis::Column::Alignment | ( | ) | [inline] |
get the Column's alignment
Column::Type Isis::Column::DataType | ( | ) |
Returns the type of data this column will contain.
std::string Isis::Column::Name | ( | ) | [inline] |
get the Column's name
unsigned int Isis::Column::Precision | ( | ) | [inline] |
get the Column's precision
void Isis::Column::SetAlignment | ( | Column::Align | alignment | ) |
void Isis::Column::SetName | ( | std::string | name | ) |
void Isis::Column::SetPrecision | ( | unsigned int | precision | ) |
Sets the precision of the Column, for real number values.
This sets the number of digits after the decimal point, for decimal aligned values. If the Column's alignment is anything else, an error is thrown.
precision | The number of digits after the decimal point to be shown |
void Isis::Column::SetType | ( | Column::Type | type | ) |
void Isis::Column::SetWidth | ( | unsigned int | width | ) |
unsigned int Isis::Column::Width | ( | ) | [inline] |
get the Column's width