USGS

Isis 3.0 Application Source Code Reference

Home

WriteTabular Class Reference

Format ascii tables. More...

#include <WriteTabular.h>

List of all members.

Public Member Functions

 WriteTabular (std::ostream &strm, std::vector< Column > cols)
 Constructor.
 WriteTabular (std::ostream &strm)
 Constructor.
void SetColumns (std::vector< Column > cols)
 Sets the vector of Columns and writes out the first row of the file.
void Write ()
 Writes a blank space in the next column in the current row.
void Write (int item)
 Add an integer value to the next column in this row.
void Write (const char *item)
 Writes a string to the next column in the current row.
void Write (double item)
 Writes a floating-point value out to the next column in the current row.
void SetDelimiter (QString delim)
 Sets the string to be put between columns for this table.
int Columns ()
int Rows ()

Detailed Description

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.

Author:
2007-05-01 Brendan George

Definition at line 42 of file WriteTabular.h.


Constructor & Destructor Documentation

WriteTabular ( std::ostream &  strm,
std::vector< Column >  cols 
)

Constructor.

Parameters:
filename The name of the target file to contain the table, once formatted
cols The Column headers, containing information about the Columns

Definition at line 54 of file WriteTabular.cpp.

WriteTabular ( std::ostream &  strm  ) 

Constructor.

Parameters:
filename The name of the file where the table will be written

Definition at line 42 of file WriteTabular.cpp.


Member Function Documentation

void SetColumns ( std::vector< Column >  cols  ) 

Sets the vector of Columns and writes out the first row of the file.

Parameters:
cols A vector of Columns, setting the format of the table

Definition at line 66 of file WriteTabular.cpp.

void Write (  ) 

Writes a blank space in the next column in the current row.

Definition at line 105 of file WriteTabular.cpp.

void Write ( int  item  ) 

Add an integer value to the next column in this row.

Parameters:
item The integer value to put in this column.

Definition at line 136 of file WriteTabular.cpp.

void Write ( const char *  itemCStr  ) 

Writes a string to the next column in the current row.

Parameters:
item The string to write out

Definition at line 187 of file WriteTabular.cpp.

void Write ( double  item  ) 

Writes a floating-point value out to the next column in the current row.

Parameters:
item The value to be printed out

Definition at line 234 of file WriteTabular.cpp.

void SetDelimiter ( QString  delim  ) 

Sets the string to be put between columns for this table.

Parameters:
delim The string to separate columns

Definition at line 352 of file WriteTabular.cpp.

int Columns (  )  [inline]

Definition at line 55 of file WriteTabular.h.

int Rows (  )  [inline]

Definition at line 58 of file WriteTabular.h.


The documentation for this class was generated from the following files: