ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | List of all members
EventHandler< T > Class Template Reference

Public Types

enum  execState_e {
  NOOP , INITIALIZE , EXECUTE , TERMINATE ,
  DONE
}
 enumerations for the execution state More...
 
enum  retVal_e { SUCCESS , RESET , INPROGRESS , SHUTDOWN }
 enumerations for the return state
 

Public Member Functions

virtual retVal_e Initialize (T *state)
 perform all initialization activities for a specific task More...
 
virtual retVal_e Execute (T *state)
 perform the core activity More...
 
virtual retVal_e Terminate (T *state)
 perform termination activities More...
 
bool RunEvent (T *state)
 Run this event. More...
 
void ExecuteHandler (std::shared_ptr< EventHandler< T > > hdl, std::string eventName, float priorityNew=0)
 Spawn another handler. More...
 

Public Attributes

std::string eventName
 event name
 
execState_e execState
 current execution state for this handler
 
std::list< std::shared_ptr< EventHandler< T > > > children
 list of child handlers
 
float priority
 current execution priority
 
float defaultPriority
 user defined priority for this handler
 

Member Enumeration Documentation

◆ execState_e

template<class T >
enum EventHandler::execState_e


Member Function Documentation

◆ Execute()

template<class T >
virtual retVal_e EventHandler< T >::Execute ( T *  state)
inlinevirtual

◆ ExecuteHandler()

template<class T >
void EventHandler< T >::ExecuteHandler ( std::shared_ptr< EventHandler< T > >  hdl,
std::string  eventName,
float  priorityNew = 0 
)
Parameters
hdlpointer to the other handler
eventName
priorityNew

◆ Initialize()

template<class T >
virtual retVal_e EventHandler< T >::Initialize ( T *  state)
inlinevirtual

◆ RunEvent()

template<class T >
bool EventHandler< T >::RunEvent ( T *  state)
Parameters
state
Returns
true
false

◆ Terminate()

template<class T >
virtual retVal_e EventHandler< T >::Terminate ( T *  state)
inlinevirtual

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