#include <_smach.h>
Inheritance diagram for smach< CON, K, M >::state< T >:

Public Types | |
| typedef event_def< T > | event_def |
| typedef T | state_context_type |
Public Member Functions | |
| state (const char *n, smach *nest=0) | |
| Constructor. | |
| virtual | ~state () |
| void | set_nested_machine (smach *sm) |
| Setup a nested state machine. | |
| void | set_default_handler (const typename event_def::funcptr &x) |
| Sets the default handler. | |
| virtual const char * | get_name () const |
| Returns given the name of the state. | |
| state_context_type & | get_context (smach &machine) |
| void | insert (const event_def &x) |
| Adds an event_def onto the list and then make sure it is sorted correctly. | |
| std::vector< event_def >::iterator | find (const event_key &x) |
| std::vector< event_def >::const_iterator | find (const event_key &x) const |
Protected Member Functions | |
| virtual void * | enter_state (context_type *machine_context) const |
| virtual bool | leave_state (void *x) const |
| virtual event_result | process_event (void *x, const event &id) const |
Private Attributes | |
| std::vector< event_def > | event_list |
| smach * | nested |
| event_key | low |
| Nested machine. | |
| event_key | high |
| const char * | name |
| Lowest and Highest event values. | |
| event_def::funcptr | default_handler |
| Name of the state. | |
Friends | |
| class | smach |
Definition at line 165 of file _smach.h.
| typedef T smach< CON, K, M >::state< T >::state_context_type |
| void smach< CON, K, M >::state< T >::set_nested_machine | ( | smach * | sm | ) | [inline] |
Setup a nested state machine.
A more detailed explanation needs to be written
Definition at line 195 of file _smach.h.
References smach< CON, K, M >::state< T >::nested.
| void smach< CON, K, M >::state< T >::set_default_handler | ( | const typename event_def::funcptr & | x | ) | [inline] |
Sets the default handler.
Definition at line 198 of file _smach.h.
References smach< CON, K, M >::state< T >::default_handler.
| virtual const char* smach< CON, K, M >::state< T >::get_name | ( | ) | const [inline, virtual] |
Returns given the name of the state.
Implements smach< CON, K, M >::state_base.
Definition at line 201 of file _smach.h.
References smach< CON, K, M >::state< T >::name.
| state_context_type& smach< CON, K, M >::state< T >::get_context | ( | smach & | machine | ) | [inline] |
| void smach< CON, K, M >::state< T >::insert | ( | const event_def & | x | ) | [inline] |
Adds an event_def onto the list and then make sure it is sorted correctly.
Definition at line 213 of file _smach.h.
References smach< CON, K, M >::state< T >::event_list, smach< CON, K, M >::state< T >::high, smach< CON, K, M >::event_def< T >::id, and smach< CON, K, M >::state< T >::low.
| std::vector<event_def>::iterator smach< CON, K, M >::state< T >::find | ( | const event_key & | x | ) | [inline] |
Definition at line 231 of file _smach.h.
References binary_find(), and smach< CON, K, M >::state< T >::event_list.
Referenced by smach< CON, K, M >::state< T >::process_event().
| std::vector<event_def>::const_iterator smach< CON, K, M >::state< T >::find | ( | const event_key & | x | ) | const [inline] |
Definition at line 232 of file _smach.h.
References binary_find(), and smach< CON, K, M >::state< T >::event_list.
| virtual void* smach< CON, K, M >::state< T >::enter_state | ( | context_type * | machine_context | ) | const [inline, protected, virtual] |
| virtual bool smach< CON, K, M >::state< T >::leave_state | ( | void * | x | ) | const [inline, protected, virtual] |
Implements smach< CON, K, M >::state_base.
Definition at line 241 of file _smach.h.
References smach< CON, K, M >::state_context.
| virtual event_result smach< CON, K, M >::state< T >::process_event | ( | void * | x, | |
| const event & | id | |||
| ) | const [inline, protected, virtual] |
Implements smach< CON, K, M >::state_base.
Definition at line 249 of file _smach.h.
References smach< CON, K, M >::state< T >::default_handler, smach< CON, K, M >::state< T >::find(), smach< CON, K, M >::state< T >::high, smach< CON, K, M >::state< T >::low, smach< CON, K, M >::state< T >::nested, smach< CON, K, M >::process_event(), smach< CON, K, M >::RESULT_OK, and smach< CON, K, M >::state_context.
friend class smach [friend] |
std::vector<event_def> smach< CON, K, M >::state< T >::event_list [private] |
Definition at line 177 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::find(), and smach< CON, K, M >::state< T >::insert().
smach* smach< CON, K, M >::state< T >::nested [private] |
Definition at line 179 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::process_event(), and smach< CON, K, M >::state< T >::set_nested_machine().
event_key smach< CON, K, M >::state< T >::low [private] |
Nested machine.
Definition at line 180 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::insert(), and smach< CON, K, M >::state< T >::process_event().
event_key smach< CON, K, M >::state< T >::high [private] |
Definition at line 180 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::insert(), and smach< CON, K, M >::state< T >::process_event().
const char* smach< CON, K, M >::state< T >::name [private] |
Lowest and Highest event values.
Definition at line 181 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::get_name().
event_def::funcptr smach< CON, K, M >::state< T >::default_handler [private] |
Name of the state.
Definition at line 182 of file _smach.h.
Referenced by smach< CON, K, M >::state< T >::process_event(), and smach< CON, K, M >::state< T >::set_default_handler().
1.5.2