GEOS
Public Member Functions | List of all members
geos::TableTextFormatter Class Reference

class for log formatting More...

#include <TableFormatter.hpp>

Inheritance diagram for geos::TableTextFormatter:
Inheritance graph
[legend]

Public Member Functions

 TableTextFormatter ()
 Construct a new TableFormatter.
 
 TableTextFormatter (TableLayout const &tableLayout)
 Construct a new TableFormatter from a tableLayout. More...
 
string toString () const
 
template<typename DATASOURCE >
string toString (DATASOURCE const &tableData) const
 Convert a data source to a table string. More...
 
template<>
string toString (TableData const &tableData) const
 Convert a TableData to a table string. More...
 
template<>
string toString (TableFunction const &tableData) const
 Template specialisation to convert a TableFunction to a CSV string. More...
 

Additional Inherited Members

- Public Types inherited from geos::TableFormatter
using RowsCellInput = std::vector< std::vector< TableData::CellData > >
 Represent the TableData values.
 
using CellLayoutRows = std::vector< std::vector< TableLayout::CellLayout > >
 Represent the Table (header or values) structured.
 
- Protected Member Functions inherited from geos::TableFormatter
 TableFormatter (TableLayout const &tableLayout)
 Construct a new Table Formatter from a tableLayout. More...
 
- Protected Attributes inherited from geos::TableFormatter
TableLayout m_tableLayout
 Layout for a table.
 

Detailed Description

class for log formatting

Definition at line 112 of file TableFormatter.hpp.

Constructor & Destructor Documentation

◆ TableTextFormatter()

geos::TableTextFormatter::TableTextFormatter ( TableLayout const &  tableLayout)

Construct a new TableFormatter from a tableLayout.

Parameters
tableLayoutContain all tableColumnData names and optionnaly the table title

Member Function Documentation

◆ toString() [1/4]

string geos::TableTextFormatter::toString ( ) const
Returns
A TableLayout string representation, The TableTextFormatter receives hasn't receive any data, so only the header part is returned.

◆ toString() [2/4]

template<typename DATASOURCE >
string geos::TableTextFormatter::toString ( DATASOURCE const &  tableData) const

Convert a data source to a table string.

Parameters
tableDataThe data source to convert.
Returns
The table string representation of the TableData.

◆ toString() [3/4]

template<>
string geos::TableTextFormatter::toString ( TableData const &  tableData) const

Convert a TableData to a table string.

Parameters
tableDataThe TableData to convert.
Returns
The table string representation of the TableData.

◆ toString() [4/4]

template<>
string geos::TableTextFormatter::toString ( TableFunction const &  tableData) const

Template specialisation to convert a TableFunction to a CSV string.

Parameters
tableDataThe TableFunction object to convert.
Returns
The CSV string representation of the TableFunction.

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