Interface Documentation
Version: invalid
Classes | Public Member Functions | Protected Member Functions | List of all members
flecsi::log::tee_buffer_t Class Reference

#include <types.hh>

Inheritance diagram for flecsi::log::tee_buffer_t:
Inheritance graph
[legend]
Collaboration diagram for flecsi::log::tee_buffer_t:
Collaboration graph
[legend]

Classes

struct  buffer_data_t
 

Public Member Functions

void add_buffer (std::string key, std::streambuf *sb, bool colorized)
 
bool enable_buffer (std::string key)
 
bool disable_buffer (std::string key)
 

Protected Member Functions

virtual int overflow (int c)
 
virtual int sync ()
 

Detailed Description

The tee_buffer_t type provides a stream buffer that allows output to multiple targets.

Member Function Documentation

◆ add_buffer()

void flecsi::log::tee_buffer_t::add_buffer ( std::string  key,
std::streambuf *  sb,
bool  colorized 
)
inline

Add a buffer to which output should be written. This also enables the buffer,i.e., output will be written to it. For a given key, only the first call to this method will have an effect.

◆ disable_buffer()

bool flecsi::log::tee_buffer_t::disable_buffer ( std::string  key)
inline

Disable a buffer so that output is not written to it.

◆ enable_buffer()

bool flecsi::log::tee_buffer_t::enable_buffer ( std::string  key)
inline

Enable a buffer so that output is written to it. This is mainly for buffers that have been disabled and need to be re-enabled.

◆ overflow()

virtual int flecsi::log::tee_buffer_t::overflow ( int  c)
inlineprotectedvirtual

Override the overflow method. This streambuf has no buffer, so overflow happens for every character that is written to the string, allowing us to write to multiple output streams. This method also detects colorization strings embedded in the character stream and removes them from output that is going to non-colorized buffers.

Parameters
cThe character to write. This is passed in as an int so that non-characters like EOF can be written to the stream.

◆ sync()

virtual int flecsi::log::tee_buffer_t::sync ( )
inlineprotectedvirtual

Override the sync method so that we sync all of the output buffers.


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