3 #include <Engine/RaEngine.hpp>
7 #include <Core/Utils/Observable.hpp>
9 #include <Engine/Scene/ItemEntry.hpp>
34 void fireEntityCreated(
const ItemEntry& entity )
const;
36 void fireEntityDestroyed(
const ItemEntry& entity )
const;
39 void fireComponentAdded(
const ItemEntry& component )
const;
41 void fireComponentRemoved(
const ItemEntry& component )
const;
44 void fireRenderObjectAdded(
const ItemEntry& ro )
const;
46 void fireRenderObjectRemoved(
const ItemEntry& ro )
const;
49 void fireFrameEnded()
const;
52 void setOn(
bool on ) { m_isOn = on; }
72 mutable std::mutex m_mutex;
79 ItemObservable m_entityCreatedCallbacks;
80 ItemObservable m_entityDestroyedCallbacks;
81 ItemObservable m_componentAddedCallbacks;
82 ItemObservable m_componentRemovedCallbacks;
83 ItemObservable m_roAddedCallbacks;
84 ItemObservable m_roRemovedCallbacks;
89 FrameObservable m_frameEndCallbacks;
93 template <
typename... TArgs>
96 std::lock_guard<std::mutex> lock( m_mutex );
void notify(Args... p) const
Notify (i.e. call) each attached observer with argument p.
void setOn(bool on)
Enable/disable the notification of observers.