11 #ifndef EVENT_ADJUSTER_49D9A1B8_827D_4FE4_8789_07E6AA5A77E5 12 #define EVENT_ADJUSTER_49D9A1B8_827D_4FE4_8789_07E6AA5A77E5 17 #include "essentials/base.hpp" 18 #include "hermes/log.hpp" 26 template<
typename _event_type>
30 return( static_cast< const _event_type& >( _event ) );
32 const _event_type*
const specialized_event =
dynamic_cast< const _event_type*
const >( &_event );
33 const std::string message =
"Event " + _event.
get_name() +
" is not of given type.";
34 if( !specialized_event )
36 SX_LOG( hermes::log_level::LL_ASSERT, message );
37 SX_ASSERT(
false,
"Invalid event type!" );
39 return( *specialized_event );
Interface of an event. An event has an ID, a name and a priority (for processing by the async state m...
Definition: event.hpp:28
const _event_type & adjust_event_type(const event &_event)
Definition: event_adjuster.hpp:27
Definition: adapter_cpp11.hpp:21
Class that inherits event_impl and provides a fixed event ID and priority as well as create methods f...
Definition: specialized_event.hpp:26
virtual std::string get_name() const =0
Getter of event's name.