src/Base/TeeBuf.hpp file

Tee stream buffer.

Contents

Tee stream buffer that can be used to duplicate a stream. Example:

// createa a file
std::ofstream file( "data.txt" );
// tbuf will write to both file and cout
teebuf tbuf( file.rdbuf(), std::cout.rdbuf() );
// replace cout's streambuf with tbuf
scoped_streambuf_assignment ssa( std::cout, &tbuf );
// write to both std::cout and data.txt
std::cout << "Hello World" << std::endl;

Namespaces

namespace tk
Toolkit declarations and definitions for general purpose utilities.