#include <boost/signals2/signal.hpp>
Go to the source code of this file.
◆ DDS_BEGIN_EVENT_HANDLERS
#define DDS_BEGIN_EVENT_HANDLERS |
( |
|
eventType | ) |
|
Value:public: \
template <class... Args> \
void dispatchHandlers(eventType _cmd, const SSenderInfo& _sender, Args&... args) \
{ \
CBaseEventHandlersImpl<eventType>::dispatchHandlersImpl<>(_cmd, _sender, std::forward<Args>(args)...); \
} \
\
public: \
bool handlerExists(eventType _cmd) const \
{ \
return CBaseEventHandlersImpl<eventType>::handlerExistsImpl(_cmd); \
}
◆ DDS_DECLARE_EVENT_HANDLER_CLASS
#define DDS_DECLARE_EVENT_HANDLER_CLASS |
( |
|
theClass | ) |
|
Value:using theClass::registerHandler; \
using theClass::dispatchHandlers; \
using theClass::handlerExists;
◆ DDS_END_EVENT_HANDLERS
#define DDS_END_EVENT_HANDLERS |
◆ DDS_REGISTER_EVENT_HANDLER
#define DDS_REGISTER_EVENT_HANDLER |
( |
|
eventType, |
|
|
|
eventID, |
|
|
|
funcType |
|
) |
| |
Value:public: \
template <eventType _cmd, typename func_t> \
void registerHandler( \
func_t _handler, \
typename std::enable_if<std::is_same<std::integral_constant<eventType, _cmd>, \
std::integral_constant<eventType, eventID>>::value && \
std::is_convertible<func_t, std::function<funcType>>::value>::type* = nullptr) \
{ \
std::function<funcType> funcHandler(_handler); \
CBaseEventHandlersImpl<eventType>::registerHandlerImpl<_cmd>(funcHandler); \
}