Elma
An event loop manager for embedded systems
All Classes Files Functions Variables Enumerations Pages
state.cc
1 #include "elma.h"
2 
3 namespace elma {
4 
5  void State::emit(const Event& e) {
6  if ( _state_machine_ptr == NULL ) {
7  throw Exception("Cannot access events in a state before the is added to a state machine.");
8  } else {
9  _state_machine_ptr->emit(e);
10  }
11  }
12 
13 }
Events that can be emitted, watched, and responded to with event handlers.
Definition: event.h:23
An exception class for Elma.
Definition: exceptions.h:13
void emit(const Event &e)
Definition: state.cc:5
Definition: channel.cc:5