|
CHSM
4.4.1
|
A set is-a CHSM::parent that has either all or no child-states active. More...
#include <chsm.h>
Public Member Functions | |
| virtual bool | enter (event const &trigger, state *from_child=0) |
| Enters a set via a transition and also enter all of its child states. More... | |
| virtual bool | exit (event const &trigger, state *to=0) |
| Exits a set via a transition, but first exit all of its child states. More... | |
| set (CHSM_SET_ARGS) | |
| Constructs a set. More... | |
Public Member Functions inherited from CHSM::parent | |
| iterator | begin () |
| Returns a parent::iterator positioned at the first child state of a parent. More... | |
| const_iterator | begin () const |
| Returns a parent::const_iterator positioned at the first child state of a parent. More... | |
| virtual void | deep_clear () |
| Clears this parent's history. More... | |
| bool | empty () const |
| Returns whether this parent has any child states. More... | |
| iterator | end () |
| Returns a parent::iterator positioned at one past the last child state of a parent. More... | |
| const_iterator | end () const |
| Returns a parent::const_iterator positioned at one past the last child state of a parent. More... | |
| reference | front () |
| Returns a parent::reference to the first child state. More... | |
| const_reference | front () const |
| Returns a parent::const_reference to the first child state. More... | |
Public Member Functions inherited from CHSM::state | |
| bool | active () const |
| Returns whether this state is active. More... | |
| char const * | name () const |
| Return the name of the state. More... | |
| parent * | parent_of () const |
| Return the parent cluster or set. More... | |
| state (CHSM_STATE_ARGS) | |
| Construct a state. More... | |
| ~state () | |
| Destroy a state. More... | |
Additional Inherited Members | |
Public Types inherited from CHSM::parent | |
| typedef value_type const * | const_pointer |
A pointer to a const value_type. More... | |
| typedef value_type const & | const_reference |
A reference to a const value_type. More... | |
| typedef value_type * | pointer |
A pointer to a value_type. More... | |
| typedef value_type & | reference |
A reference to a value_type. More... | |
| typedef state | value_type |
| The type of the value returned by iterator and const_iterator. More... | |
A set is-a CHSM::parent that has either all or no child-states active.
All child-states are entered after and exited before their parent-state. The order that child-states are entered and exited is undefined.
The % set class can be extended either to add additional data members and member functions, or to alter its behavior upon being entered or exited.
|
inline |
Constructs a set.
When deriving a class from set, the macros CHSM_SET_ARGS and CHSM_SET_INIT can be used to avoid having to deal with the many constructor arguments. See CHSM::state for an example.
Enters a set via a transition and also enter all of its child states.
| trigger | The event that triggered the transition. |
| from_child | Not used here. |
true only if the set was actually entered, i.e., it wasn't already active. Reimplemented from CHSM::state.
Exits a set via a transition, but first exit all of its child states.
| trigger | The event that triggered the transition. |
| to | The state we are transitioning to. |
true only if the set actually exited, i.e., it was active. Reimplemented from CHSM::state.
1.8.3.1