ScEng::Status Class Reference

This class is used for error handling. More...

#include <status.h>

List of all members.

Public Types

enum  StatusCode { success, warning, failure, invalid_parameter }
 The available status codes. More...

Public Member Functions

 Status ()
 Default class constructor. Sets the status code to success.
 Status (StatusCode status_code)
 Status (const Status &status)
Statusoperator= (const Status &s)
bool operator== (const Status &s) const
bool operator== (const StatusCode s) const
bool operator!= (const Status &s) const
bool operator!= (const StatusCode s) const
bool Error () const
std::string ErrorString () const
 Returns the error string.
void SetSuccess ()
 Sets the status code to Status::success.
void Set (StatusCode status_code, std::string error_string="")


Detailed Description

This class is used for error handling.


Member Enumeration Documentation

enum ScEng::Status::StatusCode

The available status codes.

Enumerator:
success  The operation was successful.
warning  The operation succeeded, but a warning was thrown.
failure  The operation failed.
invalid_parameter  The operation failed because a invalid parameter was provided.


Constructor & Destructor Documentation

ScEng::Status::Status ( StatusCode  status_code  ) 

Class constructor that initializes the status_code.

Parameters:
status_code the initial status code.

ScEng::Status::Status ( const Status status  ) 

The copy constructor of the class

Parameters:
status The status to be copied


Member Function Documentation

Status & ScEng::Status::operator= ( const Status s  )  [inline]

The copy operator of the class

Parameters:
s The status to be copied

bool ScEng::Status::operator== ( const Status s  )  const [inline]

Equal operator.

Parameters:
s the reference status
Returns:
true the two status objects are equal

false the two status objects are not equal

bool ScEng::Status::operator== ( const StatusCode  s  )  const [inline]

Equal operator.

Parameters:
s the reference status code
Returns:
true the status code of the object is equal to the given status code

false the status code of the object is not equal to the given status code

bool ScEng::Status::operator!= ( const Status s  )  const [inline]

Not equal operator.

Parameters:
s the reference status
Returns:
true the two status objects are not equal

false the two status objects are equal

bool ScEng::Status::operator!= ( const StatusCode  s  )  const [inline]

Equal operator.

Parameters:
s the reference status code
Returns:
true the status code of the object is not equal to the given status code

false the status code of the object is equal to the given status code

bool ScEng::Status::Error (  )  const [inline]

Returns true if there is an error.

Returns:
true if an error occurred.

false if an error didn't occurred.

void ScEng::Status::Set ( StatusCode  status_code,
std::string  error_string = "" 
)

Sets the status

Parameters:
status_code the new status code for the object
error_string the new error string for the object


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:23 2007 for SceneEngine by  doxygen 1.5.1-p1