GEOS
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geos::TableFormatter Class Reference

abstract class for formatting table data More...

#include <TableFormatter.hpp>

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

Classes

struct  CellLayoutRow
 Represent a row of the Table (header or values) when structured for formatting. More...
 

Public Types

using RowsCellInput = stdVector< stdVector< TableData::CellData > >
 Represent the TableData values.
 
using CellLayoutRows = stdVector< CellLayoutRow >
 Represent a table section (title + header or values) layout: view on the data and its layout settings.
 

Public Member Functions

TableErrorListinggetErrorsList () const
 

Protected Member Functions

 TableFormatter ()
 Construct a default Table Formatter without layout specification (to only insert data in it, without any column / title). Feature is not tested.
 
 TableFormatter (TableLayout const &tableLayout)
 Construct a new Table Formatter from a tableLayout. More...
 
void toStreamImpl (std::ostream &outputStream, string_view content) const
 Implements the actual writing of content to an output stream. Adds appropriate messages to the error list when the operation fails. More...
 

Protected Attributes

PreparedTableLayout const m_tableLayout
 Layout for a table.
 
std::unique_ptr< geos::TableErrorListingm_errors = std::make_unique< geos::TableErrorListing >()
 Class used for listing all errors that may have occured during table generation.
 

Detailed Description

abstract class for formatting table data

Definition at line 33 of file TableFormatter.hpp.

Constructor & Destructor Documentation

◆ TableFormatter()

geos::TableFormatter::TableFormatter ( TableLayout const &  tableLayout)
protected

Construct a new Table Formatter from a tableLayout.

Parameters
tableLayoutContain all tableColumnData names and optionnaly the table title

Member Function Documentation

◆ getErrorsList()

TableErrorListing& geos::TableFormatter::getErrorsList ( ) const
inline
Returns
The Errors List object

Definition at line 57 of file TableFormatter.hpp.

◆ toStreamImpl()

void geos::TableFormatter::toStreamImpl ( std::ostream &  outputStream,
string_view  content 
) const
protected

Implements the actual writing of content to an output stream. Adds appropriate messages to the error list when the operation fails.

Parameters
outputStreamThe stream to write the content to.
contentThe string view containing data to be written.

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