Frobby  0.9.5
Classes | Public Member Functions | Private Attributes | List of all members
ColumnPrinter Class Reference

#include <ColumnPrinter.h>

Classes

struct  Col
 

Public Member Functions

 ColumnPrinter (size_t columnCount=0)
 
void setPrefix (const string &prefix)
 
void addColumn (bool flushLeft=true, const string &prefix=" ", const string &suffix="")
 
size_t getColumnCount () const
 
ostream & operator[] (size_t col)
 
void print (ostream &out) const
 
void print (FrobbyStringStream &out) const
 

Private Attributes

vector< Col * > _cols
 
ElementDeleter< vector< Col * > > _colsDeleter
 
string _prefix
 

Detailed Description

Definition at line 27 of file ColumnPrinter.h.

Constructor & Destructor Documentation

◆ ColumnPrinter()

ColumnPrinter::ColumnPrinter ( size_t  columnCount = 0)

Definition at line 38 of file ColumnPrinter.cpp.

Member Function Documentation

◆ addColumn()

void ColumnPrinter::addColumn ( bool  flushLeft = true,
const string &  prefix = "  ",
const string &  suffix = "" 
)

Definition at line 51 of file ColumnPrinter.cpp.

◆ getColumnCount()

size_t ColumnPrinter::getColumnCount ( ) const

Definition at line 61 of file ColumnPrinter.cpp.

◆ operator[]()

ostream & ColumnPrinter::operator[] ( size_t  col)

Definition at line 65 of file ColumnPrinter.cpp.

◆ print() [1/2]

void ColumnPrinter::print ( FrobbyStringStream out) const

Definition at line 134 of file ColumnPrinter.cpp.

◆ print() [2/2]

void ColumnPrinter::print ( ostream &  out) const

Definition at line 70 of file ColumnPrinter.cpp.

◆ setPrefix()

void ColumnPrinter::setPrefix ( const string &  prefix)

Definition at line 47 of file ColumnPrinter.cpp.

Member Data Documentation

◆ _cols

vector<Col*> ColumnPrinter::_cols
private

Definition at line 48 of file ColumnPrinter.h.

◆ _colsDeleter

ElementDeleter<vector<Col*> > ColumnPrinter::_colsDeleter
private

Definition at line 49 of file ColumnPrinter.h.

◆ _prefix

string ColumnPrinter::_prefix
private

Definition at line 50 of file ColumnPrinter.h.


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