# smach< CON, K, M >::state_base Class Reference

`#include <_smach.h>`

Inheritance diagram for smach< CON, K, M >::state_base:

List of all members.

## Public Member Functions

virtual | ~state_base ()
virtual void * | enter_state (context_type *machine_context) const =0
virtual bool | leave_state (void *state_context) const =0
virtual event_result | process_event (void *state_context, const event &id) const =0
virtual const char * | get_name () const =0

## Friends

class | smach

## Detailed Description

### template<typename CON, typename K = int, typename M = mutex_null>
class smach< CON, K, M >::state_base

Definition at line 148 of file _smach.h.

## Constructor & Destructor Documentation

template<typename CON, typename K = int, typename M = mutex_null>

virtual smach< CON, K, M >::state_base::~state_base | ( |  | ) | `[inline, virtual]`

Definition at line 153 of file _smach.h.

## Member Function Documentation

template<typename CON, typename K = int, typename M = mutex_null>

virtual void* smach< CON, K, M >::state_base::enter_state | ( | context_type * | machine_context | ) | const`[pure virtual]`

Implemented in smach< CON, K, M >::state< T >.

Referenced by smach< CON, K, M >::enter(), smach< CON, K, M >::push_state(), and smach< CON, K, M >::set_default_state().

template<typename CON, typename K = int, typename M = mutex_null>

virtual bool smach< CON, K, M >::state_base::leave_state | ( | void * | state_context | ) | const`[pure virtual]`

Implemented in smach< CON, K, M >::state< T >.

Referenced by smach< CON, K, M >::egress(), smach< CON, K, M >::pop_state(), smach< CON, K, M >::set_default_state(), and smach< CON, K, M >::~smach().

template<typename CON, typename K = int, typename M = mutex_null>

virtual event_result smach< CON, K, M >::state_base::process_event | ( | void * | state_context,
|  | const event & | id |
| ) |  |  | const`[pure virtual]`

Implemented in smach< CON, K, M >::state< T >.

Referenced by smach< CON, K, M >::process_event().

template<typename CON, typename K = int, typename M = mutex_null>

virtual const char* smach< CON, K, M >::state_base::get_name | ( |  | ) | const`[pure virtual]`

Implemented in smach< CON, K, M >::state< T >.

Referenced by smach< CON, K, M >::get_state_name().

## Friends And Related Function Documentation

template<typename CON, typename K = int, typename M = mutex_null>

friend class smach `[friend]`

Reimplemented in smach< CON, K, M >::state< T >.

Definition at line 151 of file _smach.h.

The documentation for this class was generated from the following file:

- _smach.h