www.mooseframework.org
Classes | Namespaces | Functions
FormattedTable.h File Reference

Go to the source code of this file.

Classes

class  TableValueBase
 
class  TableValue< T >
 
class  FormattedTable
 This class is used for building, formatting, and outputting tables of numbers. More...
 

Namespaces

 libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

template<>
void dataStore (std::ostream &stream, FormattedTable &table, void *context)
 
template<>
void dataLoad (std::istream &stream, FormattedTable &v, void *context)
 
template<>
void dataStore (std::ostream &stream, TableValueBase *&value, void *context)
 
template<>
void dataLoad (std::istream &stream, TableValueBase *&value, void *context)
 
std::ostream & operator<< (std::ostream &os, const TableValueBase &value)
 

Function Documentation

◆ dataLoad() [1/2]

template<>
void dataLoad ( std::istream &  stream,
FormattedTable v,
void context 
)

Definition at line 39 of file FormattedTable.C.

Referenced by dataLoad(), and TableValue< T >::load().

40 {
41  loadHelper(stream, table._data, context);
42  loadHelper(stream, table._align_widths, context);
43  loadHelper(stream, table._column_names, context);
44  loadHelper(stream, table._output_row_index, context);
45  loadHelper(stream, table._headers_output, context);
46 }
void loadHelper(std::istream &stream, P &data, void *context)
Scalar helper routine.
Definition: DataIO.h:948

◆ dataLoad() [2/2]

template<>
void dataLoad ( std::istream &  stream,
TableValueBase *&  value,
void context 
)

◆ dataStore() [1/2]

template<>
void dataStore ( std::ostream &  stream,
FormattedTable table,
void context 
)

Definition at line 27 of file FormattedTable.C.

Referenced by TableValue< T >::store().

28 {
29  table.fillEmptyValues();
30  storeHelper(stream, table._data, context);
31  storeHelper(stream, table._align_widths, context);
32  storeHelper(stream, table._column_names, context);
33  storeHelper(stream, table._output_row_index, context);
34  storeHelper(stream, table._headers_output, context);
35 }
std::size_t _output_row_index
Keeps track of the index indicating which vector elements have been output.
void storeHelper(std::ostream &stream, P &data, void *context)
Scalar helper routine.
Definition: DataIO.h:856
std::vector< std::pair< Real, std::map< std::string, std::shared_ptr< TableValueBase > > > > _data
Data structure for the console table: The first part of the pair tracks the independent variable (nor...
std::map< std::string, unsigned int > _align_widths
Alignment widths (only used if asked to print aligned to CSV output)
std::vector< std::string > _column_names
The set of column names updated when data is inserted through the setter methods. ...
bool _headers_output
Keeps track of whether the header has been output.
void fillEmptyValues()
Fill any values that are not defined (usually when there are mismatched column lengths) ...

◆ dataStore() [2/2]

template<>
void dataStore ( std::ostream &  stream,
TableValueBase *&  value,
void context 
)

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const TableValueBase value 
)

Definition at line 602 of file FormattedTable.C.

603 {
604  value.print(os);
605  return os;
606 }
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:33
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)