LSLOpt  1.0
Public Member Functions | Public Attributes | List of all members
LSLOpt::OstreamOutput Struct Reference

Class for the output to an std::ostream. More...

#include <OutputUtils.hpp>

Public Member Functions

 OstreamOutput (OutputLevel output_level, std::ostream &os)
 Construct OstreamOutput. More...
 
OstreamOutputoperator<< (const OutputLevel &level)
 Set and output the level. More...
 
template<typename T >
OstreamOutputoperator<< (const T &t)
 Output variable to the output stream. More...
 

Public Attributes

OutputLevel output_level
 The current output level.
 

Detailed Description

Class for the output to an std::ostream.

The output level can be set, i.e. it can be specified which messages are to be shown.

Constructor & Destructor Documentation

◆ OstreamOutput()

LSLOpt::OstreamOutput::OstreamOutput ( OutputLevel  output_level,
std::ostream &  os 
)
inline

Construct OstreamOutput.

Parameters
output_levelLevel where output is starting.
osThe std::ostream.

Member Function Documentation

◆ operator<<() [1/2]

OstreamOutput& LSLOpt::OstreamOutput::operator<< ( const OutputLevel level)
inline

Set and output the level.

Parameters
levelThe output to set and output.

◆ operator<<() [2/2]

template<typename T >
OstreamOutput& LSLOpt::OstreamOutput::operator<< ( const T &  t)
inline

Output variable to the output stream.

Parameters
tThe variable to output.

Using this function any type can be output that can be written to an std::ostream.


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