|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Utility class that makes it easy to create formatted tables of output. More...
#include <Teuchos_TabularOutputter.hpp>
Classes | |
| struct | FieldSpec |
| class | InvalidFieldOutputError |
| More... | |
| class | InvalidFieldSpecError |
| More... | |
| class | MissingFieldsError |
| More... | |
| class | MissingHeaderError |
| More... | |
Public Member Functions | |
| TabularOutputter (std::ostream &out) | |
| | |
| TabularOutputter (const RCP< std::ostream > &out) | |
| | |
| void | setOStream (const RCP< std::ostream > &out) |
| Set the ostream that all output will be sent to. | |
| void | pushFieldSpec (const std::string &fieldName, const EFieldType fieldType=DOUBLE, const EFieldJustification fieldJustification=RIGHT, const EFloatingOutputType floatingOutputType=SCIENTIFIC, const int width=-1) |
| Add a new field to be output. | |
| void | setFieldTypePrecision (const EFieldType fieldType, const int prec) |
| Set the precision of output for a field. | |
| void | outputHeader () |
| Output the headers. | |
| template<typename T > | |
| void | outputField (const T &t) |
| Output to the next field. | |
| void | nextRow (const bool allowRemainingFields=false) |
| Finalize the row of output. | |
| void | startTimer (const int numLoops) |
| double | stopTimer () |
Private Member Functions | |
| void | initialize () |
| double | adjustTime (const double &time_in) |
| TabularOutputter () | |
Private Attributes | |
| Array< FieldSpec > | fieldSpecs_ |
| RCP< FancyOStream > | out_ |
| Tuple< int, numFieldTypes > | fieldTypePrecision_ |
| int | currFieldIdx_ |
| Time | timer_ |
| int | numLoops_ |
Static Private Attributes | |
| static const std::string | fieldSpacer_ |
Public types | |
| enum | EFieldType { DOUBLE, INT, STRING } |
| More... | |
| enum | { numFieldTypes = 3 } |
| enum | EFieldJustification { LEFT, RIGHT } |
| More... | |
| enum | { numFieldJustifications = 2 } |
| enum | EFloatingOutputType { SCIENTIFIC, GENERAL } |
| More... | |
| enum | { numFloatingOutputTypes = 2 } |
Utility class that makes it easy to create formatted tables of output.
Definition at line 61 of file Teuchos_TabularOutputter.hpp.
Definition at line 68 of file Teuchos_TabularOutputter.hpp.
| anonymous enum |
Definition at line 69 of file Teuchos_TabularOutputter.hpp.
Definition at line 72 of file Teuchos_TabularOutputter.hpp.
| anonymous enum |
Definition at line 73 of file Teuchos_TabularOutputter.hpp.
Definition at line 76 of file Teuchos_TabularOutputter.hpp.
| anonymous enum |
Definition at line 77 of file Teuchos_TabularOutputter.hpp.
| Teuchos::TabularOutputter::TabularOutputter | ( | std::ostream & | out | ) |
Definition at line 84 of file Teuchos_TabularOutputter.cpp.
| Teuchos::TabularOutputter::TabularOutputter | ( | const RCP< std::ostream > & | out | ) |
Definition at line 93 of file Teuchos_TabularOutputter.cpp.
| Teuchos::TabularOutputter::TabularOutputter | ( | ) | [private] |
| void Teuchos::TabularOutputter::setOStream | ( | const RCP< std::ostream > & | out | ) |
Set the ostream that all output will be sent to.
Definition at line 102 of file Teuchos_TabularOutputter.cpp.
| void Teuchos::TabularOutputter::pushFieldSpec | ( | const std::string & | fieldName, |
| const EFieldType | fieldType = DOUBLE, |
||
| const EFieldJustification | fieldJustification = RIGHT, |
||
| const EFloatingOutputType | floatingOutputType = SCIENTIFIC, |
||
| const int | width = -1 |
||
| ) |
Add a new field to be output.
Definition at line 111 of file Teuchos_TabularOutputter.cpp.
| void Teuchos::TabularOutputter::setFieldTypePrecision | ( | const EFieldType | fieldType, |
| const int | prec | ||
| ) |
Set the precision of output for a field.
This will also determine the width of the field.
Definition at line 137 of file Teuchos_TabularOutputter.cpp.
Output the headers.
Definition at line 144 of file Teuchos_TabularOutputter.cpp.
| void Teuchos::TabularOutputter::outputField | ( | const T & | t | ) |
Output to the next field.
Definition at line 245 of file Teuchos_TabularOutputter.hpp.
| void Teuchos::TabularOutputter::nextRow | ( | const bool | allowRemainingFields = false | ) |
Finalize the row of output.
Definition at line 185 of file Teuchos_TabularOutputter.cpp.
| void Teuchos::TabularOutputter::initialize | ( | ) | [private] |
Definition at line 211 of file Teuchos_TabularOutputter.cpp.
| double Teuchos::TabularOutputter::adjustTime | ( | const double & | time_in | ) | [inline, private] |
Definition at line 179 of file Teuchos_TabularOutputter.hpp.
| void Teuchos::TabularOutputter::startTimer | ( | const int | numLoops | ) | [inline] |
Definition at line 186 of file Teuchos_TabularOutputter.hpp.
| double Teuchos::TabularOutputter::stopTimer | ( | ) | [inline] |
Definition at line 193 of file Teuchos_TabularOutputter.hpp.
const std::string Teuchos::TabularOutputter::fieldSpacer_ [static, private] |
Definition at line 156 of file Teuchos_TabularOutputter.hpp.
Array<FieldSpec> Teuchos::TabularOutputter::fieldSpecs_ [private] |
Definition at line 163 of file Teuchos_TabularOutputter.hpp.
RCP<FancyOStream> Teuchos::TabularOutputter::out_ [private] |
Definition at line 164 of file Teuchos_TabularOutputter.hpp.
Tuple<int,numFieldTypes> Teuchos::TabularOutputter::fieldTypePrecision_ [private] |
Definition at line 165 of file Teuchos_TabularOutputter.hpp.
int Teuchos::TabularOutputter::currFieldIdx_ [private] |
Definition at line 170 of file Teuchos_TabularOutputter.hpp.
Time Teuchos::TabularOutputter::timer_ [private] |
Definition at line 172 of file Teuchos_TabularOutputter.hpp.
int Teuchos::TabularOutputter::numLoops_ [private] |
Definition at line 173 of file Teuchos_TabularOutputter.hpp.
1.7.6.1