10#ifndef RAD_SM_EVENT_HPP
11#define RAD_SM_EVENT_HPP
40template <
typename EVENT>
51 EVENT* ev =
static_cast<EVENT*
>(e->
getPayload());
53 throw rad::Exception(
"Cannot cast from SCXML4CPP last event to specific EVENT type.");
61template <
typename EVENT>
63 const EVENT& ev = GetLastEvent<EVENT>(c);
64 if (
typeid(ev) !=
typeid(EVENT)) {
70template <
typename EVENT>
82 return rad::GetPayloadNothrow<EVENT>(e->
GetEv());
AnyEvent class header file.
Definition anyEvent.hpp:52
Base class for the exceptions thrown by RAD and its users.
Definition exceptions.hpp:53
Definition smEvent.hpp:25
SMEvent()
Definition smEvent.cpp:17
virtual ~SMEvent()
Definition smEvent.cpp:38
SMEvent & operator=(const SMEvent &e)
Definition smEvent.cpp:46
void SetEv(AnyEvent const &ev)
Definition smEvent.cpp:62
AnyEvent const & GetEv() const
Definition smEvent.cpp:57
Event * getLastEvent() const
Definition Context.cpp:80
void * getPayload() const
Definition Event.cpp:106
Exception classes header file.
getPayload functions source file.
Definition actionsApp.cpp:23
const EVENT & GetLastEvent(scxml4cpp::Context *c)
Definition smEvent.hpp:41
std::unique_ptr< AnyEvent > UniqueEvent
Definition anyEvent.hpp:45
EVENT::payload_t const * GetLastEventPayloadNothrow(scxml4cpp::Context *c)
Definition smEvent.hpp:71
EVENT::payload_t & GetLastEventPayload(scxml4cpp::Context *c)
Definition smEvent.hpp:62
const rad::AnyEvent & GetLastAnyEvent(scxml4cpp::Context *c)
Definition smEvent.cpp:69
EVENT::payload_t & GetPayload(AnyEvent &ev)
Definition getPayload.hpp:29
Definition anyEvent.hpp:19