Class OutStream

Class Documentation

class Acts::Logging::OutStream

thread-safe output stream

This classes caches the output internally and only flushes it to the destination stream once it is destroyed. Using local instances of this class therefore provides a thread-safe way for printing debug messages.

Public Functions

OutStream(OutputFunc output)

construct stream object

Parameters
  • [in] output: function object called for flushing the internal cache

OutStream(const OutStream &copy)

copy constructor

Parameters
  • [in] copy: stream object to copy

~OutStream()

destructor

When calling the destructor, the internal cache is flushed using the function provided during construction.

template<typename T>
OutStream &operator<<(T &&input)

stream input operator forwarded to internal cache

Template Parameters
  • T: input type

Parameters
  • [in] input: content added to the stream

template<typename T>
OutStream &operator<<(T &(*f)(T&))

forward stream modifiers to internal cache

Template Parameters
  • T: stream type

Parameters
  • [in] f: stream modifier