IRunLoopRunner#
Fully qualified name: omni::kit::IRunLoopRunner
Defined in omni/kit/IRunLoopRunner.h
-
class IRunLoopRunner : public carb::IObject#
Interface to implement by custom run loop runners.
IApp calls the functions on this interface if one was set with IApp::setRunLoopRunner().
Public Functions
-
virtual void startup() = 0#
Called once before starting application update.
This is called by IApp::startup(), and is called after the initial Run Loop notifications are given via onAddRunLoop().
Warning
This function is not called by IApp::setRunLoopRunner().
-
virtual void onAddRunLoop(const char *name, RunLoop *loop) = 0#
Called each time a new run loop is created.
This function can be called both prior to startup() (by IApp::startup()), and whenever a new Run Loop is created by IApp::getRunLoop().
- Thread Safety
May be called from different threads simultaneously.
- Parameters:
name – The run loop name; will not be
nullptr
loop – The RunLoop instance being added
- virtual void onRemoveRunLoop(
- const char *name,
- RunLoop *loop,
- bool block,
Called when IApp wants to remove a run loop.
-
virtual void update() = 0#
Called by each application update.
Called by IApp::update() before any work is done.
-
virtual void shutdown() = 0#
Called to notify of shut down.
Warning
This function is only called on the previous instance when IApp::setRunLoopRunner() is called to switch to a different IRunLoopRunner instance (or
nullptr
).
-
virtual size_t addRef() = 0#
Atomically add one to the reference count.
- Returns:
The current reference count after one was added, though this value may change before read if other threads are also modifying the reference count. The return value is guaranteed to be non-zero.
-
virtual size_t release() = 0#
Atomically subtracts one from the reference count.
If the result is zero, carb::deleteHandler() is called for
this
.- Returns:
The current reference count after one was subtracted. If zero is returned, carb::deleteHandler() was called for
this
.
Public Static Functions
- static inline constexpr carb::InterfaceDesc getInterfaceDesc(
Returns information about this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about this interface.
- static inline constexpr carb::InterfaceDesc getLatestInterfaceDesc(
Returns information about the latest version of this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about the latest version of this interface.
-
virtual void startup() = 0#