Evo C++ Library v0.5.1
Public Member Functions | Public Attributes | List of all members
FmtTable::Writer Struct Reference

#include <evo/fmt.h>

Detailed Description

Used to write formatted output (used internally).

Public Member Functions

 Writer (FmtTable &table, Type type=tTEXT)
 Constructor. More...
 
template<class T >
T & write_endrow (T &out)
 Write end to current row. More...
 
template<class T >
T & write_finished (T &out)
 Finish writing table. More...
 
template<class T >
T & write_header (T &out)
 Write header output. More...
 
template<class T , class U >
T & write_value (T &out, const U &fmtval)
 Write next value. More...
 

Public Attributes

SizeT column_index
 Current column index. More...
 
SizeT rows
 Number of rows written. More...
 
bool started
 True when writing has started, false when finished. More...
 
FmtTabletable
 Table info used. More...
 
Type type
 Formatting type. More...
 

Constructor & Destructor Documentation

◆ Writer()

Writer ( FmtTable table,
Type  type = tTEXT 
)
inline

Constructor.

Parameters
tableTable info to use
typeOutput type

Member Function Documentation

◆ write_endrow()

T& write_endrow ( T &  out)
inline

Write end to current row.

  • Ignored if no columns exist
Template Parameters
TString or stream type to use, inferred from out argument
Parameters
outString or stream to write to
Returns
out

◆ write_finished()

T& write_finished ( T &  out)
inline

Finish writing table.

  • Ignored if no columns exist
Template Parameters
TString or stream type to use, inferred from out argument
Parameters
outString or stream to write to
Returns
out

◆ write_header()

T& write_header ( T &  out)
inline

Write header output.

  • Ignored if no columns exist
Template Parameters
TString or stream type to use, inferred from argument
Parameters
outString or stream to write to
Returns
out

◆ write_value()

T& write_value ( T &  out,
const U &  fmtval 
)
inline

Write next value.

  • Ignored if no columns exist
Template Parameters
TString or stream type to use, inferred from out argument
UType of value to format, inferred from fmtval – must be one of: String, FmtString, FmtFieldNum, FmtFieldFloat
Parameters
outString or stream to write to
fmtvalValue to format
Returns
out

Member Data Documentation

◆ column_index

SizeT column_index

Current column index.

◆ rows

SizeT rows

Number of rows written.

◆ started

bool started

True when writing has started, false when finished.

◆ table

FmtTable& table

Table info used.

◆ type

Type type

Formatting type.


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