Unigine::Engine Class
Header: | #include <UnigineEngine.h> |
The Engine class is required for the engine initialization and executing the main loop of the program. Also, you can get the engine startup options through this class.
The InitParameters structure provides the way to set the following parameters to initialize a new Engine instance:.
Parameter | Description |
---|---|
window_title | Title of the window. |
window_icon_path | Path to the window icon. |
app_path | Path to a directory where binary executable file is stored. |
home_path | Path to the user's home directory. |
project | Project name. |
password | Password for the filesystem archives. |
system_proxy | Instance of the CustomSystemProxy class. |
Engine Class
枚举
BUILD_CONFIG#
Engine build configuration.Name | 描述 |
---|---|
BUILD_CONFIG_DEBUG = 0 | Debug build configuration. |
BUILD_CONFIG_DEVELOPMENT = 1 | Development build configuration. |
BUILD_CONFIG_RELEASE = 2 | Release build configuration. |
BACKGROUND_UPDATE#
Engine background update mode.PRECISION#
engine precision type.Name | 描述 |
---|---|
PRECISION_PRECISION_FLOAT = 0 | Float precision type. |
PRECISION_PRECISION_DOUBLE = 1 | Double precision type. |
Members
static bool isInitialized() const#
Return value
true if the Engine is initialized; otherwise false.static const char * getAppPath() const#
Return value
Current path to a directory where binary executable file is stored.static const char * getDataPath() const#
Return value
Current path to the data directory.static const char * getHomePath() const#
Return value
Current path to the user's home directory.static const char * getSavePath() const#
Return value
Current path to a directory with the default configuration file, saved files, etc.static const char * getCachePath() const#
Return value
Current path to the directory with cached files.static int getNumPluginPaths() const#
Return value
Current number of the specified paths to directories with plugins.static const char * getSystemScript() const#
Return value
Current path to the system script.static const char * getSystemCache() const#
Return value
Current path to the system script cache.static const char * getEditorCache() const#
Return value
Current path to the editor script cache.static const char * getVideoApp() const#
Return value
Current graphics API used for rendering.static const char * getSoundApp() const#
Return value
Current sound API used.static const char * getExternDefine() const#
Return value
Current list of external definitions.static const char * getFeatures() const#
Return value
Current list of features like Direct3D, Microprofile, Geodetic, etc.static const char * getVersion() const#
Return value
Current engine version info.static void setBackgroundUpdate ( Engine.BACKGROUND_UPDATE update ) #
Arguments
- Engine.BACKGROUND_UPDATE update - The value indicating whether the application window is updated when the window is hidden or out of focus (rendering frames in background).
static Engine.BACKGROUND_UPDATE getBackgroundUpdate() const#
Return value
Current value indicating whether the application window is updated when the window is hidden or out of focus (rendering frames in background).static bool isActive() const#
Return value
true if the engine is active; otherwise false.static bool isFocus() const#
Return value
true if the Engine window is focused; otherwise false.static bool isQuit() const#
Return value
true if the engine is quitting; otherwise false.static float getTotalTime() const#
Return value
Current total time value, in milliseconds.static float getTotalCPUTime() const#
Return value
Current total CPU time value, in milliseconds.static float getUpdateTime() const#
Return value
Current update phase duration value, in milliseconds.static float getRenderTime() const#
Return value
Current rendering time value, in milliseconds.static float getPresentTime() const#
Return value
Current time value, in milliseconds.static float getInterfaceTime() const#
Return value
Current time value, in milliseconds.static int64_t getFrame() const#
Return value
Current engine frame number.static float getFps() const#
Return value
Current value of the Engine FPS counter.static float getIFps() const#
Return value
Current inverse value of the Engine FPS counter (1/FPS).static float getStatisticsFpsMin() const#
Return value
Current minimum FPS counter value for the last 600 frames.static float getStatisticsFpsAvg() const#
Return value
Current average FPS counter value for the last 600 frames.static float getStatisticsFpsMax() const#
Return value
Current maximum FPS counter value for the last 600 frames.static bool isFastShutdown() const#
Return value
true if fast and safe Engine shutdown by the operating system is enabled; otherwise false.static bool isMainThread() const#
Return value
true if the current thread is main; otherwise false.static Ptr<Player> getMainPlayer() const#
Return value
Current main player.static bool isEvaluation() const#
Return value
true if the evaluation version of the Engine is used; otherwise false.static int getNumEditorLogics() const#
Return value
Current number of EditorLogic instances.static int getNumWorldLogics() const#
Return value
Current number of WorldLogic instances.static int getNumSystemLogics() const#
Return value
Current number of SystemLogic instances.static int getNumArgs() const#
Return value
Current number of command line arguments.static int getNumPlugins() const#
Return value
Current number of loaded plugins.static Engine::PRECISION getPrecision() const#
Return value
Current precision type.static Event getEventFocusLost() const#
Usage Example
// implement the FocusLost event handler
void focuslost_event_handler()
{
Log::message("\Handling FocusLost event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections focuslost_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventFocusLost().connect(focuslost_event_connections, focuslost_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventFocusLost().connect(focuslost_event_connections, []() {
Log::message("\Handling FocusLost event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
focuslost_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection focuslost_event_connection;
// subscribe to the FocusLost event with a handler function keeping the connection
Engine::getEventFocusLost().connect(focuslost_event_connection, focuslost_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
focuslost_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
focuslost_event_connection.setEnabled(true);
// ...
// remove subscription to the FocusLost event via the connection
focuslost_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A FocusLost event handler implemented as a class member
void event_handler()
{
Log::message("\Handling FocusLost event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventFocusLost().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId focuslost_handler_id;
// subscribe to the FocusLost event with a lambda handler function and keeping connection ID
focuslost_handler_id = Engine::getEventFocusLost().connect(e_connections, []() {
Log::message("\Handling FocusLost event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventFocusLost().disconnect(focuslost_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all FocusLost events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventFocusLost().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventFocusLost().setEnabled(true);
Return value
Event reference.static Event getEventFocusGained() const#
Usage Example
// implement the FocusGained event handler
void focusgained_event_handler()
{
Log::message("\Handling FocusGained event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections focusgained_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventFocusGained().connect(focusgained_event_connections, focusgained_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventFocusGained().connect(focusgained_event_connections, []() {
Log::message("\Handling FocusGained event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
focusgained_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection focusgained_event_connection;
// subscribe to the FocusGained event with a handler function keeping the connection
Engine::getEventFocusGained().connect(focusgained_event_connection, focusgained_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
focusgained_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
focusgained_event_connection.setEnabled(true);
// ...
// remove subscription to the FocusGained event via the connection
focusgained_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A FocusGained event handler implemented as a class member
void event_handler()
{
Log::message("\Handling FocusGained event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventFocusGained().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId focusgained_handler_id;
// subscribe to the FocusGained event with a lambda handler function and keeping connection ID
focusgained_handler_id = Engine::getEventFocusGained().connect(e_connections, []() {
Log::message("\Handling FocusGained event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventFocusGained().disconnect(focusgained_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all FocusGained events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventFocusGained().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventFocusGained().setEnabled(true);
Return value
Event reference.static Event getEventEndSwap() const#
Usage Example
// implement the EndSwap event handler
void endswap_event_handler()
{
Log::message("\Handling EndSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSwap().connect(endswap_event_connections, endswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSwap().connect(endswap_event_connections, []() {
Log::message("\Handling EndSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endswap_event_connection;
// subscribe to the EndSwap event with a handler function keeping the connection
Engine::getEventEndSwap().connect(endswap_event_connection, endswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endswap_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSwap event via the connection
endswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endswap_handler_id;
// subscribe to the EndSwap event with a lambda handler function and keeping connection ID
endswap_handler_id = Engine::getEventEndSwap().connect(e_connections, []() {
Log::message("\Handling EndSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSwap().disconnect(endswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSwap().setEnabled(true);
Return value
Event reference.static Event getEventEndDeleteObjects() const#
Usage Example
// implement the EndDeleteObjects event handler
void enddeleteobjects_event_handler()
{
Log::message("\Handling EndDeleteObjects event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections enddeleteobjects_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndDeleteObjects().connect(enddeleteobjects_event_connections, enddeleteobjects_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndDeleteObjects().connect(enddeleteobjects_event_connections, []() {
Log::message("\Handling EndDeleteObjects event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
enddeleteobjects_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection enddeleteobjects_event_connection;
// subscribe to the EndDeleteObjects event with a handler function keeping the connection
Engine::getEventEndDeleteObjects().connect(enddeleteobjects_event_connection, enddeleteobjects_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
enddeleteobjects_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
enddeleteobjects_event_connection.setEnabled(true);
// ...
// remove subscription to the EndDeleteObjects event via the connection
enddeleteobjects_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndDeleteObjects event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndDeleteObjects event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndDeleteObjects().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId enddeleteobjects_handler_id;
// subscribe to the EndDeleteObjects event with a lambda handler function and keeping connection ID
enddeleteobjects_handler_id = Engine::getEventEndDeleteObjects().connect(e_connections, []() {
Log::message("\Handling EndDeleteObjects event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndDeleteObjects().disconnect(enddeleteobjects_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndDeleteObjects events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndDeleteObjects().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndDeleteObjects().setEnabled(true);
Return value
Event reference.static Event getEventBeginDeleteObjects() const#
Usage Example
// implement the BeginDeleteObjects event handler
void begindeleteobjects_event_handler()
{
Log::message("\Handling BeginDeleteObjects event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections begindeleteobjects_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginDeleteObjects().connect(begindeleteobjects_event_connections, begindeleteobjects_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginDeleteObjects().connect(begindeleteobjects_event_connections, []() {
Log::message("\Handling BeginDeleteObjects event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
begindeleteobjects_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection begindeleteobjects_event_connection;
// subscribe to the BeginDeleteObjects event with a handler function keeping the connection
Engine::getEventBeginDeleteObjects().connect(begindeleteobjects_event_connection, begindeleteobjects_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
begindeleteobjects_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
begindeleteobjects_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginDeleteObjects event via the connection
begindeleteobjects_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginDeleteObjects event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginDeleteObjects event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginDeleteObjects().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId begindeleteobjects_handler_id;
// subscribe to the BeginDeleteObjects event with a lambda handler function and keeping connection ID
begindeleteobjects_handler_id = Engine::getEventBeginDeleteObjects().connect(e_connections, []() {
Log::message("\Handling BeginDeleteObjects event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginDeleteObjects().disconnect(begindeleteobjects_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginDeleteObjects events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginDeleteObjects().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginDeleteObjects().setEnabled(true);
Return value
Event reference.static Event getEventEndPluginsSwap() const#
Usage Example
// implement the EndPluginsSwap event handler
void endpluginsswap_event_handler()
{
Log::message("\Handling EndPluginsSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpluginsswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPluginsSwap().connect(endpluginsswap_event_connections, endpluginsswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPluginsSwap().connect(endpluginsswap_event_connections, []() {
Log::message("\Handling EndPluginsSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpluginsswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpluginsswap_event_connection;
// subscribe to the EndPluginsSwap event with a handler function keeping the connection
Engine::getEventEndPluginsSwap().connect(endpluginsswap_event_connection, endpluginsswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpluginsswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpluginsswap_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPluginsSwap event via the connection
endpluginsswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPluginsSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPluginsSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPluginsSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpluginsswap_handler_id;
// subscribe to the EndPluginsSwap event with a lambda handler function and keeping connection ID
endpluginsswap_handler_id = Engine::getEventEndPluginsSwap().connect(e_connections, []() {
Log::message("\Handling EndPluginsSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPluginsSwap().disconnect(endpluginsswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPluginsSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPluginsSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPluginsSwap().setEnabled(true);
Return value
Event reference.static Event getEventBeginPluginsSwap() const#
Usage Example
// implement the BeginPluginsSwap event handler
void beginpluginsswap_event_handler()
{
Log::message("\Handling BeginPluginsSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpluginsswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPluginsSwap().connect(beginpluginsswap_event_connections, beginpluginsswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPluginsSwap().connect(beginpluginsswap_event_connections, []() {
Log::message("\Handling BeginPluginsSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpluginsswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpluginsswap_event_connection;
// subscribe to the BeginPluginsSwap event with a handler function keeping the connection
Engine::getEventBeginPluginsSwap().connect(beginpluginsswap_event_connection, beginpluginsswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpluginsswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpluginsswap_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPluginsSwap event via the connection
beginpluginsswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPluginsSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPluginsSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPluginsSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpluginsswap_handler_id;
// subscribe to the BeginPluginsSwap event with a lambda handler function and keeping connection ID
beginpluginsswap_handler_id = Engine::getEventBeginPluginsSwap().connect(e_connections, []() {
Log::message("\Handling BeginPluginsSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPluginsSwap().disconnect(beginpluginsswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPluginsSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPluginsSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPluginsSwap().setEnabled(true);
Return value
Event reference.static Event getEventEndWorldSwap() const#
Usage Example
// implement the EndWorldSwap event handler
void endworldswap_event_handler()
{
Log::message("\Handling EndWorldSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endworldswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndWorldSwap().connect(endworldswap_event_connections, endworldswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndWorldSwap().connect(endworldswap_event_connections, []() {
Log::message("\Handling EndWorldSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endworldswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endworldswap_event_connection;
// subscribe to the EndWorldSwap event with a handler function keeping the connection
Engine::getEventEndWorldSwap().connect(endworldswap_event_connection, endworldswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endworldswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endworldswap_event_connection.setEnabled(true);
// ...
// remove subscription to the EndWorldSwap event via the connection
endworldswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndWorldSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndWorldSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndWorldSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endworldswap_handler_id;
// subscribe to the EndWorldSwap event with a lambda handler function and keeping connection ID
endworldswap_handler_id = Engine::getEventEndWorldSwap().connect(e_connections, []() {
Log::message("\Handling EndWorldSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndWorldSwap().disconnect(endworldswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndWorldSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndWorldSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndWorldSwap().setEnabled(true);
Return value
Event reference.static Event getEventBeginWorldSwap() const#
Usage Example
// implement the BeginWorldSwap event handler
void beginworldswap_event_handler()
{
Log::message("\Handling BeginWorldSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginworldswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginWorldSwap().connect(beginworldswap_event_connections, beginworldswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginWorldSwap().connect(beginworldswap_event_connections, []() {
Log::message("\Handling BeginWorldSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginworldswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginworldswap_event_connection;
// subscribe to the BeginWorldSwap event with a handler function keeping the connection
Engine::getEventBeginWorldSwap().connect(beginworldswap_event_connection, beginworldswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginworldswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginworldswap_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginWorldSwap event via the connection
beginworldswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginWorldSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginWorldSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginWorldSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginworldswap_handler_id;
// subscribe to the BeginWorldSwap event with a lambda handler function and keeping connection ID
beginworldswap_handler_id = Engine::getEventBeginWorldSwap().connect(e_connections, []() {
Log::message("\Handling BeginWorldSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginWorldSwap().disconnect(beginworldswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginWorldSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginWorldSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginWorldSwap().setEnabled(true);
Return value
Event reference.static Event getEventEndPathfinding() const#
Usage Example
// implement the EndPathfinding event handler
void endpathfinding_event_handler()
{
Log::message("\Handling EndPathfinding event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpathfinding_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPathfinding().connect(endpathfinding_event_connections, endpathfinding_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPathfinding().connect(endpathfinding_event_connections, []() {
Log::message("\Handling EndPathfinding event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpathfinding_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpathfinding_event_connection;
// subscribe to the EndPathfinding event with a handler function keeping the connection
Engine::getEventEndPathfinding().connect(endpathfinding_event_connection, endpathfinding_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpathfinding_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpathfinding_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPathfinding event via the connection
endpathfinding_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPathfinding event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPathfinding event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPathfinding().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpathfinding_handler_id;
// subscribe to the EndPathfinding event with a lambda handler function and keeping connection ID
endpathfinding_handler_id = Engine::getEventEndPathfinding().connect(e_connections, []() {
Log::message("\Handling EndPathfinding event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPathfinding().disconnect(endpathfinding_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPathfinding events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPathfinding().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPathfinding().setEnabled(true);
Return value
Event reference.static Event getEventBeginSwap() const#
Usage Example
// implement the BeginSwap event handler
void beginswap_event_handler()
{
Log::message("\Handling BeginSwap event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginswap_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSwap().connect(beginswap_event_connections, beginswap_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSwap().connect(beginswap_event_connections, []() {
Log::message("\Handling BeginSwap event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginswap_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginswap_event_connection;
// subscribe to the BeginSwap event with a handler function keeping the connection
Engine::getEventBeginSwap().connect(beginswap_event_connection, beginswap_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginswap_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginswap_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSwap event via the connection
beginswap_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSwap event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSwap event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSwap().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginswap_handler_id;
// subscribe to the BeginSwap event with a lambda handler function and keeping connection ID
beginswap_handler_id = Engine::getEventBeginSwap().connect(e_connections, []() {
Log::message("\Handling BeginSwap event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSwap().disconnect(beginswap_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSwap events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSwap().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSwap().setEnabled(true);
Return value
Event reference.static Event getEventEndRender() const#
Usage Example
// implement the EndRender event handler
void endrender_event_handler()
{
Log::message("\Handling EndRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndRender().connect(endrender_event_connections, endrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndRender().connect(endrender_event_connections, []() {
Log::message("\Handling EndRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endrender_event_connection;
// subscribe to the EndRender event with a handler function keeping the connection
Engine::getEventEndRender().connect(endrender_event_connection, endrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endrender_event_connection.setEnabled(true);
// ...
// remove subscription to the EndRender event via the connection
endrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endrender_handler_id;
// subscribe to the EndRender event with a lambda handler function and keeping connection ID
endrender_handler_id = Engine::getEventEndRender().connect(e_connections, []() {
Log::message("\Handling EndRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndRender().disconnect(endrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndRender().setEnabled(true);
Return value
Event reference.static Event getEventEndPostRender() const#
Usage Example
// implement the EndPostRender event handler
void endpostrender_event_handler()
{
Log::message("\Handling EndPostRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpostrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPostRender().connect(endpostrender_event_connections, endpostrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPostRender().connect(endpostrender_event_connections, []() {
Log::message("\Handling EndPostRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpostrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpostrender_event_connection;
// subscribe to the EndPostRender event with a handler function keeping the connection
Engine::getEventEndPostRender().connect(endpostrender_event_connection, endpostrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpostrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpostrender_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPostRender event via the connection
endpostrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPostRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPostRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPostRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpostrender_handler_id;
// subscribe to the EndPostRender event with a lambda handler function and keeping connection ID
endpostrender_handler_id = Engine::getEventEndPostRender().connect(e_connections, []() {
Log::message("\Handling EndPostRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPostRender().disconnect(endpostrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPostRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPostRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPostRender().setEnabled(true);
Return value
Event reference.static Event getEventBeginPostRender() const#
Usage Example
// implement the BeginPostRender event handler
void beginpostrender_event_handler()
{
Log::message("\Handling BeginPostRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpostrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPostRender().connect(beginpostrender_event_connections, beginpostrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPostRender().connect(beginpostrender_event_connections, []() {
Log::message("\Handling BeginPostRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpostrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpostrender_event_connection;
// subscribe to the BeginPostRender event with a handler function keeping the connection
Engine::getEventBeginPostRender().connect(beginpostrender_event_connection, beginpostrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpostrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpostrender_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPostRender event via the connection
beginpostrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPostRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPostRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPostRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpostrender_handler_id;
// subscribe to the BeginPostRender event with a lambda handler function and keeping connection ID
beginpostrender_handler_id = Engine::getEventBeginPostRender().connect(e_connections, []() {
Log::message("\Handling BeginPostRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPostRender().disconnect(beginpostrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPostRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPostRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPostRender().setEnabled(true);
Return value
Event reference.static Event getEventEndPluginsGui() const#
Usage Example
// implement the EndPluginsGui event handler
void endpluginsgui_event_handler()
{
Log::message("\Handling EndPluginsGui event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpluginsgui_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPluginsGui().connect(endpluginsgui_event_connections, endpluginsgui_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPluginsGui().connect(endpluginsgui_event_connections, []() {
Log::message("\Handling EndPluginsGui event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpluginsgui_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpluginsgui_event_connection;
// subscribe to the EndPluginsGui event with a handler function keeping the connection
Engine::getEventEndPluginsGui().connect(endpluginsgui_event_connection, endpluginsgui_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpluginsgui_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpluginsgui_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPluginsGui event via the connection
endpluginsgui_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPluginsGui event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPluginsGui event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPluginsGui().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpluginsgui_handler_id;
// subscribe to the EndPluginsGui event with a lambda handler function and keeping connection ID
endpluginsgui_handler_id = Engine::getEventEndPluginsGui().connect(e_connections, []() {
Log::message("\Handling EndPluginsGui event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPluginsGui().disconnect(endpluginsgui_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPluginsGui events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPluginsGui().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPluginsGui().setEnabled(true);
Return value
Event reference.static Event getEventBeginPluginsGui() const#
Usage Example
// implement the BeginPluginsGui event handler
void beginpluginsgui_event_handler()
{
Log::message("\Handling BeginPluginsGui event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpluginsgui_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPluginsGui().connect(beginpluginsgui_event_connections, beginpluginsgui_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPluginsGui().connect(beginpluginsgui_event_connections, []() {
Log::message("\Handling BeginPluginsGui event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpluginsgui_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpluginsgui_event_connection;
// subscribe to the BeginPluginsGui event with a handler function keeping the connection
Engine::getEventBeginPluginsGui().connect(beginpluginsgui_event_connection, beginpluginsgui_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpluginsgui_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpluginsgui_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPluginsGui event via the connection
beginpluginsgui_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPluginsGui event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPluginsGui event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPluginsGui().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpluginsgui_handler_id;
// subscribe to the BeginPluginsGui event with a lambda handler function and keeping connection ID
beginpluginsgui_handler_id = Engine::getEventBeginPluginsGui().connect(e_connections, []() {
Log::message("\Handling BeginPluginsGui event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPluginsGui().disconnect(beginpluginsgui_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPluginsGui events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPluginsGui().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPluginsGui().setEnabled(true);
Return value
Event reference.static Event getEventEndRenderWorld() const#
Usage Example
// implement the EndRenderWorld event handler
void endrenderworld_event_handler()
{
Log::message("\Handling EndRenderWorld event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endrenderworld_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndRenderWorld().connect(endrenderworld_event_connections, endrenderworld_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndRenderWorld().connect(endrenderworld_event_connections, []() {
Log::message("\Handling EndRenderWorld event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endrenderworld_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endrenderworld_event_connection;
// subscribe to the EndRenderWorld event with a handler function keeping the connection
Engine::getEventEndRenderWorld().connect(endrenderworld_event_connection, endrenderworld_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endrenderworld_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endrenderworld_event_connection.setEnabled(true);
// ...
// remove subscription to the EndRenderWorld event via the connection
endrenderworld_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndRenderWorld event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndRenderWorld event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndRenderWorld().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endrenderworld_handler_id;
// subscribe to the EndRenderWorld event with a lambda handler function and keeping connection ID
endrenderworld_handler_id = Engine::getEventEndRenderWorld().connect(e_connections, []() {
Log::message("\Handling EndRenderWorld event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndRenderWorld().disconnect(endrenderworld_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndRenderWorld events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndRenderWorld().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndRenderWorld().setEnabled(true);
Return value
Event reference.static Event getEventBeginRenderWorld() const#
Usage Example
// implement the BeginRenderWorld event handler
void beginrenderworld_event_handler()
{
Log::message("\Handling BeginRenderWorld event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginrenderworld_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginRenderWorld().connect(beginrenderworld_event_connections, beginrenderworld_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginRenderWorld().connect(beginrenderworld_event_connections, []() {
Log::message("\Handling BeginRenderWorld event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginrenderworld_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginrenderworld_event_connection;
// subscribe to the BeginRenderWorld event with a handler function keeping the connection
Engine::getEventBeginRenderWorld().connect(beginrenderworld_event_connection, beginrenderworld_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginrenderworld_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginrenderworld_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginRenderWorld event via the connection
beginrenderworld_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginRenderWorld event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginRenderWorld event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginRenderWorld().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginrenderworld_handler_id;
// subscribe to the BeginRenderWorld event with a lambda handler function and keeping connection ID
beginrenderworld_handler_id = Engine::getEventBeginRenderWorld().connect(e_connections, []() {
Log::message("\Handling BeginRenderWorld event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginRenderWorld().disconnect(beginrenderworld_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginRenderWorld events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginRenderWorld().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginRenderWorld().setEnabled(true);
Return value
Event reference.static Event getEventEndPluginsRender() const#
Usage Example
// implement the EndPluginsRender event handler
void endpluginsrender_event_handler()
{
Log::message("\Handling EndPluginsRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpluginsrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPluginsRender().connect(endpluginsrender_event_connections, endpluginsrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPluginsRender().connect(endpluginsrender_event_connections, []() {
Log::message("\Handling EndPluginsRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpluginsrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpluginsrender_event_connection;
// subscribe to the EndPluginsRender event with a handler function keeping the connection
Engine::getEventEndPluginsRender().connect(endpluginsrender_event_connection, endpluginsrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpluginsrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpluginsrender_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPluginsRender event via the connection
endpluginsrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPluginsRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPluginsRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPluginsRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpluginsrender_handler_id;
// subscribe to the EndPluginsRender event with a lambda handler function and keeping connection ID
endpluginsrender_handler_id = Engine::getEventEndPluginsRender().connect(e_connections, []() {
Log::message("\Handling EndPluginsRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPluginsRender().disconnect(endpluginsrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPluginsRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPluginsRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPluginsRender().setEnabled(true);
Return value
Event reference.static Event getEventBeginPluginsRender() const#
Usage Example
// implement the BeginPluginsRender event handler
void beginpluginsrender_event_handler()
{
Log::message("\Handling BeginPluginsRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpluginsrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPluginsRender().connect(beginpluginsrender_event_connections, beginpluginsrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPluginsRender().connect(beginpluginsrender_event_connections, []() {
Log::message("\Handling BeginPluginsRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpluginsrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpluginsrender_event_connection;
// subscribe to the BeginPluginsRender event with a handler function keeping the connection
Engine::getEventBeginPluginsRender().connect(beginpluginsrender_event_connection, beginpluginsrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpluginsrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpluginsrender_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPluginsRender event via the connection
beginpluginsrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPluginsRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPluginsRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPluginsRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpluginsrender_handler_id;
// subscribe to the BeginPluginsRender event with a lambda handler function and keeping connection ID
beginpluginsrender_handler_id = Engine::getEventBeginPluginsRender().connect(e_connections, []() {
Log::message("\Handling BeginPluginsRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPluginsRender().disconnect(beginpluginsrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPluginsRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPluginsRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPluginsRender().setEnabled(true);
Return value
Event reference.static Event getEventEndEditorRender() const#
Usage Example
// implement the EndEditorRender event handler
void endeditorrender_event_handler()
{
Log::message("\Handling EndEditorRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endeditorrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndEditorRender().connect(endeditorrender_event_connections, endeditorrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndEditorRender().connect(endeditorrender_event_connections, []() {
Log::message("\Handling EndEditorRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endeditorrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endeditorrender_event_connection;
// subscribe to the EndEditorRender event with a handler function keeping the connection
Engine::getEventEndEditorRender().connect(endeditorrender_event_connection, endeditorrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endeditorrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endeditorrender_event_connection.setEnabled(true);
// ...
// remove subscription to the EndEditorRender event via the connection
endeditorrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndEditorRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndEditorRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndEditorRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endeditorrender_handler_id;
// subscribe to the EndEditorRender event with a lambda handler function and keeping connection ID
endeditorrender_handler_id = Engine::getEventEndEditorRender().connect(e_connections, []() {
Log::message("\Handling EndEditorRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndEditorRender().disconnect(endeditorrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndEditorRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndEditorRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndEditorRender().setEnabled(true);
Return value
Event reference.static Event getEventBeginEditorRender() const#
Usage Example
// implement the BeginEditorRender event handler
void begineditorrender_event_handler()
{
Log::message("\Handling BeginEditorRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections begineditorrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginEditorRender().connect(begineditorrender_event_connections, begineditorrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginEditorRender().connect(begineditorrender_event_connections, []() {
Log::message("\Handling BeginEditorRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
begineditorrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection begineditorrender_event_connection;
// subscribe to the BeginEditorRender event with a handler function keeping the connection
Engine::getEventBeginEditorRender().connect(begineditorrender_event_connection, begineditorrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
begineditorrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
begineditorrender_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginEditorRender event via the connection
begineditorrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginEditorRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginEditorRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginEditorRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId begineditorrender_handler_id;
// subscribe to the BeginEditorRender event with a lambda handler function and keeping connection ID
begineditorrender_handler_id = Engine::getEventBeginEditorRender().connect(e_connections, []() {
Log::message("\Handling BeginEditorRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginEditorRender().disconnect(begineditorrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginEditorRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginEditorRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginEditorRender().setEnabled(true);
Return value
Event reference.static Event getEventBeginRender() const#
Usage Example
// implement the BeginRender event handler
void beginrender_event_handler()
{
Log::message("\Handling BeginRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginRender().connect(beginrender_event_connections, beginrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginRender().connect(beginrender_event_connections, []() {
Log::message("\Handling BeginRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginrender_event_connection;
// subscribe to the BeginRender event with a handler function keeping the connection
Engine::getEventBeginRender().connect(beginrender_event_connection, beginrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginrender_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginRender event via the connection
beginrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginrender_handler_id;
// subscribe to the BeginRender event with a lambda handler function and keeping connection ID
beginrender_handler_id = Engine::getEventBeginRender().connect(e_connections, []() {
Log::message("\Handling BeginRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginRender().disconnect(beginrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginRender().setEnabled(true);
Return value
Event reference.static Event getEventEndVRRender() const#
Usage Example
// implement the EndVRRender event handler
void endvrrender_event_handler()
{
Log::message("\Handling EndVRRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endvrrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndVRRender().connect(endvrrender_event_connections, endvrrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndVRRender().connect(endvrrender_event_connections, []() {
Log::message("\Handling EndVRRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endvrrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endvrrender_event_connection;
// subscribe to the EndVRRender event with a handler function keeping the connection
Engine::getEventEndVRRender().connect(endvrrender_event_connection, endvrrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endvrrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endvrrender_event_connection.setEnabled(true);
// ...
// remove subscription to the EndVRRender event via the connection
endvrrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndVRRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndVRRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndVRRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endvrrender_handler_id;
// subscribe to the EndVRRender event with a lambda handler function and keeping connection ID
endvrrender_handler_id = Engine::getEventEndVRRender().connect(e_connections, []() {
Log::message("\Handling EndVRRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndVRRender().disconnect(endvrrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndVRRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndVRRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndVRRender().setEnabled(true);
Return value
Event reference.static Event getEventBeginVRRender() const#
Usage Example
// implement the BeginVRRender event handler
void beginvrrender_event_handler()
{
Log::message("\Handling BeginVRRender event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginvrrender_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginVRRender().connect(beginvrrender_event_connections, beginvrrender_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginVRRender().connect(beginvrrender_event_connections, []() {
Log::message("\Handling BeginVRRender event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginvrrender_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginvrrender_event_connection;
// subscribe to the BeginVRRender event with a handler function keeping the connection
Engine::getEventBeginVRRender().connect(beginvrrender_event_connection, beginvrrender_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginvrrender_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginvrrender_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginVRRender event via the connection
beginvrrender_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginVRRender event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginVRRender event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginVRRender().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginvrrender_handler_id;
// subscribe to the BeginVRRender event with a lambda handler function and keeping connection ID
beginvrrender_handler_id = Engine::getEventBeginVRRender().connect(e_connections, []() {
Log::message("\Handling BeginVRRender event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginVRRender().disconnect(beginvrrender_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginVRRender events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginVRRender().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginVRRender().setEnabled(true);
Return value
Event reference.static Event getEventAsyncEndFramePhysics() const#
Usage Example
// implement the AsyncEndFramePhysics event handler
void asyncendframephysics_event_handler()
{
Log::message("\Handling AsyncEndFramePhysics event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections asyncendframephysics_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventAsyncEndFramePhysics().connect(asyncendframephysics_event_connections, asyncendframephysics_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventAsyncEndFramePhysics().connect(asyncendframephysics_event_connections, []() {
Log::message("\Handling AsyncEndFramePhysics event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
asyncendframephysics_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection asyncendframephysics_event_connection;
// subscribe to the AsyncEndFramePhysics event with a handler function keeping the connection
Engine::getEventAsyncEndFramePhysics().connect(asyncendframephysics_event_connection, asyncendframephysics_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
asyncendframephysics_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
asyncendframephysics_event_connection.setEnabled(true);
// ...
// remove subscription to the AsyncEndFramePhysics event via the connection
asyncendframephysics_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A AsyncEndFramePhysics event handler implemented as a class member
void event_handler()
{
Log::message("\Handling AsyncEndFramePhysics event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventAsyncEndFramePhysics().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId asyncendframephysics_handler_id;
// subscribe to the AsyncEndFramePhysics event with a lambda handler function and keeping connection ID
asyncendframephysics_handler_id = Engine::getEventAsyncEndFramePhysics().connect(e_connections, []() {
Log::message("\Handling AsyncEndFramePhysics event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventAsyncEndFramePhysics().disconnect(asyncendframephysics_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all AsyncEndFramePhysics events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventAsyncEndFramePhysics().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventAsyncEndFramePhysics().setEnabled(true);
Return value
Event reference.static Event getEventAsyncBeginFramePhysics() const#
Usage Example
// implement the AsyncBeginFramePhysics event handler
void asyncbeginframephysics_event_handler()
{
Log::message("\Handling AsyncBeginFramePhysics event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections asyncbeginframephysics_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventAsyncBeginFramePhysics().connect(asyncbeginframephysics_event_connections, asyncbeginframephysics_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventAsyncBeginFramePhysics().connect(asyncbeginframephysics_event_connections, []() {
Log::message("\Handling AsyncBeginFramePhysics event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
asyncbeginframephysics_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection asyncbeginframephysics_event_connection;
// subscribe to the AsyncBeginFramePhysics event with a handler function keeping the connection
Engine::getEventAsyncBeginFramePhysics().connect(asyncbeginframephysics_event_connection, asyncbeginframephysics_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
asyncbeginframephysics_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
asyncbeginframephysics_event_connection.setEnabled(true);
// ...
// remove subscription to the AsyncBeginFramePhysics event via the connection
asyncbeginframephysics_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A AsyncBeginFramePhysics event handler implemented as a class member
void event_handler()
{
Log::message("\Handling AsyncBeginFramePhysics event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventAsyncBeginFramePhysics().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId asyncbeginframephysics_handler_id;
// subscribe to the AsyncBeginFramePhysics event with a lambda handler function and keeping connection ID
asyncbeginframephysics_handler_id = Engine::getEventAsyncBeginFramePhysics().connect(e_connections, []() {
Log::message("\Handling AsyncBeginFramePhysics event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventAsyncBeginFramePhysics().disconnect(asyncbeginframephysics_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all AsyncBeginFramePhysics events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventAsyncBeginFramePhysics().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventAsyncBeginFramePhysics().setEnabled(true);
Return value
Event reference.static Event getEventSyncEndFramePhysics() const#
Usage Example
// implement the SyncEndFramePhysics event handler
void syncendframephysics_event_handler()
{
Log::message("\Handling SyncEndFramePhysics event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections syncendframephysics_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventSyncEndFramePhysics().connect(syncendframephysics_event_connections, syncendframephysics_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventSyncEndFramePhysics().connect(syncendframephysics_event_connections, []() {
Log::message("\Handling SyncEndFramePhysics event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
syncendframephysics_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection syncendframephysics_event_connection;
// subscribe to the SyncEndFramePhysics event with a handler function keeping the connection
Engine::getEventSyncEndFramePhysics().connect(syncendframephysics_event_connection, syncendframephysics_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
syncendframephysics_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
syncendframephysics_event_connection.setEnabled(true);
// ...
// remove subscription to the SyncEndFramePhysics event via the connection
syncendframephysics_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A SyncEndFramePhysics event handler implemented as a class member
void event_handler()
{
Log::message("\Handling SyncEndFramePhysics event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventSyncEndFramePhysics().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId syncendframephysics_handler_id;
// subscribe to the SyncEndFramePhysics event with a lambda handler function and keeping connection ID
syncendframephysics_handler_id = Engine::getEventSyncEndFramePhysics().connect(e_connections, []() {
Log::message("\Handling SyncEndFramePhysics event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventSyncEndFramePhysics().disconnect(syncendframephysics_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all SyncEndFramePhysics events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventSyncEndFramePhysics().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventSyncEndFramePhysics().setEnabled(true);
Return value
Event reference.static Event getEventSyncBeginFramePhysics() const#
Usage Example
// implement the SyncBeginFramePhysics event handler
void syncbeginframephysics_event_handler()
{
Log::message("\Handling SyncBeginFramePhysics event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections syncbeginframephysics_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventSyncBeginFramePhysics().connect(syncbeginframephysics_event_connections, syncbeginframephysics_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventSyncBeginFramePhysics().connect(syncbeginframephysics_event_connections, []() {
Log::message("\Handling SyncBeginFramePhysics event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
syncbeginframephysics_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection syncbeginframephysics_event_connection;
// subscribe to the SyncBeginFramePhysics event with a handler function keeping the connection
Engine::getEventSyncBeginFramePhysics().connect(syncbeginframephysics_event_connection, syncbeginframephysics_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
syncbeginframephysics_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
syncbeginframephysics_event_connection.setEnabled(true);
// ...
// remove subscription to the SyncBeginFramePhysics event via the connection
syncbeginframephysics_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A SyncBeginFramePhysics event handler implemented as a class member
void event_handler()
{
Log::message("\Handling SyncBeginFramePhysics event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventSyncBeginFramePhysics().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId syncbeginframephysics_handler_id;
// subscribe to the SyncBeginFramePhysics event with a lambda handler function and keeping connection ID
syncbeginframephysics_handler_id = Engine::getEventSyncBeginFramePhysics().connect(e_connections, []() {
Log::message("\Handling SyncBeginFramePhysics event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventSyncBeginFramePhysics().disconnect(syncbeginframephysics_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all SyncBeginFramePhysics events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventSyncBeginFramePhysics().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventSyncBeginFramePhysics().setEnabled(true);
Return value
Event reference.static Event getEventBeginPathfinding() const#
Usage Example
// implement the BeginPathfinding event handler
void beginpathfinding_event_handler()
{
Log::message("\Handling BeginPathfinding event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpathfinding_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPathfinding().connect(beginpathfinding_event_connections, beginpathfinding_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPathfinding().connect(beginpathfinding_event_connections, []() {
Log::message("\Handling BeginPathfinding event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpathfinding_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpathfinding_event_connection;
// subscribe to the BeginPathfinding event with a handler function keeping the connection
Engine::getEventBeginPathfinding().connect(beginpathfinding_event_connection, beginpathfinding_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpathfinding_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpathfinding_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPathfinding event via the connection
beginpathfinding_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPathfinding event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPathfinding event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPathfinding().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpathfinding_handler_id;
// subscribe to the BeginPathfinding event with a lambda handler function and keeping connection ID
beginpathfinding_handler_id = Engine::getEventBeginPathfinding().connect(e_connections, []() {
Log::message("\Handling BeginPathfinding event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPathfinding().disconnect(beginpathfinding_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPathfinding events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPathfinding().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPathfinding().setEnabled(true);
Return value
Event reference.static Event getEventEndUpdate() const#
Usage Example
// implement the EndUpdate event handler
void endupdate_event_handler()
{
Log::message("\Handling EndUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndUpdate().connect(endupdate_event_connections, endupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndUpdate().connect(endupdate_event_connections, []() {
Log::message("\Handling EndUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endupdate_event_connection;
// subscribe to the EndUpdate event with a handler function keeping the connection
Engine::getEventEndUpdate().connect(endupdate_event_connection, endupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndUpdate event via the connection
endupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endupdate_handler_id;
// subscribe to the EndUpdate event with a lambda handler function and keeping connection ID
endupdate_handler_id = Engine::getEventEndUpdate().connect(e_connections, []() {
Log::message("\Handling EndUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndUpdate().disconnect(endupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndFilesystemUpdate() const#
Usage Example
// implement the EndFilesystemUpdate event handler
void endfilesystemupdate_event_handler()
{
Log::message("\Handling EndFilesystemUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endfilesystemupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndFilesystemUpdate().connect(endfilesystemupdate_event_connections, endfilesystemupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndFilesystemUpdate().connect(endfilesystemupdate_event_connections, []() {
Log::message("\Handling EndFilesystemUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endfilesystemupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endfilesystemupdate_event_connection;
// subscribe to the EndFilesystemUpdate event with a handler function keeping the connection
Engine::getEventEndFilesystemUpdate().connect(endfilesystemupdate_event_connection, endfilesystemupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endfilesystemupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endfilesystemupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndFilesystemUpdate event via the connection
endfilesystemupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndFilesystemUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndFilesystemUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndFilesystemUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endfilesystemupdate_handler_id;
// subscribe to the EndFilesystemUpdate event with a lambda handler function and keeping connection ID
endfilesystemupdate_handler_id = Engine::getEventEndFilesystemUpdate().connect(e_connections, []() {
Log::message("\Handling EndFilesystemUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndFilesystemUpdate().disconnect(endfilesystemupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndFilesystemUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndFilesystemUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndFilesystemUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginFilesystemUpdate() const#
Usage Example
// implement the BeginFilesystemUpdate event handler
void beginfilesystemupdate_event_handler()
{
Log::message("\Handling BeginFilesystemUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginfilesystemupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginFilesystemUpdate().connect(beginfilesystemupdate_event_connections, beginfilesystemupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginFilesystemUpdate().connect(beginfilesystemupdate_event_connections, []() {
Log::message("\Handling BeginFilesystemUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginfilesystemupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginfilesystemupdate_event_connection;
// subscribe to the BeginFilesystemUpdate event with a handler function keeping the connection
Engine::getEventBeginFilesystemUpdate().connect(beginfilesystemupdate_event_connection, beginfilesystemupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginfilesystemupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginfilesystemupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginFilesystemUpdate event via the connection
beginfilesystemupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginFilesystemUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginFilesystemUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginFilesystemUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginfilesystemupdate_handler_id;
// subscribe to the BeginFilesystemUpdate event with a lambda handler function and keeping connection ID
beginfilesystemupdate_handler_id = Engine::getEventBeginFilesystemUpdate().connect(e_connections, []() {
Log::message("\Handling BeginFilesystemUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginFilesystemUpdate().disconnect(beginfilesystemupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginFilesystemUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginFilesystemUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginFilesystemUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndSpatialUpdate() const#
Usage Example
// implement the EndSpatialUpdate event handler
void endspatialupdate_event_handler()
{
Log::message("\Handling EndSpatialUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endspatialupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSpatialUpdate().connect(endspatialupdate_event_connections, endspatialupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSpatialUpdate().connect(endspatialupdate_event_connections, []() {
Log::message("\Handling EndSpatialUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endspatialupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endspatialupdate_event_connection;
// subscribe to the EndSpatialUpdate event with a handler function keeping the connection
Engine::getEventEndSpatialUpdate().connect(endspatialupdate_event_connection, endspatialupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endspatialupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endspatialupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSpatialUpdate event via the connection
endspatialupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSpatialUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSpatialUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSpatialUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endspatialupdate_handler_id;
// subscribe to the EndSpatialUpdate event with a lambda handler function and keeping connection ID
endspatialupdate_handler_id = Engine::getEventEndSpatialUpdate().connect(e_connections, []() {
Log::message("\Handling EndSpatialUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSpatialUpdate().disconnect(endspatialupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSpatialUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSpatialUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSpatialUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginSpatialUpdate() const#
Usage Example
// implement the BeginSpatialUpdate event handler
void beginspatialupdate_event_handler()
{
Log::message("\Handling BeginSpatialUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginspatialupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSpatialUpdate().connect(beginspatialupdate_event_connections, beginspatialupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSpatialUpdate().connect(beginspatialupdate_event_connections, []() {
Log::message("\Handling BeginSpatialUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginspatialupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginspatialupdate_event_connection;
// subscribe to the BeginSpatialUpdate event with a handler function keeping the connection
Engine::getEventBeginSpatialUpdate().connect(beginspatialupdate_event_connection, beginspatialupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginspatialupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginspatialupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSpatialUpdate event via the connection
beginspatialupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSpatialUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSpatialUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSpatialUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginspatialupdate_handler_id;
// subscribe to the BeginSpatialUpdate event with a lambda handler function and keeping connection ID
beginspatialupdate_handler_id = Engine::getEventBeginSpatialUpdate().connect(e_connections, []() {
Log::message("\Handling BeginSpatialUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSpatialUpdate().disconnect(beginspatialupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSpatialUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSpatialUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSpatialUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndPluginsPostUpdate() const#
Usage Example
// implement the EndPluginsPostUpdate event handler
void endpluginspostupdate_event_handler()
{
Log::message("\Handling EndPluginsPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endpluginspostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndPluginsPostUpdate().connect(endpluginspostupdate_event_connections, endpluginspostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndPluginsPostUpdate().connect(endpluginspostupdate_event_connections, []() {
Log::message("\Handling EndPluginsPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endpluginspostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endpluginspostupdate_event_connection;
// subscribe to the EndPluginsPostUpdate event with a handler function keeping the connection
Engine::getEventEndPluginsPostUpdate().connect(endpluginspostupdate_event_connection, endpluginspostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endpluginspostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endpluginspostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndPluginsPostUpdate event via the connection
endpluginspostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndPluginsPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndPluginsPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndPluginsPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endpluginspostupdate_handler_id;
// subscribe to the EndPluginsPostUpdate event with a lambda handler function and keeping connection ID
endpluginspostupdate_handler_id = Engine::getEventEndPluginsPostUpdate().connect(e_connections, []() {
Log::message("\Handling EndPluginsPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndPluginsPostUpdate().disconnect(endpluginspostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndPluginsPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndPluginsPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndPluginsPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginPluginsPostUpdate() const#
Usage Example
// implement the BeginPluginsPostUpdate event handler
void beginpluginspostupdate_event_handler()
{
Log::message("\Handling BeginPluginsPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginpluginspostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginPluginsPostUpdate().connect(beginpluginspostupdate_event_connections, beginpluginspostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginPluginsPostUpdate().connect(beginpluginspostupdate_event_connections, []() {
Log::message("\Handling BeginPluginsPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginpluginspostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginpluginspostupdate_event_connection;
// subscribe to the BeginPluginsPostUpdate event with a handler function keeping the connection
Engine::getEventBeginPluginsPostUpdate().connect(beginpluginspostupdate_event_connection, beginpluginspostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginpluginspostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginpluginspostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginPluginsPostUpdate event via the connection
beginpluginspostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginPluginsPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginPluginsPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginPluginsPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginpluginspostupdate_handler_id;
// subscribe to the BeginPluginsPostUpdate event with a lambda handler function and keeping connection ID
beginpluginspostupdate_handler_id = Engine::getEventBeginPluginsPostUpdate().connect(e_connections, []() {
Log::message("\Handling BeginPluginsPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginPluginsPostUpdate().disconnect(beginpluginspostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginPluginsPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginPluginsPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginPluginsPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndEditorPostUpdate() const#
Usage Example
// implement the EndEditorPostUpdate event handler
void endeditorpostupdate_event_handler()
{
Log::message("\Handling EndEditorPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endeditorpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndEditorPostUpdate().connect(endeditorpostupdate_event_connections, endeditorpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndEditorPostUpdate().connect(endeditorpostupdate_event_connections, []() {
Log::message("\Handling EndEditorPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endeditorpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endeditorpostupdate_event_connection;
// subscribe to the EndEditorPostUpdate event with a handler function keeping the connection
Engine::getEventEndEditorPostUpdate().connect(endeditorpostupdate_event_connection, endeditorpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endeditorpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endeditorpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndEditorPostUpdate event via the connection
endeditorpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndEditorPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndEditorPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndEditorPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endeditorpostupdate_handler_id;
// subscribe to the EndEditorPostUpdate event with a lambda handler function and keeping connection ID
endeditorpostupdate_handler_id = Engine::getEventEndEditorPostUpdate().connect(e_connections, []() {
Log::message("\Handling EndEditorPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndEditorPostUpdate().disconnect(endeditorpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndEditorPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndEditorPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndEditorPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginEditorPostUpdate() const#
Usage Example
// implement the BeginEditorPostUpdate event handler
void begineditorpostupdate_event_handler()
{
Log::message("\Handling BeginEditorPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections begineditorpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginEditorPostUpdate().connect(begineditorpostupdate_event_connections, begineditorpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginEditorPostUpdate().connect(begineditorpostupdate_event_connections, []() {
Log::message("\Handling BeginEditorPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
begineditorpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection begineditorpostupdate_event_connection;
// subscribe to the BeginEditorPostUpdate event with a handler function keeping the connection
Engine::getEventBeginEditorPostUpdate().connect(begineditorpostupdate_event_connection, begineditorpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
begineditorpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
begineditorpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginEditorPostUpdate event via the connection
begineditorpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginEditorPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginEditorPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginEditorPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId begineditorpostupdate_handler_id;
// subscribe to the BeginEditorPostUpdate event with a lambda handler function and keeping connection ID
begineditorpostupdate_handler_id = Engine::getEventBeginEditorPostUpdate().connect(e_connections, []() {
Log::message("\Handling BeginEditorPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginEditorPostUpdate().disconnect(begineditorpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginEditorPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginEditorPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginEditorPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndSystemLogicPostUpdate() const#
Usage Example
// implement the EndSystemLogicPostUpdate event handler
void endsystemlogicpostupdate_event_handler()
{
Log::message("\Handling EndSystemLogicPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endsystemlogicpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSystemLogicPostUpdate().connect(endsystemlogicpostupdate_event_connections, endsystemlogicpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSystemLogicPostUpdate().connect(endsystemlogicpostupdate_event_connections, []() {
Log::message("\Handling EndSystemLogicPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endsystemlogicpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endsystemlogicpostupdate_event_connection;
// subscribe to the EndSystemLogicPostUpdate event with a handler function keeping the connection
Engine::getEventEndSystemLogicPostUpdate().connect(endsystemlogicpostupdate_event_connection, endsystemlogicpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endsystemlogicpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endsystemlogicpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSystemLogicPostUpdate event via the connection
endsystemlogicpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSystemLogicPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSystemLogicPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSystemLogicPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endsystemlogicpostupdate_handler_id;
// subscribe to the EndSystemLogicPostUpdate event with a lambda handler function and keeping connection ID
endsystemlogicpostupdate_handler_id = Engine::getEventEndSystemLogicPostUpdate().connect(e_connections, []() {
Log::message("\Handling EndSystemLogicPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSystemLogicPostUpdate().disconnect(endsystemlogicpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSystemLogicPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSystemLogicPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSystemLogicPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginSystemLogicPostUpdate() const#
Usage Example
// implement the BeginSystemLogicPostUpdate event handler
void beginsystemlogicpostupdate_event_handler()
{
Log::message("\Handling BeginSystemLogicPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginsystemlogicpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSystemLogicPostUpdate().connect(beginsystemlogicpostupdate_event_connections, beginsystemlogicpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSystemLogicPostUpdate().connect(beginsystemlogicpostupdate_event_connections, []() {
Log::message("\Handling BeginSystemLogicPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginsystemlogicpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginsystemlogicpostupdate_event_connection;
// subscribe to the BeginSystemLogicPostUpdate event with a handler function keeping the connection
Engine::getEventBeginSystemLogicPostUpdate().connect(beginsystemlogicpostupdate_event_connection, beginsystemlogicpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginsystemlogicpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginsystemlogicpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSystemLogicPostUpdate event via the connection
beginsystemlogicpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSystemLogicPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSystemLogicPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSystemLogicPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginsystemlogicpostupdate_handler_id;
// subscribe to the BeginSystemLogicPostUpdate event with a lambda handler function and keeping connection ID
beginsystemlogicpostupdate_handler_id = Engine::getEventBeginSystemLogicPostUpdate().connect(e_connections, []() {
Log::message("\Handling BeginSystemLogicPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSystemLogicPostUpdate().disconnect(beginsystemlogicpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSystemLogicPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSystemLogicPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSystemLogicPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndSystemScriptPostUpdate() const#
Usage Example
// implement the EndSystemScriptPostUpdate event handler
void endsystemscriptpostupdate_event_handler()
{
Log::message("\Handling EndSystemScriptPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endsystemscriptpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSystemScriptPostUpdate().connect(endsystemscriptpostupdate_event_connections, endsystemscriptpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSystemScriptPostUpdate().connect(endsystemscriptpostupdate_event_connections, []() {
Log::message("\Handling EndSystemScriptPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endsystemscriptpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endsystemscriptpostupdate_event_connection;
// subscribe to the EndSystemScriptPostUpdate event with a handler function keeping the connection
Engine::getEventEndSystemScriptPostUpdate().connect(endsystemscriptpostupdate_event_connection, endsystemscriptpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endsystemscriptpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endsystemscriptpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSystemScriptPostUpdate event via the connection
endsystemscriptpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSystemScriptPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSystemScriptPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSystemScriptPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endsystemscriptpostupdate_handler_id;
// subscribe to the EndSystemScriptPostUpdate event with a lambda handler function and keeping connection ID
endsystemscriptpostupdate_handler_id = Engine::getEventEndSystemScriptPostUpdate().connect(e_connections, []() {
Log::message("\Handling EndSystemScriptPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSystemScriptPostUpdate().disconnect(endsystemscriptpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSystemScriptPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSystemScriptPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSystemScriptPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginSystemScriptPostUpdate() const#
Usage Example
// implement the BeginSystemScriptPostUpdate event handler
void beginsystemscriptpostupdate_event_handler()
{
Log::message("\Handling BeginSystemScriptPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginsystemscriptpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSystemScriptPostUpdate().connect(beginsystemscriptpostupdate_event_connections, beginsystemscriptpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSystemScriptPostUpdate().connect(beginsystemscriptpostupdate_event_connections, []() {
Log::message("\Handling BeginSystemScriptPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginsystemscriptpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginsystemscriptpostupdate_event_connection;
// subscribe to the BeginSystemScriptPostUpdate event with a handler function keeping the connection
Engine::getEventBeginSystemScriptPostUpdate().connect(beginsystemscriptpostupdate_event_connection, beginsystemscriptpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginsystemscriptpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginsystemscriptpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSystemScriptPostUpdate event via the connection
beginsystemscriptpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSystemScriptPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSystemScriptPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSystemScriptPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginsystemscriptpostupdate_handler_id;
// subscribe to the BeginSystemScriptPostUpdate event with a lambda handler function and keeping connection ID
beginsystemscriptpostupdate_handler_id = Engine::getEventBeginSystemScriptPostUpdate().connect(e_connections, []() {
Log::message("\Handling BeginSystemScriptPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSystemScriptPostUpdate().disconnect(beginsystemscriptpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSystemScriptPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSystemScriptPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSystemScriptPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndWorldPostUpdate() const#
Usage Example
// implement the EndWorldPostUpdate event handler
void endworldpostupdate_event_handler()
{
Log::message("\Handling EndWorldPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endworldpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndWorldPostUpdate().connect(endworldpostupdate_event_connections, endworldpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndWorldPostUpdate().connect(endworldpostupdate_event_connections, []() {
Log::message("\Handling EndWorldPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endworldpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endworldpostupdate_event_connection;
// subscribe to the EndWorldPostUpdate event with a handler function keeping the connection
Engine::getEventEndWorldPostUpdate().connect(endworldpostupdate_event_connection, endworldpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endworldpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endworldpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndWorldPostUpdate event via the connection
endworldpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndWorldPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndWorldPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndWorldPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endworldpostupdate_handler_id;
// subscribe to the EndWorldPostUpdate event with a lambda handler function and keeping connection ID
endworldpostupdate_handler_id = Engine::getEventEndWorldPostUpdate().connect(e_connections, []() {
Log::message("\Handling EndWorldPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndWorldPostUpdate().disconnect(endworldpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndWorldPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndWorldPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndWorldPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginWorldPostUpdate() const#
Usage Example
// implement the BeginWorldPostUpdate event handler
void beginworldpostupdate_event_handler()
{
Log::message("\Handling BeginWorldPostUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginworldpostupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginWorldPostUpdate().connect(beginworldpostupdate_event_connections, beginworldpostupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginWorldPostUpdate().connect(beginworldpostupdate_event_connections, []() {
Log::message("\Handling BeginWorldPostUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginworldpostupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginworldpostupdate_event_connection;
// subscribe to the BeginWorldPostUpdate event with a handler function keeping the connection
Engine::getEventBeginWorldPostUpdate().connect(beginworldpostupdate_event_connection, beginworldpostupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginworldpostupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginworldpostupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginWorldPostUpdate event via the connection
beginworldpostupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginWorldPostUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginWorldPostUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginWorldPostUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginworldpostupdate_handler_id;
// subscribe to the BeginWorldPostUpdate event with a lambda handler function and keeping connection ID
beginworldpostupdate_handler_id = Engine::getEventBeginWorldPostUpdate().connect(e_connections, []() {
Log::message("\Handling BeginWorldPostUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginWorldPostUpdate().disconnect(beginworldpostupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginWorldPostUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginWorldPostUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginWorldPostUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndAnimationManagerUpdate() const#
Usage Example
// implement the EndAnimationManagerUpdate event handler
void endanimationmanagerupdate_event_handler()
{
Log::message("\Handling EndAnimationManagerUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endanimationmanagerupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndAnimationManagerUpdate().connect(endanimationmanagerupdate_event_connections, endanimationmanagerupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndAnimationManagerUpdate().connect(endanimationmanagerupdate_event_connections, []() {
Log::message("\Handling EndAnimationManagerUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endanimationmanagerupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endanimationmanagerupdate_event_connection;
// subscribe to the EndAnimationManagerUpdate event with a handler function keeping the connection
Engine::getEventEndAnimationManagerUpdate().connect(endanimationmanagerupdate_event_connection, endanimationmanagerupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endanimationmanagerupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endanimationmanagerupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndAnimationManagerUpdate event via the connection
endanimationmanagerupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndAnimationManagerUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndAnimationManagerUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndAnimationManagerUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endanimationmanagerupdate_handler_id;
// subscribe to the EndAnimationManagerUpdate event with a lambda handler function and keeping connection ID
endanimationmanagerupdate_handler_id = Engine::getEventEndAnimationManagerUpdate().connect(e_connections, []() {
Log::message("\Handling EndAnimationManagerUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndAnimationManagerUpdate().disconnect(endanimationmanagerupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndAnimationManagerUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndAnimationManagerUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndAnimationManagerUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginAnimationManagerUpdate() const#
Usage Example
// implement the BeginAnimationManagerUpdate event handler
void beginanimationmanagerupdate_event_handler()
{
Log::message("\Handling BeginAnimationManagerUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginanimationmanagerupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginAnimationManagerUpdate().connect(beginanimationmanagerupdate_event_connections, beginanimationmanagerupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginAnimationManagerUpdate().connect(beginanimationmanagerupdate_event_connections, []() {
Log::message("\Handling BeginAnimationManagerUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginanimationmanagerupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginanimationmanagerupdate_event_connection;
// subscribe to the BeginAnimationManagerUpdate event with a handler function keeping the connection
Engine::getEventBeginAnimationManagerUpdate().connect(beginanimationmanagerupdate_event_connection, beginanimationmanagerupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginanimationmanagerupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginanimationmanagerupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginAnimationManagerUpdate event via the connection
beginanimationmanagerupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginAnimationManagerUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginAnimationManagerUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginAnimationManagerUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginanimationmanagerupdate_handler_id;
// subscribe to the BeginAnimationManagerUpdate event with a lambda handler function and keeping connection ID
beginanimationmanagerupdate_handler_id = Engine::getEventBeginAnimationManagerUpdate().connect(e_connections, []() {
Log::message("\Handling BeginAnimationManagerUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginAnimationManagerUpdate().disconnect(beginanimationmanagerupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginAnimationManagerUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginAnimationManagerUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginAnimationManagerUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndWorldUpdate() const#
Usage Example
// implement the EndWorldUpdate event handler
void endworldupdate_event_handler()
{
Log::message("\Handling EndWorldUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endworldupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndWorldUpdate().connect(endworldupdate_event_connections, endworldupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndWorldUpdate().connect(endworldupdate_event_connections, []() {
Log::message("\Handling EndWorldUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endworldupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endworldupdate_event_connection;
// subscribe to the EndWorldUpdate event with a handler function keeping the connection
Engine::getEventEndWorldUpdate().connect(endworldupdate_event_connection, endworldupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endworldupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endworldupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndWorldUpdate event via the connection
endworldupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndWorldUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndWorldUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndWorldUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endworldupdate_handler_id;
// subscribe to the EndWorldUpdate event with a lambda handler function and keeping connection ID
endworldupdate_handler_id = Engine::getEventEndWorldUpdate().connect(e_connections, []() {
Log::message("\Handling EndWorldUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndWorldUpdate().disconnect(endworldupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndWorldUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndWorldUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndWorldUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginWorldUpdate() const#
Usage Example
// implement the BeginWorldUpdate event handler
void beginworldupdate_event_handler()
{
Log::message("\Handling BeginWorldUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginworldupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginWorldUpdate().connect(beginworldupdate_event_connections, beginworldupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginWorldUpdate().connect(beginworldupdate_event_connections, []() {
Log::message("\Handling BeginWorldUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginworldupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginworldupdate_event_connection;
// subscribe to the BeginWorldUpdate event with a handler function keeping the connection
Engine::getEventBeginWorldUpdate().connect(beginworldupdate_event_connection, beginworldupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginworldupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginworldupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginWorldUpdate event via the connection
beginworldupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginWorldUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginWorldUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginWorldUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginworldupdate_handler_id;
// subscribe to the BeginWorldUpdate event with a lambda handler function and keeping connection ID
beginworldupdate_handler_id = Engine::getEventBeginWorldUpdate().connect(e_connections, []() {
Log::message("\Handling BeginWorldUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginWorldUpdate().disconnect(beginworldupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginWorldUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginWorldUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginWorldUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndSystemLogicUpdate() const#
Usage Example
// implement the EndSystemLogicUpdate event handler
void endsystemlogicupdate_event_handler()
{
Log::message("\Handling EndSystemLogicUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endsystemlogicupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSystemLogicUpdate().connect(endsystemlogicupdate_event_connections, endsystemlogicupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSystemLogicUpdate().connect(endsystemlogicupdate_event_connections, []() {
Log::message("\Handling EndSystemLogicUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endsystemlogicupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endsystemlogicupdate_event_connection;
// subscribe to the EndSystemLogicUpdate event with a handler function keeping the connection
Engine::getEventEndSystemLogicUpdate().connect(endsystemlogicupdate_event_connection, endsystemlogicupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endsystemlogicupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endsystemlogicupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSystemLogicUpdate event via the connection
endsystemlogicupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSystemLogicUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSystemLogicUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSystemLogicUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endsystemlogicupdate_handler_id;
// subscribe to the EndSystemLogicUpdate event with a lambda handler function and keeping connection ID
endsystemlogicupdate_handler_id = Engine::getEventEndSystemLogicUpdate().connect(e_connections, []() {
Log::message("\Handling EndSystemLogicUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSystemLogicUpdate().disconnect(endsystemlogicupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSystemLogicUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSystemLogicUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSystemLogicUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginSystemLogicUpdate() const#
Usage Example
// implement the BeginSystemLogicUpdate event handler
void beginsystemlogicupdate_event_handler()
{
Log::message("\Handling BeginSystemLogicUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginsystemlogicupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSystemLogicUpdate().connect(beginsystemlogicupdate_event_connections, beginsystemlogicupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSystemLogicUpdate().connect(beginsystemlogicupdate_event_connections, []() {
Log::message("\Handling BeginSystemLogicUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginsystemlogicupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginsystemlogicupdate_event_connection;
// subscribe to the BeginSystemLogicUpdate event with a handler function keeping the connection
Engine::getEventBeginSystemLogicUpdate().connect(beginsystemlogicupdate_event_connection, beginsystemlogicupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginsystemlogicupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginsystemlogicupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSystemLogicUpdate event via the connection
beginsystemlogicupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSystemLogicUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSystemLogicUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSystemLogicUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginsystemlogicupdate_handler_id;
// subscribe to the BeginSystemLogicUpdate event with a lambda handler function and keeping connection ID
beginsystemlogicupdate_handler_id = Engine::getEventBeginSystemLogicUpdate().connect(e_connections, []() {
Log::message("\Handling BeginSystemLogicUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSystemLogicUpdate().disconnect(beginsystemlogicupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSystemLogicUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSystemLogicUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSystemLogicUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndSystemScriptUpdate() const#
Usage Example
// implement the EndSystemScriptUpdate event handler
void endsystemscriptupdate_event_handler()
{
Log::message("\Handling EndSystemScriptUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endsystemscriptupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndSystemScriptUpdate().connect(endsystemscriptupdate_event_connections, endsystemscriptupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndSystemScriptUpdate().connect(endsystemscriptupdate_event_connections, []() {
Log::message("\Handling EndSystemScriptUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endsystemscriptupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endsystemscriptupdate_event_connection;
// subscribe to the EndSystemScriptUpdate event with a handler function keeping the connection
Engine::getEventEndSystemScriptUpdate().connect(endsystemscriptupdate_event_connection, endsystemscriptupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endsystemscriptupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endsystemscriptupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndSystemScriptUpdate event via the connection
endsystemscriptupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndSystemScriptUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndSystemScriptUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndSystemScriptUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endsystemscriptupdate_handler_id;
// subscribe to the EndSystemScriptUpdate event with a lambda handler function and keeping connection ID
endsystemscriptupdate_handler_id = Engine::getEventEndSystemScriptUpdate().connect(e_connections, []() {
Log::message("\Handling EndSystemScriptUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndSystemScriptUpdate().disconnect(endsystemscriptupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndSystemScriptUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndSystemScriptUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndSystemScriptUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginSystemScriptUpdate() const#
Usage Example
// implement the BeginSystemScriptUpdate event handler
void beginsystemscriptupdate_event_handler()
{
Log::message("\Handling BeginSystemScriptUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginsystemscriptupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginSystemScriptUpdate().connect(beginsystemscriptupdate_event_connections, beginsystemscriptupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginSystemScriptUpdate().connect(beginsystemscriptupdate_event_connections, []() {
Log::message("\Handling BeginSystemScriptUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginsystemscriptupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginsystemscriptupdate_event_connection;
// subscribe to the BeginSystemScriptUpdate event with a handler function keeping the connection
Engine::getEventBeginSystemScriptUpdate().connect(beginsystemscriptupdate_event_connection, beginsystemscriptupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginsystemscriptupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginsystemscriptupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginSystemScriptUpdate event via the connection
beginsystemscriptupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginSystemScriptUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginSystemScriptUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginSystemScriptUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginsystemscriptupdate_handler_id;
// subscribe to the BeginSystemScriptUpdate event with a lambda handler function and keeping connection ID
beginsystemscriptupdate_handler_id = Engine::getEventBeginSystemScriptUpdate().connect(e_connections, []() {
Log::message("\Handling BeginSystemScriptUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginSystemScriptUpdate().disconnect(beginsystemscriptupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginSystemScriptUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginSystemScriptUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginSystemScriptUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndEditorUpdate() const#
Usage Example
// implement the EndEditorUpdate event handler
void endeditorupdate_event_handler()
{
Log::message("\Handling EndEditorUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endeditorupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndEditorUpdate().connect(endeditorupdate_event_connections, endeditorupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndEditorUpdate().connect(endeditorupdate_event_connections, []() {
Log::message("\Handling EndEditorUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endeditorupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endeditorupdate_event_connection;
// subscribe to the EndEditorUpdate event with a handler function keeping the connection
Engine::getEventEndEditorUpdate().connect(endeditorupdate_event_connection, endeditorupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endeditorupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endeditorupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndEditorUpdate event via the connection
endeditorupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndEditorUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndEditorUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndEditorUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endeditorupdate_handler_id;
// subscribe to the EndEditorUpdate event with a lambda handler function and keeping connection ID
endeditorupdate_handler_id = Engine::getEventEndEditorUpdate().connect(e_connections, []() {
Log::message("\Handling EndEditorUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndEditorUpdate().disconnect(endeditorupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndEditorUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndEditorUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndEditorUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginEditorUpdate() const#
Usage Example
// implement the BeginEditorUpdate event handler
void begineditorupdate_event_handler()
{
Log::message("\Handling BeginEditorUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections begineditorupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginEditorUpdate().connect(begineditorupdate_event_connections, begineditorupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginEditorUpdate().connect(begineditorupdate_event_connections, []() {
Log::message("\Handling BeginEditorUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
begineditorupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection begineditorupdate_event_connection;
// subscribe to the BeginEditorUpdate event with a handler function keeping the connection
Engine::getEventBeginEditorUpdate().connect(begineditorupdate_event_connection, begineditorupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
begineditorupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
begineditorupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginEditorUpdate event via the connection
begineditorupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginEditorUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginEditorUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginEditorUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId begineditorupdate_handler_id;
// subscribe to the BeginEditorUpdate event with a lambda handler function and keeping connection ID
begineditorupdate_handler_id = Engine::getEventBeginEditorUpdate().connect(e_connections, []() {
Log::message("\Handling BeginEditorUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventBeginEditorUpdate().disconnect(begineditorupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all BeginEditorUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventBeginEditorUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventBeginEditorUpdate().setEnabled(true);
Return value
Event reference.static Event getEventEndVRUpdate() const#
Usage Example
// implement the EndVRUpdate event handler
void endvrupdate_event_handler()
{
Log::message("\Handling EndVRUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections endvrupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventEndVRUpdate().connect(endvrupdate_event_connections, endvrupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventEndVRUpdate().connect(endvrupdate_event_connections, []() {
Log::message("\Handling EndVRUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
endvrupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection endvrupdate_event_connection;
// subscribe to the EndVRUpdate event with a handler function keeping the connection
Engine::getEventEndVRUpdate().connect(endvrupdate_event_connection, endvrupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
endvrupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
endvrupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the EndVRUpdate event via the connection
endvrupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A EndVRUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling EndVRUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventEndVRUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId endvrupdate_handler_id;
// subscribe to the EndVRUpdate event with a lambda handler function and keeping connection ID
endvrupdate_handler_id = Engine::getEventEndVRUpdate().connect(e_connections, []() {
Log::message("\Handling EndVRUpdate event (lambda).\n");
}
);
// remove the subscription later using the ID
Engine::getEventEndVRUpdate().disconnect(endvrupdate_handler_id);
//////////////////////////////////////////////////////////////////////////////
// 5. Ignoring all EndVRUpdate events when necessary
//////////////////////////////////////////////////////////////////////////////
// you can temporarily disable the event to perform certain actions without triggering it
Engine::getEventEndVRUpdate().setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
Engine::getEventEndVRUpdate().setEnabled(true);
Return value
Event reference.static Event getEventBeginVRUpdate() const#
Usage Example
// implement the BeginVRUpdate event handler
void beginvrupdate_event_handler()
{
Log::message("\Handling BeginVRUpdate event\n");
}
//////////////////////////////////////////////////////////////////////////////
// 1. Multiple subscriptions can be linked to an instance of the EventConnections
// class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnections class
EventConnections beginvrupdate_event_connections;
// link to this instance when subscribing to an event (subscription to various events can be linked)
Engine::getEventBeginVRUpdate().connect(beginvrupdate_event_connections, beginvrupdate_event_handler);
// other subscriptions are also linked to this EventConnections instance
// (e.g. you can subscribe using lambdas)
Engine::getEventBeginVRUpdate().connect(beginvrupdate_event_connections, []() {
Log::message("\Handling BeginVRUpdate event (lambda).\n");
}
);
// ...
// later all of these linked subscriptions can be removed with a single line
beginvrupdate_event_connections.disconnectAll();
//////////////////////////////////////////////////////////////////////////////
// 2. You can subscribe and unsubscribe via an instance of the EventConnection
// class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////
// create an instance of the EventConnection class
EventConnection beginvrupdate_event_connection;
// subscribe to the BeginVRUpdate event with a handler function keeping the connection
Engine::getEventBeginVRUpdate().connect(beginvrupdate_event_connection, beginvrupdate_event_handler);
// ...
// you can temporarily disable a particular event connection to perform certain actions
beginvrupdate_event_connection.setEnabled(false);
// ... actions to be performed
// and enable it back when necessary
beginvrupdate_event_connection.setEnabled(true);
// ...
// remove subscription to the BeginVRUpdate event via the connection
beginvrupdate_event_connection.disconnect();
//////////////////////////////////////////////////////////////////////////////
// 3. You can add EventConnection/EventConnections instance as a member of the
// class that handles the event. In this case all linked subscriptions will be
// automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////
// Class handling the event
class SomeClass
{
public:
// instance of the EventConnections class as a class member
EventConnections e_connections;
// A BeginVRUpdate event handler implemented as a class member
void event_handler()
{
Log::message("\Handling BeginVRUpdate event\n");
// ...
}
};
SomeClass *sc = new SomeClass();
// ...
// specify a class instance in case a handler method belongs to some class
Engine::getEventBeginVRUpdate().connect(sc->e_connections, sc, &SomeClass::event_handler);
// ...
// handler class instance is deleted with all its subscriptions removed automatically
delete sc;
//////////////////////////////////////////////////////////////////////////////
// 4. Subscribe to an event saving a particular connection ID
// and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////
// instance of the EventConnections class to manage event connections
EventConnections e_connections;
// define a particular connection ID to be used to unsubscribe later
EventConnectionId beginvrupdate_handler_id;
// s