FRIBParallelanalysis
1.0
FrameworkforMPIParalleldataanalysisatFRIB
|
#include <StateException.h>
Public Member Functions | |
CStateException (const char *state, const char *allowedStates, const char *pAction) | |
virtual | ~CStateException () |
CStateException (const CStateException &rhs) | |
CStateException & | operator= (const CStateException &rhs) |
int | operator== (const CStateException &rhs) const |
int | operator!= (const CStateException &rhs) const |
virtual const char * | ReasonText () const |
virtual int | ReasonCode () const |
![]() | |
CException (const char *pszAction) | |
CException (const std::string &rsAction) | |
CException (const CException &aCException) | |
CException & | operator= (const CException &aCException) |
int | operator== (const CException &aCException) const |
int | operator!= (const CException &rException) const |
const char * | getAction () const |
const char * | WasDoing () const |
Additional Inherited Members | |
![]() | |
void | setAction (const char *pszAction) |
void | setAction (const std::string &rsAction) |
virtual void | DoAssign (const CException &rhs) |
This class provides an exception that can be thrown if a program detects a 'state mismatch'. A state mismatch is said to occur when something is requested of an object, but its internal state forbids that service from being rendered to the client. In particular, this was developed to deal with services being requested in the TCL class library of objects that require an interpreter to satisfy, when objects were not (yet) bound to an interpreter.
CStateException::CStateException | ( | const char * | state, |
const char * | allowedStates, | ||
const char * | pAction | ||
) |
Construct a state exception.
state | : const char* Describes the state the object is in. |
allowedStates | : const char* Describes the state the object should be in to be able to perform the request. |
pAction | : const char* Describes what the program is doing at the time of the exception. |
|
virtual |
Destruction is a no-op.
CStateException::CStateException | ( | const CStateException & | rhs | ) |
Copy construction.. just need to construct the base class and our reason string.
int CStateException::operator!= | ( | const CStateException & | rhs | ) | const |
Inequality comparision.. this is just the inverse of equality compare.
CStateException & CStateException::operator= | ( | const CStateException & | rhs | ) |
Asignment operator. base class assign and then assign our reason text.
int CStateException::operator== | ( | const CStateException & | rhs | ) | const |
Equality comparison... if base class and reason text are the same.
|
virtual |
Reason code is always meaningless so we return a -1.
Reimplemented from CException.
|
virtual |
Return the reason for the exception. This was stored at construction time in m_Reason.
m_Reason.c_str() |
Reimplemented from CException.