File multiostream.hxx

Typedefs

using cmultiostream = multiostream<char>
using wmultiostream = multiostream<wchar_t>
template<typename char_type, typename traits = std::char_traits<char_type>>
class multioutbuf : public std::basic_streambuf<char_type, traits>
#include <multiostream.hxx>

Template class to split streams.

from http://accu.org/index.php/journals/260

Public Functions

void add(std::basic_ostream<char_type, traits> &str)
void remove(std::basic_ostream<char_type, traits> &str)

Protected Functions

std::streamsize xsputn(const char_type *sequence, std::streamsize num)
int overflow(int c)

Private Types

template<>
using stream_container = std::vector<std::basic_ostream<char_type, traits> *>

Private Members

stream_container streams_
template<typename char_type, typename traits>
class multioutbuf_init

Subclassed by multiostream< char_type, traits >, Output

Public Functions

multioutbuf<char_type, traits> *buf()

Private Members

multioutbuf<char_type, traits> buf_
template<typename char_type, typename traits = std::char_traits<char_type>>
class multiostream : multioutbuf_init<char_type, traits>, public std::basic_ostream<char_type, traits>

Public Functions

multiostream()
void add(std::basic_ostream<char_type, traits> &str)
void remove(std::basic_ostream<char_type, traits> &str)

Private Types

template<>
using multioutbuf_init = multioutbuf_init<char_type, traits>