ezEngine  Milestone 7
GlobalEvent.h File Reference
#include <Foundation/Types/Variant.h>
#include <Foundation/Containers/Map.h>
#include <Foundation/Strings/String.h>
#include <Foundation/Utilities/EnumerableClass.h>

Go to the source code of this file.

Classes

class  ezGlobalEvent
 A class to broadcast and handle global (system-wide) events. More...
 
struct  ezGlobalEvent::EventData
 

Macros

#define EZ_ON_GLOBAL_EVENT(name)
 Use this macro to handle an event every time it is broadcast (place function code in curly brackets after it) More...
 
#define EZ_ON_GLOBAL_EVENT_ONCE(name)
 Use this macro to handle an event only once (place function code in curly brackets after it) More...
 

Macro Definition Documentation

#define EZ_ON_GLOBAL_EVENT (   name)
Value:
static void EventHandler_##name (const ezVariant& param0, const ezVariant& param1, const ezVariant& param2, const ezVariant& param3); \
static ezGlobalEvent s_EventHandler_##name (#name, EventHandler_##name, false); \
static void EventHandler_##name (const ezVariant& param0, const ezVariant& param1, const ezVariant& param2, const ezVariant& param3)

Use this macro to handle an event every time it is broadcast (place function code in curly brackets after it)

#define EZ_ON_GLOBAL_EVENT_ONCE (   name)
Value:
static void EventHandler_##name (const ezVariant& param0, const ezVariant& param1, const ezVariant& param2, const ezVariant& param3); \
static ezGlobalEvent s_EventHandler_##name (#name, EventHandler_##name, true); \
static void EventHandler_##name (const ezVariant& param0, const ezVariant& param1, const ezVariant& param2, const ezVariant& param3)

Use this macro to handle an event only once (place function code in curly brackets after it)