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

CBadTransitionException Class Reference

#include <CBadTransitionException.h>

Inheritance diagram for CBadTransitionException:

CReadoutException List of all members.

Public Methods

 CBadTransitionException (const char *pOldState, const char *pNewState, const char *pAction)
 CBadTransitionException (const CBadTransitionException &rhs)
 ~CBadTransitionException ()
CBadTransitionException & operator= (const CBadTransitionException &rhs)
int operator== (const CBadTransitionException &rhs)
int operator!= (const CBadTransitionException &rhs)
string getOldState () const
string getDestinationState () const
virtual Int_t ReasonCode () const
virtual const char * ReasonText () const

Protected Methods

void BuildReasonText ()

Private Attributes

string m_sOldState
 Id of state we were in.

string m_sDestinationState
 Name of state we tried to go to.

string m_sReasonText
 Exception reason is built here.


Detailed Description

Encapsulates an exception that can be thrown as a result of attempting to force the state machine through a disallowed transition. Thme Reason code is the value of the state enum at the time of the transition.

Definition at line 304 of file CBadTransitionException.h.


Constructor & Destructor Documentation

CBadTransitionException::CBadTransitionException const char *    pOldState,
const char *    pNewState,
const char *    pAction
 

Constructor. This is called when declarations of the form e.g.:

  • CBadTransitionException object; are performed.
Parameters:
pOldState  - pointer to a null terminated character string which textually describes the current state of the system.
pNewState  - pointer to a null terminated characters string which textually describes the state into which the transition was attempted.
pAction  - Pointer to a null terminated character string which described the action being taken when the exception was detected and thrown.

Definition at line 296 of file CBadTransitionException.cpp.

References BuildReasonText().

CBadTransitionException::CBadTransitionException const CBadTransitionException &    rhs
 

Copy construction. This is invoked when e.g. an object is passed by value to a function. The copy constructor makes a clone of the rhs object.

Parameters:
rhs  - A reference to the object which willl be used to construct the new object.

Definition at line 311 of file CBadTransitionException.cpp.

References BuildReasonText().

CBadTransitionException::~CBadTransitionException   [inline]
 

Definition at line 318 of file CBadTransitionException.h.


Member Function Documentation

void CBadTransitionException::BuildReasonText   [protected]
 

Build the reason text from the state variables of the class and the action information held in the base class. This member function should be called whenever the state of the object is modified. Implicit inputs are:

  • m_sOldState - The prior state.
  • m_sDestinationState - The attempted destination state name.
  • return value from getAction() describing what the program was attempting when the invalid transition was attempted.

Definition at line 384 of file CBadTransitionException.cpp.

References m_sDestinationState, m_sOldState, and m_sReasonText.

Referenced by CBadTransitionException(), and operator=().

string CBadTransitionException::getDestinationState   const [inline]
 

Definition at line 333 of file CBadTransitionException.h.

References m_sDestinationState.

string CBadTransitionException::getOldState   const [inline]
 

Definition at line 329 of file CBadTransitionException.h.

References m_sOldState.

int CBadTransitionException::operator!= const CBadTransitionException &    rhs [inline]
 

Definition at line 322 of file CBadTransitionException.h.

References operator==().

CBadTransitionException & CBadTransitionException::operator= const CBadTransitionException &    rhs
 

Assignment operation. This member function supports assignment of an object of this class to an object of the same class.

Parameters:
rhs  - Reference to the object being assigned to this.
Returns:
A reference to *this after the assignment has been completed.

Definition at line 327 of file CBadTransitionException.cpp.

References BuildReasonText(), m_sDestinationState, m_sOldState, and CReadoutException::operator=().

int CBadTransitionException::operator== const CBadTransitionException &    rhs
 

Equality compare.

Definition at line 342 of file CBadTransitionException.cpp.

References m_sDestinationState, m_sOldState, and CReadoutException::operator==().

Referenced by operator!=().

Int_t CBadTransitionException::ReasonCode   const [virtual]
 

Returns:
Returns the current value of the reason code. This is always -1.

Definition at line 359 of file CBadTransitionException.cpp.

const char * CBadTransitionException::ReasonText   const [virtual]
 

Returns:
a string which describes the exception. The string is built up in the member: m_sReasonText

Definition at line 369 of file CBadTransitionException.cpp.

References m_sReasonText.


Member Data Documentation

string CBadTransitionException::m_sDestinationState [private]
 

Name of state we tried to go to.

Definition at line 308 of file CBadTransitionException.h.

Referenced by BuildReasonText(), getDestinationState(), operator=(), and operator==().

string CBadTransitionException::m_sOldState [private]
 

Id of state we were in.

Definition at line 307 of file CBadTransitionException.h.

Referenced by BuildReasonText(), getOldState(), operator=(), and operator==().

string CBadTransitionException::m_sReasonText [private]
 

Exception reason is built here.

Definition at line 309 of file CBadTransitionException.h.

Referenced by BuildReasonText(), and ReasonText().


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 13:37:09 2002 for Event Readout system. by doxygen1.2.16