tlx
Loading...
Searching...
No Matches
SpacingLogger Class Reference

A logging class which outputs spaces between elements pushed via operator<<. More...

#include <core.hpp>

Public Member Functions

 SpacingLogger ()
 construction: add prefix if desired
 
template<typename AnyType >
SpacingLoggeroperator<< (const AnyType &at)
 output any type, including io manipulators
 
 ~SpacingLogger ()
 destructor: output a newline
 

Private Attributes

bool first_
 true until the first element it outputted.
 
std::ostringstream oss_
 collector stream
 

Detailed Description

A logging class which outputs spaces between elements pushed via operator<<.

Depending on the real parameter the output may be suppressed.

Definition at line 103 of file core.hpp.

Constructor & Destructor Documentation

◆ SpacingLogger()

construction: add prefix if desired

Definition at line 97 of file core.cpp.

◆ ~SpacingLogger()

destructor: output a newline

Definition at line 103 of file core.cpp.

Member Function Documentation

◆ operator<<()

template<typename AnyType >
SpacingLogger & operator<< ( const AnyType & at)
inline

output any type, including io manipulators

Definition at line 118 of file core.hpp.

Member Data Documentation

◆ first_

bool first_
private

true until the first element it outputted.

Definition at line 107 of file core.hpp.

◆ oss_

std::ostringstream oss_
private

collector stream

Definition at line 110 of file core.hpp.


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