17 #ifndef _LISTENER_FACTORY_LOGIC_HH_
18 #define _LISTENER_FACTORY_LOGIC_HH_
20 #include <OgreCompositorInstance.h>
21 #include <OgreCompositorLogic.h>
35 Ogre::CompositorInstance *_newInstance)
37 Ogre::CompositorInstance::Listener *listener =
38 createListener(_newInstance);
40 _newInstance->addListener(listener);
41 this->listeners[_newInstance] = listener;
46 Ogre::CompositorInstance *_destroyedInstance)
48 delete this->listeners[_destroyedInstance];
49 this->listeners.erase(_destroyedInstance);
53 protected:
virtual Ogre::CompositorInstance::Listener *createListener(
54 Ogre::CompositorInstance *instance) = 0;
56 private:
typedef std::map<Ogre::CompositorInstance*,
57 Ogre::CompositorInstance::Listener*> ListenerMap;
59 ListenerMap listeners;
The simple types of compositor logics will all do the same thing - Attach a listener to the created c...
Definition: ListenerFactoryLogic.hh:31
virtual void compositorInstanceCreated(Ogre::CompositorInstance *_newInstance)
Definition: ListenerFactoryLogic.hh:34
virtual void compositorInstanceDestroyed(Ogre::CompositorInstance *_destroyedInstance)
Definition: ListenerFactoryLogic.hh:45
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48