#include <SystemLogger.h>
Public Types | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef std::basic_filebuf < char_type, traits_type > | __filebuf_type |
Public Member Functions | |
basic_logbuf () | |
constructor. | |
basic_logbuf (const char_type *s, std::ios_base::openmode mode=std::ios_base::out, long protection=0666) | |
Constructor. | |
virtual | ~basic_logbuf () |
Destractor. | |
virtual std::streamsize | sputn (const char_type *s, std::streamsize n) |
Write into the buffer. | |
void | setSyncCallBack (sync_callback< char_type > &cb) |
Set callback function for buffer's synchronization. | |
Protected Member Functions | |
virtual int | sync () |
Synchronization of buffer. |
This is a logger buffer class like basic_filebuf. Buffer class that manages to output logfiles to the local file.
typedef _CharT RTC::basic_logbuf< _CharT, _Traits >::char_type |
typedef _Traits RTC::basic_logbuf< _CharT, _Traits >::traits_type |
typedef std::basic_filebuf<char_type, traits_type> RTC::basic_logbuf< _CharT, _Traits >::__filebuf_type |
RTC::basic_logbuf< _CharT, _Traits >::basic_logbuf | ( | ) | [inline] |
constructor.
Default constructor
RTC::basic_logbuf< _CharT, _Traits >::basic_logbuf | ( | const char_type * | s, | |
std::ios_base::openmode | mode = std::ios_base::out , |
|||
long | protection = 0666 | |||
) | [inline] |
Constructor.
Constructor that constructs with specifying file names and open-mode.
s | Log file name | |
mode | Open mode(The default value:write-mode) | |
protection |
virtual RTC::basic_logbuf< _CharT, _Traits >::~basic_logbuf | ( | ) | [inline, virtual] |
Destractor.
Destructor. Close the file.
virtual std::streamsize RTC::basic_logbuf< _CharT, _Traits >::sputn | ( | const char_type * | s, | |
std::streamsize | n | |||
) | [inline, virtual] |
Write into the buffer.
Write specified string through specified number of characters into the buffer
s | Target string | |
n | Number of characters |
void RTC::basic_logbuf< _CharT, _Traits >::setSyncCallBack | ( | sync_callback< char_type > & | cb | ) | [inline] |
Set callback function for buffer's synchronization.
Set the callback function to execute the buffer's synchronization.
cb | Target callback function for setting |
virtual int RTC::basic_logbuf< _CharT, _Traits >::sync | ( | ) | [inline, protected, virtual] |
Synchronization of buffer.
Synchronous function to be invoked when the buffer was flushed.