HDK
|
This class holds a reference to an attribute. Such an indirection level allows an easy way to invalidate attribute references when an attribute gets deleted (or when the detail itself is deleted). More...
#include <GA_AttributeProxy.h>
Public Member Functions | |
GA_AttributeProxy (GA_Attribute *atr) | |
Constructor. More... | |
~GA_AttributeProxy () | |
SYS_FORCE_INLINE bool | isValid () const |
Returns true if the proxy is still pointing to a valid attribute. More... | |
bool | isLastReference () const |
Checks if there is only one reference to this proxy (held by the caller) More... | |
int64 | getMemoryUsage (bool inclusive) const |
void | countMemory (UT_MemoryCounter &counter, bool inclusive) const |
SYS_FORCE_INLINE void | intrusive_ptr_release () const |
SYS_FORCE_INLINE GA_Attribute * | getAttribute () |
SYS_FORCE_INLINE const GA_Attribute * | getAttribute () const |
Friends | |
class | GA_AttributeSet |
This class holds a reference to an attribute. Such an indirection level allows an easy way to invalidate attribute references when an attribute gets deleted (or when the detail itself is deleted).
Definition at line 30 of file GA_AttributeProxy.h.
|
explicit |
Constructor.
GA_AttributeProxy::~GA_AttributeProxy | ( | ) |
void GA_AttributeProxy::countMemory | ( | UT_MemoryCounter & | counter, |
bool | inclusive | ||
) | const |
Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)
NOTE: This treats GA_AttributeProxy as unshared, despite myReferenceCount, because the count should always be 1.
|
inline |
Obtains an actual attribute. May be NULL, if the attribute got deleted or was never actually found (or sussessfully created).
Definition at line 40 of file GA_AttributeProxy.h.
|
inline |
Obtains an actual attribute. May be NULL, if the attribute got deleted or was never actually found (or sussessfully created).
Definition at line 42 of file GA_AttributeProxy.h.
int64 GA_AttributeProxy::getMemoryUsage | ( | bool | inclusive | ) | const |
Returns the memory footprint of the proxy and the attribute it represents.
|
inline |
Definition at line 72 of file GA_AttributeProxy.h.
bool GA_AttributeProxy::isLastReference | ( | ) | const |
Checks if there is only one reference to this proxy (held by the caller)
|
inline |
Returns true if the proxy is still pointing to a valid attribute.
Definition at line 47 of file GA_AttributeProxy.h.
|
friend |
Definition at line 88 of file GA_AttributeProxy.h.