|
CHSM
4.4.1
|
A parent is-an abstract state that has child states. More...
#include <chsm.h>
Classes | |
| class | const_iterator |
| This is an iterator in "STL style" to iterate over the child states of a parent state. More... | |
| class | iterator |
| This is an iterator in "STL style" to iterate over the child states of a parent state. More... | |
Public Types | |
| 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... | |
Public Types inherited from CHSM::state | |
| typedef void(machine::* | action )(state const &s, event const &trigger) |
| An action is a function (machine member function) that is optionally called upon enter/exit of a state. More... | |
| typedef int | id |
| The identification number of a state. More... | |
Public Member Functions | |
| 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 | |
Protected Member Functions inherited from CHSM::state | |
| virtual bool | enter (event const &trigger, state *from_child=0) |
| Enter a state. More... | |
| virtual bool | exit (event const &trigger, state *to=0) |
| Exit a state. More... | |
A parent is-an abstract state that has child states.
It is an implementation detail to factor common data members and member functions for the CHSM::cluster and CHSM::set classes.
| typedef value_type const* CHSM::parent::const_pointer |
A pointer to a const value_type.
| typedef value_type const& CHSM::parent::const_reference |
A reference to a const value_type.
| typedef value_type* CHSM::parent::pointer |
A pointer to a value_type.
| typedef value_type& CHSM::parent::reference |
A reference to a value_type.
| typedef state CHSM::parent::value_type |
The type of the value returned by iterator and const_iterator.
|
inline |
Returns a parent::iterator positioned at the first child state of a parent.
Referenced by deep_clear().
|
inline |
Returns a parent::const_iterator positioned at the first child state of a parent.
|
virtual |
Clears this parent's history.
However, since parents don't have a history, there is nothing to do for them; however, call deep_clear() for all child states.
Reimplemented from CHSM::state.
Reimplemented in CHSM::cluster.
References begin(), and end().
Referenced by CHSM::cluster::deep_clear().
|
inline |
Returns whether this parent has any child states.
true only if this parent has any child states. Referenced by CHSM::cluster::enter().
|
inline |
Returns a parent::iterator positioned at one past the last child state of a parent.
Referenced by deep_clear().
|
inline |
Returns a parent::const_iterator positioned at one past the last child state of a parent.
|
inline |
Returns a parent::reference to the first child state.
Referenced by CHSM::cluster::enter().
|
inline |
Returns a parent::const_reference to the first child state.
1.8.3.1