Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Lamp::ErrorOutput Class Reference

エラー出力クラス More...

#include <ErrorOutput.h>

List of all members.

Public Types

typedef void(* ErrorHandler )(const char *message)
 エラーハンドラの型


Static Public Member Functions

void initialize (const char *fileName="LampErrorLog.txt")
 初期化

void finalize ()
 後始末

int print (const char *format,...)
 エラー出力

int print (const String &string)
 エラー出力

void setErrorHandler (ErrorHandler handler)
 エラーハンドラの設定


Detailed Description

エラー出力クラス

エラー出力の実装クラスです。

Definition at line 79 of file ErrorOutput.h.


Member Typedef Documentation

typedef void(* Lamp::ErrorOutput::ErrorHandler)(const char* message)
 

エラーハンドラの型

デフォルトのエラーハンドラはメッセージを出力して強制終了します。

Parameters:
message エラーメッセージ

Definition at line 115 of file ErrorOutput.h.


Member Function Documentation

void Lamp::ErrorOutput::initialize const char *  fileName = "LampErrorLog.txt"  )  [static]
 

初期化

Parameters:
fileName エラーログファイル名。NULLだとログを残しません。

Definition at line 45 of file ErrorOutput.cpp.

References NULL.

int Lamp::ErrorOutput::print const String string  )  [static]
 

エラー出力

Parameters:
string 文字列
Returns:
出力文字数

Definition at line 84 of file ErrorOutput.cpp.

References Lamp::Logger::flush(), Lamp::String::getBytes(), Lamp::String::getSize(), NULL, and Lamp::Logger::output().

int Lamp::ErrorOutput::print const char *  format,
... 
[static]
 

エラー出力

可変長引数に対応したエラー出力メソッド。

Parameters:
format フォーマット
... 可変長引数
Returns:
出力文字数

Definition at line 59 of file ErrorOutput.cpp.

References ErrorOut, Lamp::Logger::flush(), NULL, Lamp::Logger::output(), and StdVsnprintf.

void Lamp::ErrorOutput::setErrorHandler ErrorHandler  handler  )  [inline, static]
 

エラーハンドラの設定

Parameters:
handler 設定するエラーハンドラ

Definition at line 121 of file ErrorOutput.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:46 2005 for Lamp by doxygen 1.3.2