rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
traits.hpp File Reference

header file. More...

Go to the source code of this file.

Macros

#define DECLARE_EVENT(name, type)
 
#define DECLARE_VOID_EVENT(name)
 

Detailed Description

header file.

Author
crosenqu

Macro Definition Documentation

#define DECLARE_EVENT (   name,
  type 
)
Value:
struct name { \
static constexpr char const* ID = #name; \
using payload_t = type; \
}

Helper macro to define events with a payload.

Note
The runtime id will be the same as the Event type name.
#define DECLARE_VOID_EVENT (   name)
Value:
struct name { \
static constexpr char const* ID = #name; \
using payload_t = void; \
}

Helper macro to define events without a payload.

Note
The runtime id will be the same as the Event type name.