Listener¶
ILxListenerService¶
-
class
ILxListenerService
¶ Public Functions
-
LxResult
ScriptQuery
(LXtObjectID self, void **ppvObj)¶ A listener service allows a client to submit itself as a global listener. The client object is queried for all global listener interfaces and any that are found will subsequently receive notifications as events occur.
-
LxResult
AddListener
(LXtObjectID self, LXtObjectID object)¶
-
LxResult
RemoveListener
(LXtObjectID self, LXtObjectID object)¶
-
LxResult
ILxListenerPort¶
-
class
ILxListenerPort
¶ Public Functions
-
LxResult
AddListener
(LXtObjectID self, LXtObjectID object)¶ Many nexus objects may also support listener ports. By querying for a port interface on an item or scene and adding to that, the listener client will receive events for changes only on that specific object.
-
LxResult
RemoveListener
(LXtObjectID self, LXtObjectID object)¶
-
LxResult
CLxSingletonListener¶
-
template<class
T
>
classCLxSingletonListener
¶ Since it’s relatively common to declare listeners as singletons, we provide a template class to install the listener when needed and remove it when done. This is done using reference counting on the clients. Test lifecycle to prevent listeners from being removed after shutdown in static objects.