- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

CalError Class Reference

The error class. More...

#include <error.h>

List of all members.

Public Types

enum  Code {
  OK = 0, INTERNAL, INVALID_HANDLE, MEMORY_ALLOCATION_FAILED,
  FILE_NOT_FOUND, INVALID_FILE_FORMAT, FILE_PARSER_FAILED, INDEX_BUILD_FAILED,
  NO_PARSER_DOCUMENT, INVALID_ANIMATION_DURATION, BONE_NOT_FOUND, INVALID_ATTRIBUTE_VALUE,
  INVALID_KEYFRAME_COUNT, INVALID_ANIMATION_TYPE, FILE_CREATION_FAILED, FILE_WRITING_FAILED,
  INCOMPATIBLE_FILE_VERSION, NO_MESH_IN_MODEL, BAD_DATA_SOURCE, NULL_BUFFER,
  MAX_ERROR_CODE
}

Static Public Methods

Code getLastErrorCode ()
 Returns the code of the last error. More...

std::string getLastErrorDescription ()
 Returns a description of the last error. More...

const std::string & getLastErrorFile ()
 Returns the name of the file where the last error occured. More...

int getLastErrorLine ()
 Returns the line number where the last error occured. More...

const std::string & getLastErrorText ()
 Returns the supplementary text of the last error. More...

void printLastError ()
 Dumps all information about the last error to the standard output. More...

void setLastError (Code code, const std::string &strFile, int line, const std::string &strText="")
 Sets all the information about the last error. More...


Protected Methods

 CalError ()
 Constructs the error instance. More...

virtual ~CalError ()
 Destructs the error instance. More...


Static Protected Attributes

Code m_lastErrorCode = CalError::OK
std::string m_strLastErrorFile
int m_lastErrorLine = -1
std::string m_strLastErrorText


Detailed Description

The error class.


Constructor & Destructor Documentation

CalError::CalError   [protected]
 

Constructs the error instance.

This function is the default constructor of the error instance.

CalError::~CalError   [protected, virtual]
 

Destructs the error instance.

This function is the destructor of the error instance.


Member Function Documentation

CalError::Code CalError::getLastErrorCode   [static]
 

Returns the code of the last error.

This function returns the code of the last error that occured inside the library.

Returns:
The code of the last error.

std::string CalError::getLastErrorDescription   [static]
 

Returns a description of the last error.

This function returns a short description of the last error that occured inside the library.

Returns:
The description of the last error.

const std::string & CalError::getLastErrorFile   [static]
 

Returns the name of the file where the last error occured.

This function returns the name of the file where the last error occured.

Returns:
The name of the file where the last error occured.

int CalError::getLastErrorLine   [static]
 

Returns the line number where the last error occured.

This function returns the line number where the last error occured.

Returns:
The line number where the last error occured.

const std::string & CalError::getLastErrorText   [static]
 

Returns the supplementary text of the last error.

This function returns the suppementary text of the last error occured inside the library.

Returns:
The supplementary text of the last error.

void CalError::printLastError   [static]
 

Dumps all information about the last error to the standard output.

This function dumps all the information about the last error that occured inside the library to the standard output.

void CalError::setLastError Code    code,
const std::string &    strFile,
int    line,
const std::string &    strText = ""
[static]
 

Sets all the information about the last error.

This function sets all the information about the last error that occured inside the library.

Parameters:
code  The code of the last error.
strFile  The file where the last error occured.
line  The line number where the last error occured.
strText  The supplementary text of the last error.


The documentation for this class was generated from the following files:
Generated at Sun Oct 12 18:38:49 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch