NOMAD Source  Version 4.0.0 Beta
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OutputQueue Class Reference

#include <OutputQueue.hpp>

Collaboration diagram for OutputQueue:

Public Member Functions

 ~OutputQueue ()
 
void initParameters (const std::shared_ptr< DisplayParameters > &params)
 
void add (OutputInfo outputInfo)
 
void add (const std::string &s, OutputLevel outputLevel=OutputLevel::LEVEL_INFO)
 
void add (const StatsInfo &statsInfo)
 
size_t getMaxStepLevel () const
 
void setMaxStepLevel (const size_t maxStepLevel)
 
int getDisplayDegree () const
 
void setDisplayDegree (const int displayDegree)
 
void setStatsFileName (const std::string &statsFile)
 
void initStatsFile ()
 
const std::string & getStatsFileName () const
 
void setStatsFileFormat (const DisplayStatsTypeList &statsFileFormat)
 
const DisplayStatsTypeListgetStatsFileFormat () const
 
const ArrayOfDoublegetSolFormat () const
 

Static Public Member Functions

static std::unique_ptr
< OutputQueue > & 
getInstance ()
 
static void Add (OutputInfo outputInfo)
 
static void Add (const std::string &s, OutputLevel outputLevel=OutputLevel::LEVEL_INFO)
 
static void Add (const StatsInfo &statsInfo)
 
static void Flush ()
 

Private Member Functions

 OutputQueue ()
 
void startBlock ()
 
void endBlock ()
 
void flush ()
 
void flushBlock (const OutputInfo &outputInfo)
 
void flushStatsToStatsFile (const StatsInfo *statsInfo)
 
void flushStatsToStdout (const StatsInfo *statsInfo)
 
void indent (int level)
 

Private Attributes

std::vector< OutputInfo_queue
 
std::shared_ptr
< DisplayParameters
_params
 
std::string _statsFile
 
std::ofstream _statsStream
 
DisplayStatsTypeList _statsFileFormat
 
size_t _statsLineCount
 
size_t _objWidth
 
size_t _hWidth
 
size_t _maxStepLevel
 
OutputLevel _maxOutputLevel
 
int _indentLevel
 
const std::string _blockStart
 
const std::string _blockEnd
 

Static Private Attributes

static std::unique_ptr
< OutputQueue
_single
 The singleton. More...
 

Detailed Description

Definition at line 21 of file OutputQueue.hpp.

Constructor & Destructor Documentation

OutputQueue::OutputQueue ( )
private
OutputQueue::~OutputQueue ( )

Member Function Documentation

void OutputQueue::add ( OutputInfo  outputInfo)
static void OutputQueue::Add ( OutputInfo  outputInfo)
inlinestatic

Definition at line 38 of file OutputQueue.hpp.

39  {
40  getInstance()->add(std::move(outputInfo));
41  }
static std::unique_ptr< OutputQueue > & getInstance()
void OutputQueue::add ( const std::string &  s,
OutputLevel  outputLevel = OutputLevel::LEVEL_INFO 
)
static void OutputQueue::Add ( const std::string &  s,
OutputLevel  outputLevel = OutputLevel::LEVEL_INFO 
)
inlinestatic

Definition at line 45 of file OutputQueue.hpp.

47  {
48  getInstance()->add(s, outputLevel);
49  }
static std::unique_ptr< OutputQueue > & getInstance()
void OutputQueue::add ( const StatsInfo statsInfo)
static void OutputQueue::Add ( const StatsInfo statsInfo)
inlinestatic

Definition at line 53 of file OutputQueue.hpp.

54  {
55  getInstance()->add(statsInfo);
56  }
static std::unique_ptr< OutputQueue > & getInstance()
void OutputQueue::endBlock ( )
private
static void OutputQueue::Flush ( )
inlinestatic

Definition at line 74 of file OutputQueue.hpp.

