SPH
Public Member Functions | List of all members
Table Class Reference

#include <Table.h>

Public Member Functions

 Table (const Size colSep=1, const Size minColWidth=5)
 Creates an empty table. More...
 
void setCell (const Size colIdx, const Size rowIdx, std::string text)
 Sets the text in given cell. More...
 
Size rowCnt () const
 
Size columnCnt () const
 
std::string toString () const
 Creates the text representation of the table. More...
 

Detailed Description

Definition at line 12 of file Table.h.

Constructor & Destructor Documentation

◆ Table()

Table::Table ( const Size  colSep = 1,
const Size  minColWidth = 5 
)
inline

Creates an empty table.

Parameters
colSepMinimal number of characters between columns.
minColWidthMinimal width of a column; the column gets strethed if needed.

Definition at line 28 of file Table.h.

Member Function Documentation

◆ columnCnt()

Size Table::columnCnt ( ) const
inline

Definition at line 53 of file Table.h.

◆ rowCnt()

Size Table::rowCnt ( ) const
inline

Definition at line 49 of file Table.h.

◆ setCell()

void Table::setCell ( const Size  colIdx,
const Size  rowIdx,
std::string  text 
)
inline

Sets the text in given cell.

If the cell already exists, the previous text is replaced, otherwise a new cell is created, extending the number of cells and rows if needed.

Definition at line 35 of file Table.h.

◆ toString()

std::string Table::toString ( ) const
inline

Creates the text representation of the table.

Definition at line 58 of file Table.h.

Member Data Documentation

◆ colSep

Size Table::colSep

Definition at line 19 of file Table.h.

◆ minColWidth

Size Table::minColWidth

Definition at line 20 of file Table.h.


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