Radium Engine
1.5.20
|
#include <Engine/Scene/SignalManager.hpp>
Public Types | |
using | ItemObservable = Ra::Core::Utils::Observable<const ItemEntry&> |
Type for item (entity, component or render object) observable. | |
using | FrameObservable = Ra::Core::Utils::Observable<> |
Type for frame observable. | |
Public Member Functions | |
void | fireEntityCreated (const ItemEntry &entity) const |
Notifies all observers of an entity creation. | |
void | fireEntityDestroyed (const ItemEntry &entity) const |
Notifies all observers of an entity removal. | |
void | fireComponentAdded (const ItemEntry &component) const |
Notifies all observers of a component creation. | |
void | fireComponentRemoved (const ItemEntry &component) const |
Notifies all observers of a component removal. | |
void | fireRenderObjectAdded (const ItemEntry &ro) const |
Notifies all observers of a render object creation. | |
void | fireRenderObjectRemoved (const ItemEntry &ro) const |
Notifies all observers of a render object removal. | |
void | fireFrameEnded () const |
Notifies all observers of a end of frame event. | |
void | setOn (bool on) |
Enable/disable the notification of observers. | |
ItemObservable & | getEntityCreatedNotifier () |
ItemObservable & | getEntityDestroyedNotifier () |
ItemObservable & | getComponentCreatedNotifier () |
ItemObservable & | getComponentDestroyedNotifier () |
ItemObservable & | getRenderObjectCreatedNotifier () |
ItemObservable & | getRenderObjectDestroyedNotifier () |
FrameObservable & | getEndFrameNotifier () |
This class is used to inform the external world of events happening in the engine. You can register a callback function which will be called any time the event happens. Signals are fired when an object of the engine (entity, component or render object) is either added or removed. Signals on entities, components and render objects send the item entry indicating the object that was added or removed.
Signals for new objects are fired just after they have been initialized and acquired by the object owning them. Signals for destroyed objects are fired just before they are removed from the object owning them and destroyed
Signals of end of frame send no parameters.
Definition at line 29 of file SignalManager.hpp.
Type for frame observable.
Definition at line 57 of file SignalManager.hpp.
using Ra::Engine::Scene::SignalManager::ItemObservable = Ra::Core::Utils::Observable<const ItemEntry&> |
Type for item (entity, component or render object) observable.
Definition at line 55 of file SignalManager.hpp.
void Ra::Engine::Scene::SignalManager::fireComponentAdded | ( | const ItemEntry & | component | ) | const |
Notifies all observers of a component creation.
Definition at line 45 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireComponentRemoved | ( | const ItemEntry & | component | ) | const |
Notifies all observers of a component removal.
Definition at line 50 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireEntityCreated | ( | const ItemEntry & | entity | ) | const |
Notifies all observers of an entity creation.
Definition at line 35 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireEntityDestroyed | ( | const ItemEntry & | entity | ) | const |
Notifies all observers of an entity removal.
Definition at line 40 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireFrameEnded | ( | ) | const |
Notifies all observers of a end of frame event.
Definition at line 64 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireRenderObjectAdded | ( | const ItemEntry & | ro | ) | const |
Notifies all observers of a render object creation.
Definition at line 55 of file SignalManager.cpp.
void Ra::Engine::Scene::SignalManager::fireRenderObjectRemoved | ( | const ItemEntry & | ro | ) | const |
Notifies all observers of a render object removal.
Definition at line 59 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getComponentCreatedNotifier | ( | ) |
Definition at line 15 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getComponentDestroyedNotifier | ( | ) |
Definition at line 19 of file SignalManager.cpp.
SignalManager::FrameObservable & Ra::Engine::Scene::SignalManager::getEndFrameNotifier | ( | ) |
Definition at line 31 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getEntityCreatedNotifier | ( | ) |
Access to the observable members
Definition at line 7 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getEntityDestroyedNotifier | ( | ) |
Definition at line 11 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getRenderObjectCreatedNotifier | ( | ) |
Definition at line 23 of file SignalManager.cpp.
SignalManager::ItemObservable & Ra::Engine::Scene::SignalManager::getRenderObjectDestroyedNotifier | ( | ) |
Definition at line 27 of file SignalManager.cpp.
|
inline |
Enable/disable the notification of observers.
Definition at line 52 of file SignalManager.hpp.