An Implementation of the Marching Cubes Algorithm
1.0
|
This class extends the class exception of STL, providing a customized way of dealing with exceptions. More...
#include <exceptionobject.hpp>
Public Member Functions | |
ExceptionObject (const char *file="Unknown", unsigned int line=0, const char *desc="None") | |
Creates an instance of this class. | |
ExceptionObject (const std::string &file, unsigned int line, const std::string &desc="None") | |
Creates an instance of this class. | |
ExceptionObject (const ExceptionObject &xpt) | |
Creates an instance of this class from another instance of this class. | |
virtual | ~ExceptionObject () throw () |
Destroys an instance of this class. | |
ExceptionObject & | operator= (const ExceptionObject &xpt) |
Copies the state of a given exception to this exception. | |
virtual const char * | get_name_of_class () const |
Gets the name of this class. | |
virtual void | set_description (const std::string &s) |
Assigns a description to this exception. | |
virtual void | set_description (const char *s) |
Assigns a description to this exception. | |
virtual const char * | get_description () const |
Gets the description of this exception. | |
virtual const char * | get_file () const |
Gets the name of the file containing the code that threw the exception. | |
virtual unsigned int | get_line () const |
Gets the number of the line that threw the exception. | |
virtual const char * | what () const throw () |
Gets a description for the exception. | |
Private Attributes | |
std::string | _desc |
Description of the error. | |
std::string | _file |
File where the error occured. | |
unsigned int | _line |
Line of the file where the error occured. |
This class extends the class exception of STL, providing a customized way of dealing with exceptions.
Definition at line 70 of file exceptionobject.hpp.
common::ExceptionObject::ExceptionObject | ( | const char * | file = "Unknown" , |
unsigned int | line = 0 , |
||
const char * | desc = "None" |
||
) | [inline] |
Creates an instance of this class.
file | A file with the code that threw the exception. |
line | The number of line (in the file) that threw the exception. |
desc | A description of the exception. |
Definition at line 88 of file exceptionobject.hpp.
common::ExceptionObject::ExceptionObject | ( | const std::string & | file, |
unsigned int | line, | ||
const std::string & | desc = "None" |
||
) | [inline] |
Creates an instance of this class.
file | A file with the code that threw the exception. |
line | The number of line (in the file) that threw the exception. |
desc | A description of the exception. |
Definition at line 110 of file exceptionobject.hpp.
common::ExceptionObject::ExceptionObject | ( | const ExceptionObject & | xpt | ) | [inline] |
const char * common::ExceptionObject::get_description | ( | ) | const [inline, virtual] |
Gets the description of this exception.
Definition at line 211 of file exceptionobject.hpp.
References _desc.
{ return _desc.c_str() ; }
const char * common::ExceptionObject::get_file | ( | ) | const [inline, virtual] |
Gets the name of the file containing the code that threw the exception.
Definition at line 226 of file exceptionobject.hpp.
References _file.
{ return _file.c_str() ; }
unsigned int common::ExceptionObject::get_line | ( | ) | const [inline, virtual] |
Gets the number of the line that threw the exception.
Definition at line 239 of file exceptionobject.hpp.
References _line.
{ return _line ; }
const char * common::ExceptionObject::get_name_of_class | ( | ) | const [inline, virtual] |
Gets the name of this class.
Definition at line 172 of file exceptionobject.hpp.
{ return "ExceptionObject" ; }
ExceptionObject & common::ExceptionObject::operator= | ( | const ExceptionObject & | xpt | ) | [inline] |
void common::ExceptionObject::set_description | ( | const std::string & | s | ) | [inline, virtual] |
Assigns a description to this exception.
s | A string containing an exception description. |
Definition at line 185 of file exceptionobject.hpp.
References _desc.
{ _desc = s ; }
void common::ExceptionObject::set_description | ( | const char * | s | ) | [inline, virtual] |
Assigns a description to this exception.
s | A string containing an exception description. |
Definition at line 198 of file exceptionobject.hpp.
References _desc.
{ _desc = s ; }
const char * common::ExceptionObject::what | ( | ) | const throw () [inline, virtual] |
Gets a description for the exception.
Definition at line 252 of file exceptionobject.hpp.
References _desc.
{ return _desc.c_str() ; }