OpenRTM-aist
1.2.1
|
log_streambuf template class More...
#include <Logger.h>
Classes | |
struct | Stream |
Structure for stream management. More... | |
Public Types | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef std::basic_streambuf< char_type, traits_type > | streambuf_type |
typedef coil::Mutex | Mutex |
typedef coil::Guard< coil::Mutex > | Guard |
Public Member Functions | |
log_streambuf () | |
Constructor. More... | |
virtual | ~log_streambuf () |
Destructor. More... | |
void | addStream (streambuf_type *stream, bool cleanup=false) |
Destructor. More... | |
bool | removeStream (streambuf_type *stream) |
Destructor. More... | |
std::vector< streambuf_type * > | getBuffers () |
Get stream buffer list. More... | |
Protected Member Functions | |
virtual std::streamsize | xsputn (const char_type *s, std::streamsize n) |
override of basic_streambuf::xsputn More... | |
virtual std::streamsize | stream_sputn () |
Write the stream buffer in stream. More... | |
virtual std::streamsize | stream_sputn (const char_type *s, std::streamsize n) |
Writes up to n characters from the array pointed by s to the output sequence controlled by the stream buffer. More... | |
virtual int | overflow (int c=traits_type::eof()) |
override of basic_streambuf::overflow More... | |
virtual int | sync () |
override of basic_streambuf::sync More... | |
log_streambuf template class
typedef _CharT coil::log_streambuf< _CharT, _Traits >::char_type |
typedef coil::Guard<coil::Mutex> coil::log_streambuf< _CharT, _Traits >::Guard |
typedef coil::Mutex coil::log_streambuf< _CharT, _Traits >::Mutex |
typedef std::basic_streambuf<char_type, traits_type> coil::log_streambuf< _CharT, _Traits >::streambuf_type |
typedef _Traits coil::log_streambuf< _CharT, _Traits >::traits_type |
|
inline |
|
inlinevirtual |
Destructor.
Destructor
|
inline |
Destructor.
This operation adds a stream that is actual output stream. User has responsibility to destruct the stream object, since this object never destructs the stream objects. The added stream objects should not be destructed before the destruction of this object. The stream destruction should be done by user after removing it from this object or destructing this object.
stream | a pointer to std::basic_streambuf type stream object |
|
inline |
Get stream buffer list.
Return a stream buffer list.
|
inlineprotectedvirtual |
override of basic_streambuf::overflow
c | input character |
References coil::log_streambuf< _CharT, _Traits >::stream_sputn().
Referenced by coil::log_streambuf< _CharT, _Traits >::sync().
|
inline |
Destructor.
This operation remove a stream that is actual output stream. User has responsibility to destruct the stream object.
stream | a pointer to std::basic_streambuf type stream object |
|
inlineprotectedvirtual |
Write the stream buffer in stream.
Referenced by coil::log_streambuf< _CharT, _Traits >::overflow(), coil::log_streambuf< _CharT, _Traits >::sync(), and coil::log_streambuf< _CharT, _Traits >::xsputn().
|
inlineprotectedvirtual |
Writes up to n characters from the array pointed by s to the output sequence controlled by the stream buffer.
s | a pointer to input characters |
n | number of input characters |
|
inlineprotectedvirtual |
override of basic_streambuf::sync
References coil::log_streambuf< _CharT, _Traits >::overflow(), and coil::log_streambuf< _CharT, _Traits >::stream_sputn().
|
inlineprotectedvirtual |
override of basic_streambuf::xsputn
s | a pointer to input characters |
n | number of input characters |
References coil::log_streambuf< _CharT, _Traits >::stream_sputn().