class for CSV formatting
More...
#include <TableFormatter.hpp>
class for CSV formatting
Definition at line 91 of file TableFormatter.hpp.
◆ TableCSVFormatter()
geos::TableCSVFormatter::TableCSVFormatter |
( |
TableLayout const & |
tableLayout | ) |
|
Construct a new Table Formatter from a tableLayout.
- Parameters
-
tableLayout | Contain all tableColumnData names and optionnaly the table title |
◆ dataToStream()
void geos::TableCSVFormatter::dataToStream |
( |
std::ostream & |
outputStream, |
|
|
TableData const & |
tableData |
|
) |
| const |
|
inline |
Output the formatted data to a stream. Adds appropriate messages to the error list when the operation fails.
- See also
- toString( DATASOURCE const & tableData )
- Parameters
-
tableData | The table data |
outputStream | The stream to write the content to. |
Definition at line 155 of file TableFormatter.hpp.
◆ dataToString()
string geos::TableCSVFormatter::dataToString |
( |
TableData const & |
tableData | ) |
const |
Convert the table data to a CSV string..
- Parameters
-
- Returns
- The CSV string representation of the table data.
◆ headerToStream()
void geos::TableCSVFormatter::headerToStream |
( |
std::ostream & |
outputStream | ) |
const |
|
inline |
Output the formatted data to a stream. Adds appropriate messages to the error list when the operation fails.
- See also
- toString( DATASOURCE const & tableData )
- Parameters
-
outputStream | The stream to write the content to. |
Definition at line 146 of file TableFormatter.hpp.
◆ headerToString()
string geos::TableCSVFormatter::headerToString |
( |
| ) |
const |
- Returns
- The string with all tableColumnData names.
◆ showErrors()
void geos::TableCSVFormatter::showErrors |
( |
bool |
cond | ) |
|
|
inline |
Indicate if we print the encountered errors on destruction. Enabled by default.
- Parameters
-
cond | The boolean to turn on/off log errors |
Definition at line 173 of file TableFormatter.hpp.
◆ toStream()
template<typename DATASOURCE >
void geos::TableCSVFormatter::toStream |
( |
std::ostream & |
outputStream, |
|
|
DATASOURCE const & |
tableData |
|
) |
| const |
|
inline |
Output the formatted data to a stream. Adds appropriate messages to the error list when the operation fails.
- See also
- toString( DATASOURCE const & tableData )
- Template Parameters
-
DATASOURCE | The source to convert |
- Parameters
-
tableData | The data source to convert |
outputStream | The stream to write the content to. |
Definition at line 166 of file TableFormatter.hpp.
◆ toString() [1/3]
template<typename DATASOURCE >
string geos::TableCSVFormatter::toString |
( |
DATASOURCE const & |
tableData | ) |
const |
Convert a data source to a CSV string.
- Template Parameters
-
DATASOURCE | The type of the source to convert |
- Parameters
-
tableData | The data source to convert |
- Returns
- The CSV string representation of a data source.
◆ toString() [2/3]
template<>
string geos::TableCSVFormatter::toString |
( |
TableData const & |
tableData | ) |
const |
Convert the TableData to a CSV string.
- Parameters
-
- Returns
- The CSV string representation of the TableData.
◆ toString() [3/3]
Template specialisation to convert a TableFunction to a table string.
- Parameters
-
- Returns
- The table string representation of the TableFunction.
The documentation for this class was generated from the following files: