Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE::ZError Class Reference

#include <ZE_ZError.h>

List of all members.


Detailed Description

ZError class for storing and printing information on errors. Inherited from ZObject and tied closely to ZEngine.
Since:
0.8.2


Public Methods

 ZError (ZErrorCode code=ZERR_NONE, string desc="", string file="", int line=0)
 Default constructor for ZError.

virtual ~ZError ()
 Virtual Destructor.

void Create (ZErrorCode code, string desc="", string file="", int line=0)
 Set members of error object.

ZErrorCode Code () const
 Get ZErrorCode of error.

string LogString () const
 Get formatted string for log file.


Static Public Methods

void CreateStringTable ()
 Construct string table for error strings.

void DestroyStringTable ()
 Destroy string table of error strings.


Protected Attributes

ZErrorCode rCode
 Error ID.

string rDescription
 Error Description.

string rFilename
 File which error occured in.

unsigned int rLine
 Line which error occured on.


Static Protected Attributes

string * sErrorDesc = NULL
 Static Array of Error Identifiers.


Constructor & Destructor Documentation

ZE::ZError::ZError ZErrorCode    code = ZERR_NONE,
string    desc = "",
string    file = "",
int    line = 0
 

Make new ZError object, by default set rCode to ZERR_NONE with no description.

Parameters:
code ZErrorCode to set object to, defaults to ZERR_NONE.
desc Description to use for object, defaults to nothing.
file Optional argument specifying the file the error occured in.
line Optional argument specifying the line the error occured on.

ZE::ZError::~ZError   [virtual]
 

Virtual destructor making future inheritance safe.


Member Function Documentation

void ZE::ZError::CreateStringTable   [static]
 

Constructs a string table for errors, enabling ZEngine to properly delete the table on exit.

void ZE::ZError::DestroyStringTable   [static]
 

Properly delete the string table, freeing all memory used by the strings.

void ZE::ZError::Create ZErrorCode    code,
string    desc = "",
string    file = "",
int    line = 0
 

Set new values in ZError object.

Parameters:
code ZErrorCode to set object to.
desc Description to use for object, defaults to nothing.
file Optional argument specifying the file the error occured in.
line Optional argument specifying the line the error occured on.

ZErrorCode ZE::ZError::Code   const
 

Access ZErrorCode of the ZError object.

Returns:
The error ZErrorCode.

string ZE::ZError::LogString   const
 

Return the string to be written to the logfile. Called by ZEngine in LogError.


The documentation for this class was generated from the following files:
Generated on Sun Apr 27 22:34:35 2003 for ZEngine by doxygen1.3-rc2