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

#include <evo/fmt.h>

Detailed Description

Used to write formatted output with caching (used internally).

Public Types

typedef List< StringStringList
 List of String values. More...
 

Public Member Functions

 CachedWriter (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

StringListcurrent_row
 Pointer to current row, NULL if about to start a new row. More...
 
List< StringListrowcache
 List of cached rows. More...
 
bool started
 True when writing has started, false when finished. More...
 
Writer writer
 Writer for actual writing. More...
 

Member Typedef Documentation

◆ StringList

List of String values.

Constructor & Destructor Documentation

◆ CachedWriter()

CachedWriter ( 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

◆ current_row

StringList* current_row

Pointer to current row, NULL if about to start a new row.

◆ rowcache

List<StringList> rowcache

List of cached rows.

◆ started

bool started

True when writing has started, false when finished.

◆ writer

Writer writer

Writer for actual writing.


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