3 #include "ISceneElementInGraphObserver.h"
16 class AggregateSceneElementInGraphObserver :
public ISceneElementInGraphObserver<T>
20 AggregateSceneElementInGraphObserver(
const std::vector<ISceneElementInGraphObserver<T>*>& observers)
21 : m_observers(observers)
26 virtual void OnAddedToSceneGraph(SceneElement<T>* resource)
override
28 for (
auto pObserver : m_observers)
30 pObserver->OnAddedToSceneGraph(resource);
34 virtual void OnRemovedFromSceneGraph(SceneElement<T>* resource)
override
36 for (
auto pObserver : m_observers)
38 pObserver->OnRemovedFromSceneGraph(resource);
44 std::vector<ISceneElementInGraphObserver<T>*> m_observers;