RTC::basic_logbuf< _CharT, _Traits > Class Template Reference

Logger buffer class. More...

#include <SystemLogger.h>

List of all members.

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.


Detailed Description

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
class RTC::basic_logbuf< _CharT, _Traits >

Logger buffer class.

This is a logger buffer class like basic_filebuf. Buffer class that manages to output logfiles to the local file.


Member Typedef Documentation

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
typedef _CharT RTC::basic_logbuf< _CharT, _Traits >::char_type

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
typedef _Traits RTC::basic_logbuf< _CharT, _Traits >::traits_type

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
typedef std::basic_filebuf<char_type, traits_type> RTC::basic_logbuf< _CharT, _Traits >::__filebuf_type


Constructor & Destructor Documentation

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
RTC::basic_logbuf< _CharT, _Traits >::basic_logbuf (  )  [inline]

constructor.

Default constructor

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
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.

Parameters:
s Log file name
mode Open mode(The default value:write-mode)
protection 

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
virtual RTC::basic_logbuf< _CharT, _Traits >::~basic_logbuf (  )  [inline, virtual]

Destractor.

Destructor. Close the file.


Member Function Documentation

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
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

Parameters:
s Target string
n Number of characters
Returns:
Number of actual written characters

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
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.

Parameters:
cb Target callback function for setting

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
virtual int RTC::basic_logbuf< _CharT, _Traits >::sync (  )  [inline, protected, virtual]

Synchronization of buffer.

Synchronous function to be invoked when the buffer was flushed.

Returns:
Synchronous processing result of the buffer


Generated on Thu May 29 15:03:33 2008 for OpenRTM by  doxygen 1.5.3