75  {
76  getInstance()->flush();
77  }
static std::unique_ptr< OutputQueue > & getInstance()
void OutputQueue::flush ( )
private
void OutputQueue::flushBlock ( const OutputInfo outputInfo)
private
void OutputQueue::flushStatsToStatsFile ( const StatsInfo statsInfo)
private
void OutputQueue::flushStatsToStdout ( const StatsInfo statsInfo)
private
int OutputQueue::getDisplayDegree ( ) const
static std::unique_ptr<OutputQueue>& OutputQueue::getInstance ( )
static
size_t OutputQueue::getMaxStepLevel ( ) const
inline

Definition at line 80 of file OutputQueue.hpp.

80 { return _maxStepLevel; }
size_t _maxStepLevel
const ArrayOfDouble& OutputQueue::getSolFormat ( ) const
inline

Definition at line 97 of file OutputQueue.hpp.

98  {
99  return _params->getAttributeValue<ArrayOfDouble>("SOL_FORMAT");
100  }
std::shared_ptr< DisplayParameters > _params
Class for the representation of an array of n values.
const DisplayStatsTypeList& OutputQueue::getStatsFileFormat ( ) const
inline

Definition at line 94 of file OutputQueue.hpp.

94 { return _statsFileFormat; }
DisplayStatsTypeList _statsFileFormat
const std::string& OutputQueue::getStatsFileName ( ) const
inline

Definition at line 88 of file OutputQueue.hpp.

88 { return _statsFile; }
std::string _statsFile
void OutputQueue::indent ( int  level)
private
void OutputQueue::initParameters ( const std::shared_ptr< DisplayParameters > &  params)
void OutputQueue::initStatsFile ( )
void OutputQueue::setDisplayDegree ( const int  displayDegree)
void OutputQueue::setMaxStepLevel ( const size_t  maxStepLevel)
inline

Definition at line 81 of file OutputQueue.hpp.

81 { _maxStepLevel = maxStepLevel; }
size_t _maxStepLevel
void OutputQueue::setStatsFileFormat ( const DisplayStatsTypeList statsFileFormat)
inline

Definition at line 90 of file OutputQueue.hpp.

91  {
92  _statsFileFormat = statsFileFormat;
93  }
DisplayStatsTypeList _statsFileFormat
void OutputQueue::setStatsFileName ( const std::string &  statsFile)
inline

Definition at line 86 of file OutputQueue.hpp.

86 { _statsFile = statsFile; }
std::string _statsFile
void OutputQueue::startBlock ( )
private

Member Data Documentation

const std::string OutputQueue::_blockEnd
private

Definition at line 140 of file OutputQueue.hpp.

const std::string OutputQueue::_blockStart
private

Definition at line 139 of file OutputQueue.hpp.

size_t OutputQueue::_hWidth
private

Definition at line 133 of file OutputQueue.hpp.

int OutputQueue::_indentLevel
private

Definition at line 137 of file OutputQueue.hpp.

OutputLevel OutputQueue::_maxOutputLevel
private

Definition at line 136 of file OutputQueue.hpp.

size_t OutputQueue::_maxStepLevel
private

Definition at line 135 of file OutputQueue.hpp.

size_t OutputQueue::_objWidth
private

Definition at line 132 of file OutputQueue.hpp.

std::shared_ptr<DisplayParameters> OutputQueue::_params
private

Definition at line 118 of file OutputQueue.hpp.

std::vector<OutputInfo> OutputQueue::_queue
private

Definition at line 116 of file OutputQueue.hpp.

std::unique_ptr<OutputQueue> OutputQueue::_single
staticprivate

The singleton.

Definition at line 112 of file OutputQueue.hpp.

std::string OutputQueue::_statsFile
private

Definition at line 122 of file OutputQueue.hpp.

DisplayStatsTypeList OutputQueue::_statsFileFormat
private

Definition at line 126 of file OutputQueue.hpp.

size_t OutputQueue::_statsLineCount
private

Definition at line 129 of file OutputQueue.hpp.

std::ofstream OutputQueue::_statsStream
private

Definition at line 123 of file OutputQueue.hpp.


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