クラス テンプレート RTC::basic_medlogbuf< _CharT, _Traits >

仲介ロガーバッファクラス [詳細]

#include <SystemLogger.h>

すべてのメンバ一覧

Public 型

typedef _CharT char_type
typedef _Traits traits_type
typedef
std::basic_streambuf
< char_type,
traits_type
__streambuf_type
typedef
std::basic_filebuf
< char_type,
traits_type
__filebuf_type

Public メソッド

 basic_medlogbuf ()
 コンストラクタ
 basic_medlogbuf (__filebuf_type &filebuf)
 コンストラクタ
 basic_medlogbuf (const basic_medlogbuf &x)
 basic_medlogbuf コピーコンストラクタ
virtual ~basic_medlogbuf ()
 デストラクタ
void setBuffer (__filebuf_type &filebuf)
 ログバッファ設定
void setDateFmt (char *fmt)
 ヘッダに付加する日時フォーマットを指定する。
void setDateFmt (const std::string &fmt)
 ヘッダに付加する日時フォーマットを指定する。
std::string getFmtDate ()
 フォーマットされた現在日時文字列を取得する。
void setSuffix (char *suffix)
 ヘッダの日時の後に付加する文字列を設定する。
void setSuffix (const std::string &suffix)
 ヘッダの日時の後に付加する文字列を設定する。
std::string getSuffix ()
 ヘッダの日時の後に付加する文字列を取得する。

Protected メソッド

virtual int sync ()
 バッファ同期


説明

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

仲介ロガーバッファクラス

basic_streambuf ライクなログバッファクラス。basic_filebuf への仲介をする。 stream から受け取った文字列にヘッダなどを付加し basic_filebuf へ渡す。


型定義

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

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

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
typedef std::basic_streambuf<char_type, traits_type> RTC::basic_medlogbuf< _CharT, _Traits >::__streambuf_type

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


コンストラクタとデストラクタ

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

コンストラクタ

コンストラクタ

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

コンストラクタ

コンストラクタ

引数:
filebuf ログファイル用バッファ

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
RTC::basic_medlogbuf< _CharT, _Traits >::basic_medlogbuf ( const basic_medlogbuf< _CharT, _Traits > &  x  )  [inline]

basic_medlogbuf コピーコンストラクタ

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

デストラクタ

デストラクタ。


関数

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
void RTC::basic_medlogbuf< _CharT, _Traits >::setBuffer ( __filebuf_type filebuf  )  [inline]

ログバッファ設定

指定したファイルバッファをログバッファとして設定する。

引数:
filebuf ログファイル用バッファ

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
void RTC::basic_medlogbuf< _CharT, _Traits >::setDateFmt ( char *  fmt  )  [inline]

ヘッダに付加する日時フォーマットを指定する。

フォーマット指定文字列は以下のとおり。

 %a abbreviated weekday name 
 %A full weekday name 
 %b abbreviated month name 
 %B full month name 
 %c the standard date and time string 
 %d day of the month, as a number (1-31) 
 %H hour, 24 hour format (0-23) 
 %I hour, 12 hour format (1-12) 
 %j day of the year, as a number (1-366) 
 %m month as a number (1-12).
    Note: some versions of Microsoft Visual C++ may use values that range
    from 0-11. 
 %M minute as a number (0-59) 
 %p locale's equivalent of AM or PM 
 %S second as a number (0-59) 
 %U week of the year, sunday as the first day 
 %w weekday as a decimal (0-6, sunday=0) 
 %W week of the year, monday as the first day 
 %x standard date string 
 %X standard time string 
 %y year in decimal, without the century (0-99) 
 %Y year in decimal, with the century 
 %Z time zone name 
 %% a percent sign 
 

引数:
fmt 日時フォーマット

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
void RTC::basic_medlogbuf< _CharT, _Traits >::setDateFmt ( const std::string &  fmt  )  [inline]

ヘッダに付加する日時フォーマットを指定する。

フォーマット指定文字列については、void setDateFmt(char*)を参照。

引数:
fmt 日時フォーマット文字列

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

フォーマットされた現在日時文字列を取得する。

指定された書式で記述した現在日時を取得する。

戻り値:
書式指定現在日時

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
void RTC::basic_medlogbuf< _CharT, _Traits >::setSuffix ( char *  suffix  )  [inline]

ヘッダの日時の後に付加する文字列を設定する。

ヘッダの日時の後に付加する接頭語文字列を設定する。

引数:
suffix 接頭語文字列

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
void RTC::basic_medlogbuf< _CharT, _Traits >::setSuffix ( const std::string &  suffix  )  [inline]

ヘッダの日時の後に付加する文字列を設定する。

ヘッダの日時の後に付加する接頭語文字列を設定する。

引数:
suffix 接頭語文字列

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

ヘッダの日時の後に付加する文字列を取得する。

ヘッダの日時の後に付加する接頭語文字列を取得する。

戻り値:
接頭語文字列

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

バッファ同期

バッファがフラッシュされた際に呼ばれる同期関数。

戻り値:
バッファ同期処理結果


OpenRTMに対してWed May 21 05:17:25 2008に生成されました。  doxygen 1.5.3