preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Table Class Reference

#include <TableWriter.hpp>

Collaboration diagram for Table:
[legend]

Public Member Functions

 Table ()
 
 Table (std::ostream &out)
 
template<class... T>
void addColumn (T &&... arg)
 Adds a column of given name, width and float precision.
 
void printHeader ()
 Prints the formatted header.
 
template<class... Ts>
void printRow (Ts... args)
 Prints a line, accepting arbitrary arguments.
 
template<class T , class... Ts>
void printRow (size_t index, T a, Ts... args)
 Prints a ostream convertible type.
 
template<class Rep , class Period , class... Ts>
void printRow (size_t index, std::chrono::duration< Rep, Period > duration, Ts... args)
 Prints a duration as milliseconds.
 
template<class T >
void printRow (size_t index, T a)
 Recursion anchor, prints the last entry and the endl.
 

Public Attributes

std::vector< Columncols
 
std::string sepChar = "|"
 
char padding = ' '
 
std::ostreamout = std::cout
 

Detailed Description

Definition at line 26 of file TableWriter.hpp.

Constructor & Destructor Documentation

◆ Table() [1/2]

Table::Table ( )

Definition at line 30 of file TableWriter.cpp.

◆ Table() [2/2]

Table::Table ( std::ostream & out)

Definition at line 35 of file TableWriter.cpp.

Member Function Documentation

◆ addColumn()

template<class... T>
void Table::addColumn ( T &&... arg)
inline

Adds a column of given name, width and float precision.

Definition at line 39 of file TableWriter.hpp.

Here is the call graph for this function:

◆ printHeader()

void Table::printHeader ( )

Prints the formatted header.

Definition at line 40 of file TableWriter.cpp.

Here is the call graph for this function:

◆ printRow() [1/4]

template<class Rep , class Period , class... Ts>
void Table::printRow ( size_t index,
std::chrono::duration< Rep, Period > duration,
Ts... args )
inline

Prints a duration as milliseconds.

Definition at line 65 of file TableWriter.hpp.

Here is the call graph for this function:

◆ printRow() [2/4]

template<class T >
void Table::printRow ( size_t index,
T a )
inline

Recursion anchor, prints the last entry and the endl.

Definition at line 75 of file TableWriter.hpp.

Here is the call graph for this function:

◆ printRow() [3/4]

template<class T , class... Ts>
void Table::printRow ( size_t index,
T a,
Ts... args )
inline

Prints a ostream convertible type.

Definition at line 56 of file TableWriter.hpp.

Here is the call graph for this function:

◆ printRow() [4/4]

template<class... Ts>
void Table::printRow ( Ts... args)
inline

Prints a line, accepting arbitrary arguments.

Definition at line 49 of file TableWriter.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ cols

std::vector<Column> Table::cols

Definition at line 28 of file TableWriter.hpp.

◆ out

std::ostream& Table::out = std::cout

Definition at line 31 of file TableWriter.hpp.

◆ padding

char Table::padding = ' '

Definition at line 30 of file TableWriter.hpp.

◆ sepChar

std::string Table::sepChar = "|"

Definition at line 29 of file TableWriter.hpp.


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