17#include "vreutil/delegate.h"
85 public DtDelegate<void, const DtAttributeHandle&>
94 template <
class OBJECT_T>
144 template <
class OBJECT_T,
typename METHOD_T>
153 template <
typename FUNC_T>
175 template <
class OBJECT_T>
181 template <
class OBJECT_T,
typename ATTRIBUTE_T>
184 template <
class OBJECT_T,
typename ATTRIBUTE_T>
187 template <
typename ATTRIBUTE_T>
190 template <
typename ATTRIBUTE_T>
200 std::map<std::string, std::unique_ptr<DtAttributeCallbackBase>>
myCallbackMap;
Definition attributeCallback.h:28
friend class DtAttribute
Definition attributeCallback.h:62
virtual void connect(DtAttributeHandle attribute)
Connects the callback to an attribute.
std::list< DtAttributeHandle > AttributeList
Type definition for the list of connected attributes.
Definition attributeCallback.h:66
virtual unsigned int threadId() const
virtual ~DtAttributeCallbackBase()
Virtual destructor.
virtual void disconnectAll()
Disconnects the callback from all connected attributes.
DtAttributeCallbackBase()
virtual void disconnect(DtAttributeHandle attribute)
Disconnects the callback from a specific attribute.
virtual bool isConnected(const DtAttributeHandle &attribute) const
Checks if the callback is connected to a specific attribute.
AttributeList myConnections
List of attributes this callback is connected to.
Definition attributeCallback.h:69
virtual bool hasConnection() const
Checks if the callback is connected to any attributes.
unsigned int myThreadId
Definition attributeCallback.h:71
virtual void invoke(const DtAttributeHandle &changedAttribute) const =0
void connect(DtAttributeHandle attr, void(*func)(const DtAttributeHandle &))
std::map< std::string, std::unique_ptr< DtAttributeCallbackBase > > myCallbackMap
Definition attributeCallback.h:200
virtual ~DtAttributeCallbackManager()
void connect(DtAttributeHandle attr, void(*func)(ATTRIBUTE_T))
DtAttributeCallbackManager(const DtAttributeCallbackManager &)=delete
DtAttributeCallbackManager & operator=(const DtAttributeCallbackManager &)=delete
void connect(DtAttributeHandle attr, OBJECT_T *object, void(OBJECT_T::*method)(ATTRIBUTE_T))
void connect(DtAttributeHandle attr, OBJECT_T *object, void(OBJECT_T::*method)(const DtAttributeHandle &))
void disconnect(DtAttributeHandle attr)
DtAttributeCallbackManager()
bool isConnected(DtAttributeHandle attr) const
void connect(DtAttributeHandle attr, OBJECT_T *object, void(OBJECT_T::*method)(const ATTRIBUTE_T &))
DtAttributeCallbackBase * connection(DtAttributeHandle attr)
void connect(DtAttributeHandle attr, void(*func)(const ATTRIBUTE_T &))
bool myIncludeChildren
Defines whether this callback is also invoked for any changes to children of the connected attribute.
Definition attributeCallback.h:123
DtAttributeChangeCallback(OBJECT_T *object, void(OBJECT_T::*method)(const DtAttributeHandle &))
Constructor for attribute callbacks using member functions.
virtual void includeChildren(bool on)
Set whether this callback should also be invoked for any change to any child attribute.
virtual bool includesChildren() const
Get whether this callback is set to trigger on changes to child attributes.
virtual void invoke(const DtAttributeHandle &changedAttribute) const override
virtual ~DtAttributeChangeCallback() override
Virtual destructor.
DtAttributeChangeCallback(void(*func)(const DtAttributeHandle &))
Constructor for attribute callbacks using static function.
Handle class for safe access to attributes.
Definition attributeHandle.h:30
Core attribute class for shared data storage.
Definition attribute.h:34
virtual ~DtAttributeValueCallback() override
Virtual destructor.
virtual void invoke(const DtAttributeHandle &changedAttribute) const override
DtAttributeValueCallback(FUNC_T func)
Constructor for attribute callbacks using static function.
DtAttributeValueCallback(OBJECT_T *object, METHOD_T method)
Constructor for attribute callbacks using member functions.
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49