rad  3.0.0
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

◆ DECLARE_EVENT

#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.

◆ DECLARE_VOID_EVENT

#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.
wscript.name
name
Definition: wscript:8