IStateController.h
Go to the documentation of this file.
1 #ifndef iproc_IStateController_included
2 #define iproc_IStateController_included
3 
4 
5 #include "istd/IChangeable.h"
6 
7 
8 namespace iproc
9 {
10 
11 
15 class IStateController: virtual public istd::IChangeable
16 {
17 public:
19  {
20  CF_STATE_ENTERED = 0x100000,
21  CF_STATE_LEAVED = 0x200000,
22  CF_GRAPH_CHANGED = 0x400000,
23  CF_STATE_ENABLED = 0x800000
24  };
25 
31  virtual bool IsStateEnabled() const = 0;
32 
38  virtual bool IsStateActive() const = 0;
39 
47  virtual bool IsEnterAllowed(bool isActionAllowed = true, const IStateController* prevStatePtr = NULL) const = 0;
48 
56  virtual bool IsLeaveAllowed(bool isActionAllowed = true, const IStateController* nextStatePtr = NULL) const = 0;
57 
64  virtual bool TryEnterState(bool isActionAllowed = true, const IStateController* prevStatePtr = NULL) = 0;
65 
72  virtual bool TryLeaveState(bool isActionAllowed = true, const IStateController* nextStatePtr = NULL) = 0;
73 
78  virtual bool IsResetAllowed() const = 0;
79 };
80 
81 
82 } // namespace iproc
83 
84 
85 #endif // !iproc_IStateController_included
86 
87 
virtual bool IsStateEnabled() const =0
Check if state is enabled.
Interface for a wizard page status info.
virtual bool IsEnterAllowed(bool isActionAllowed=true, const IStateController *prevStatePtr=NULL) const =0
Check if entering of this page is allowed.
virtual bool IsResetAllowed() const =0
Check if reseting is allowed.
virtual bool IsStateActive() const =0
Check if this state is active.
virtual bool TryLeaveState(bool isActionAllowed=true, const IStateController *nextStatePtr=NULL)=0
Try leave this state.
virtual bool TryEnterState(bool isActionAllowed=true, const IStateController *prevStatePtr=NULL)=0
Try enter this state.
virtual bool IsLeaveAllowed(bool isActionAllowed=true, const IStateController *nextStatePtr=NULL) const =0
Check if this state can be leaved.

© 2007-2011 Witold Gantzke and Kirill Lepskiy