Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Classes | List of all members
Teuchos::TabularOutputter Class Reference

Utility class that makes it easy to create formatted tables of output. More...

#include <Teuchos_TabularOutputter.hpp>

Classes

class  InvalidFieldOutputError
 .
More...
 
class  InvalidFieldSpecError
 .
More...
 
class  MissingFieldsError
 .
More...
 
class  MissingHeaderError
 .
More...
 

Public types

enum  EFieldType
 
enum  EFieldJustification
 
enum  EFloatingOutputType
 
 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.
 

Detailed Description

Utility class that makes it easy to create formatted tables of output.

Definition at line 61 of file Teuchos_TabularOutputter.hpp.

Member Enumeration Documentation

◆ EFieldType

Definition at line 68 of file Teuchos_TabularOutputter.hpp.

◆ EFieldJustification

Definition at line 72 of file Teuchos_TabularOutputter.hpp.

◆ EFloatingOutputType

Definition at line 76 of file Teuchos_TabularOutputter.hpp.

Constructor & Destructor Documentation

◆ TabularOutputter() [1/2]

Teuchos::TabularOutputter::TabularOutputter ( std::ostream & out)

Definition at line 84 of file Teuchos_TabularOutputter.cpp.

◆ TabularOutputter() [2/2]

Teuchos::TabularOutputter::TabularOutputter ( const RCP< std::ostream > & out)

Definition at line 93 of file Teuchos_TabularOutputter.cpp.

Member Function Documentation

◆ setOStream()

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.

◆ pushFieldSpec()

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.

◆ setFieldTypePrecision()

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.

◆ outputHeader()

void Teuchos::TabularOutputter::outputHeader ( )

Output the headers.

Definition at line 144 of file Teuchos_TabularOutputter.cpp.

◆ outputField()

template<typename T >
void Teuchos::TabularOutputter::outputField ( const T & t)

Output to the next field.

Definition at line 245 of file Teuchos_TabularOutputter.hpp.

◆ nextRow()

void Teuchos::TabularOutputter::nextRow ( const bool allowRemainingFields = false)

Finalize the row of output.

Definition at line 185 of file Teuchos_TabularOutputter.cpp.


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