class to format data in tabular form More...
#include "utl/TabularStream.h"
Public Member Functions | |
void | Clear () |
void | Clear (const std::string &format) |
template<typename T > | |
TabularStream & | operator<< (const T &junk) |
TabularStream & | operator<< (const EndColumn) |
TabularStream & | operator<< (const EndRow) |
TabularStream & | operator<< (const HLine hl) |
TabularStream & | operator<< (const DeleteRow) |
std::string | Str () |
TabularStream (const std::string &format) | |
Private Types | |
typedef std::vector< TableColumn > | Columns |
Private Member Functions | |
void | CheckFirst () |
void | MakeFormat (const std::string &format) |
void | NextColumn () |
void | NextRow () |
Private Attributes | |
Columns | fColumns |
Columns::iterator | fCurrentColumn |
bool | fMakeNewRow |
class to format data in tabular form
gives you
Use "endc" to end filling the current cell, use "endr" to end a row. Filling the TabularStream in a for-loop will produce one "endr" too many. Use "delr" to delete the last row (useful if one line too many is added in loops). More lines around columns or rows you can add as in the following example:
which produces
Note that every row of the table will be terminated with a newline.
In short, "endc" has the same meaning as "&" in LaTeX tabular environment, "endr" behaves as LaTeX newline "\\", and "hline" even has the same name...
Definition at line 192 of file TabularStream.h.
|
private |
Definition at line 275 of file TabularStream.h.
|
inline |
Definition at line 194 of file TabularStream.h.
References Clear().
|
inlineprivate |
Definition at line 248 of file TabularStream.h.
References fMakeNewRow, and NextRow().
Referenced by operator<<().
|
inline |
Definition at line 197 of file TabularStream.h.
References fColumns, and fMakeNewRow.
Referenced by Clear(), and TabularStream().
|
inline |
Definition at line 199 of file TabularStream.h.
References Clear(), and MakeFormat().
|
private |
Definition at line 148 of file TabularStream.cc.
References RdGeoCeLDFFitter::c, utl::TableCell::eCenter, utl::TableCell::eCharAligned, utl::TableCell::eFlushLeft, and utl::TableCell::eFlushRight.
Referenced by Clear().
|
inlineprivate |
Definition at line 257 of file TabularStream.h.
References ERROR, fColumns, and fCurrentColumn.
Referenced by operator<<().
|
inlineprivate |
Definition at line 267 of file TabularStream.h.
References fColumns, and fCurrentColumn.
Referenced by CheckFirst(), and operator<<().
|
inline |
Definition at line 204 of file TabularStream.h.
References CheckFirst(), and fCurrentColumn.
|
inline |
Definition at line 211 of file TabularStream.h.
References CheckFirst(), and NextColumn().
|
inline |
Definition at line 214 of file TabularStream.h.
References CheckFirst(), and NextRow().
|
inline |
Definition at line 218 of file TabularStream.h.
References CheckFirst(), fColumns, fCurrentColumn, fMakeNewRow, and utl::HLine::GetChar().
|
inline |
Definition at line 233 of file TabularStream.h.
References fColumns, and fMakeNewRow.
string TabularStream::Str | ( | ) |
Definition at line 185 of file TabularStream.cc.
Referenced by fwk::RunController::FinishBranch(), utl::Deprecator::GetReport(), main(), and utl::operator<<().
|
private |
Definition at line 277 of file TabularStream.h.
Referenced by Clear(), NextColumn(), NextRow(), and operator<<().
|
private |
Definition at line 276 of file TabularStream.h.
Referenced by NextColumn(), NextRow(), and operator<<().
|
private |
Definition at line 278 of file TabularStream.h.
Referenced by CheckFirst(), Clear(), and operator<<().