FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
StateException.h
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2005.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Author:
11  Ron Fox
12  NSCL
13  Michigan State University
14  East Lansing, MI 48824-1321
15 */
16 
17 #ifndef STATEEXCEPTION_H
18 #define STATEEXCEPTION_H
19 
20 #ifndef EXCEPTION_H
21 #include <Exception.h>
22 #endif
23 
24 #include <string>
25 
37 {
38 private:
39  std::string m_Reason;
40 public:
41  // Constructors and other canonicals:
42 
43  CStateException(const char* state, const char* allowedStates,
44  const char* pAction);
45  virtual ~CStateException();
46  CStateException(const CStateException& rhs);
48  int operator==(const CStateException& rhs) const;
49  int operator!=(const CStateException& rhs) const;
50 
51 
52  // Overrides so this can function correctly as a CException:
53 
54  virtual const char* ReasonText() const;
55  virtual int ReasonCode() const;
56 
57 };
58 
59 #endif
virtual const char * ReasonText() const
Definition: StateException.cpp:108
int operator!=(const CStateException &rhs) const
Definition: StateException.cpp:93
CStateException(const char *state, const char *allowedStates, const char *pAction)
Definition: StateException.cpp:34
int operator==(const CStateException &rhs) const
Definition: StateException.cpp:83
Definition: StateException.h:36
CStateException & operator=(const CStateException &rhs)
Definition: StateException.cpp:70
virtual int ReasonCode() const
Definition: StateException.cpp:117
Definition: Exception.h:41
virtual ~CStateException()
Definition: StateException.cpp:50