CStateControllerCompBase.h
Go to the documentation of this file.
1 #ifndef iwiz_CStateControllerCompBase_included
2 #define iwiz_CStateControllerCompBase_included
3 
4 
5 // ACF includes
6 #include "icomp/CComponentBase.h"
7 
9 
10 
11 namespace iwiz
12 {
13 
14 
16  public icomp::CComponentBase,
17  virtual public iproc::IStateController
18 {
19 public:
21 
22  I_BEGIN_COMPONENT(CStateControllerCompBase);
23  I_REGISTER_INTERFACE(iproc::IStateController);
24  I_REGISTER_INTERFACE(istd::IChangeable);
25  I_END_COMPONENT;
26 
28 
29  // reimplemented (iproc::IStateController)
30  virtual bool IsStateEnabled() const;
31  virtual bool IsStateActive() const;
32  virtual bool IsEnterAllowed(bool isActionAllowed = true, const IStateController* prevStatePtr = NULL) const;
33  virtual bool IsLeaveAllowed(bool isActionAllowed = true, const IStateController* nextStatePtr = NULL) const;
34  virtual bool TryEnterState(bool isActionAllowed = true, const IStateController* prevStatePtr = NULL);
35  virtual bool TryLeaveState(bool isActionAllowed = true, const IStateController* nextStatePtr = NULL);
36  virtual bool IsResetAllowed() const;
37 
38 protected:
39  mutable bool m_isStateActive;
40  mutable bool m_isStateEnabled;
41  mutable bool m_isEnterAllowed;
42  mutable bool m_isLeaveAllowed;
43 };
44 
45 
46 } // namespace iwiz
47 
48 
49 #endif // !iwiz_CStateControllerCompBase_included
50 
51 
virtual bool IsEnterAllowed(bool isActionAllowed=true, const IStateController *prevStatePtr=NULL) const
virtual bool IsResetAllowed() const
Check if reseting is allowed.
Interface for a wizard page status info.
virtual bool TryEnterState(bool isActionAllowed=true, const IStateController *prevStatePtr=NULL)
virtual bool IsLeaveAllowed(bool isActionAllowed=true, const IStateController *nextStatePtr=NULL) const
virtual bool IsStateActive() const
Check if this state is active.
virtual bool IsStateEnabled() const
Check if state is enabled.
virtual bool TryLeaveState(bool isActionAllowed=true, const IStateController *nextStatePtr=NULL)

© 2007-2011 Witold Gantzke and Kirill Lepskiy