164 template <
typename T>
181 using Ptr = std::shared_ptr<DtAttribute>;
268 operator const T()
const;
unsigned int myKey
Key used for locking and unlocking.
Definition attributeHandle.h:214
DtAttributeHandle(const Ptr &ptr, const std::string &aliasName="", const Ptr &aliasParent=Ptr())
Constructor that takes a shared pointer to an attribute.
static unsigned int nextKey()
Generates a new unique key for locking.
DtAttribute * operator->()
Dereference operator for accessing the attribute.
void unassign() const
Unassigns this handle from its attribute.
bool assigned() const
Checks if this handle is assigned to an attribute.
std::string myAliasName
Alias name of the attribute if found by an alias path.
Definition attributeHandle.h:208
friend class DtAttribute
Definition attributeHandle.h:216
bool unlock()
Unlocks the attribute, allowing other handles to write again.
virtual ~DtAttributeHandle()
Virtual destructor.
const DtAttributeHandle operator[](const unsigned int i) const
Const indexing operator for accessing child attributes by index.
bool lock()
Locks the attribute, making it read-only for other handles.
bool isLocked() const
Returns true if this handle currently holds the write lock.
bool myLocked
Flag indicating if this handle is locked.
Definition attributeHandle.h:211
DtAttributeHandle operator[](const std::string &name)
Indexing operator for accessing child attributes by name.
bool recursiveUnlock()
Unlocks this attribute and all descendants locked with this handle's key.
const std::string & aliasName() const
Returns the alias name if the attribute was found via an alias path.
const DtAttributeHandle operator[](const std::string &name) const
Const indexing operator for accessing child attributes by name.
DtAttributeHandle(const char *path)
Constructor from attribute path.
virtual void assign(const DtAttributeHandle &other, bool attrMustBeSet=false) const
Assigns this handle to refer to the same attribute as another handle.
const DtAttributeHandle & operator=(const DtAttributeHandle &other) const
Copy assignment operator.
bool assignedSame(const DtAttributeHandle &other) const
Checks if this handle is assigned to the same attribute as another handle.
DtAttributeHandle()
Default constructor.
bool exclusiveSet(const T &data)
Sets the attribute value, bypassing the exclusive write lock.
DtAttributeHandle(const std::string &path)
Constructor from attribute path.
Ptr myAliasParent
Pointer to alias parent if found by an alias path.
Definition attributeHandle.h:205
DtAttributeHandle(const DtAttributeHandle &other)
Copy constructor.
std::shared_ptr< DtAttribute > Ptr
Shared pointer type for attributes.
Definition attributeHandle.h:181
void next() const
Treats this handle as an iterator and advances to the next sibling attribute.
DtAttributeHandle & operator=(const DtAttributeHandle &other)
void avoidNull() const
Ensures that the handle is assigned to an attribute.
bool recursiveLock()
Locks this attribute and all descendants recursively.
const DtAttribute * operator->() const
Const dereference operator for accessing the attribute.
Ptr myAttrPtr
Shared pointer to the attribute.
Definition attributeHandle.h:202
DtAttributeHandle operator[](const unsigned int i)
Indexing operator for accessing child attributes by index.
bool isAlias() const
Returns true if the handle points to an attribute found via an alias path.
Type-specific handle class for attributes.
Definition attributeHandle.h:229
DtAttributeHandleType< T > & operator=(const T &newValue)
const T operator*() const
Dereference operator returning the attribute value.
DtAttributeType< T > * operator->()
Dereference operator for accessing the typed attribute.
DtAttributeHandleType(const DtAttributeHandle &other)
Constructor from a generic attribute handle.
DtAttributeHandleType(const DtAttributeHandleType< T > &other)
Copy constructor.
DtAttributeHandleType()
Default constructor.
void assign(const DtAttributeHandle &other, bool attrMustBeSet=false) const override
Assigns this handle to refer to the same attribute as another handle.
const DtAttributeType< T > * operator->() const
Const dereference operator for accessing the typed attribute.
virtual ~DtAttributeHandleType() override
Virtual destructor.
const DtAttributeHandleType< T > & operator=(const T &newValue) const
Assignment operator for setting the attribute value.
Core attribute class for shared data storage.
Definition attribute.h:35
Type-specific attribute class.
Definition attribute.h:937
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
!
Definition glsVreMessageUtil.h:50
bool operator!=(const makVre::DtAttributeHandleType< T > &a, const T &b)
Inequality comparison between a typed attribute handle and a value.
bool operator==(const makVre::DtAttributeHandleType< T > &a, const T &b)
Equality comparison between a typed attribute handle and a value.