HDK
|
#include <PDG_AttributeHolder.h>
Public Member Functions | |
PDG_AttributeHolder () | |
Constructs an invalid attribute holder. More... | |
PDG_AttributeHolder (PDG_AttributeHolder &&other) | |
Move constructs an attribute holder. More... | |
PDG_AttributeHolder (PDG_AttributeData *attribute, PDG_AttributeType type, uint16 flags, bool owner, bool stale) | |
~PDG_AttributeHolder () | |
PDG_AttributeHolder & | operator= (PDG_AttributeHolder &&other) |
Move assignment is permitted. More... | |
int64 | getMemoryUsage (bool inclusive) const |
bool | isOwner () const |
Returns whether or not this holder has taken ownership of the attribute. More... | |
bool | isStale () const |
bool | isConcat () const |
bool | isChanged () const |
PDG_AttributeData * | own () |
void | swapAttributes (PDG_AttributeHolder &holder) |
void | reset () |
Resets the holder to a nullptr, thus making it an invalid holder. More... | |
PDG_AttributeData * | reset (const PDG_AttributeData *attribute, PDG_AttributeType type, uint16 flags, bool own, bool stale, bool concat) |
PDG_AttributeData * | reset (const PDG_AttributeHolder &holder, bool own, bool sync_flags) |
template<typename Attribute = PDG_AttributeData> | |
const Attribute * | attribute () const |
Const accessor for the own attribute - could be nullptr. More... | |
template<typename Attribute = PDG_AttributeData> | |
Attribute * | attribute () |
Non-const accessor for the own attribute - could be nullptr. More... | |
template<typename Attribute = PDG_AttributeData> | |
bool | hasData () const |
Returns true if the underlying attribute has any data. More... | |
const PDG_AttributeData * | operator-> () const |
PDG_AttributeData * | operator-> () |
const PDG_AttributeData & | operator* () const |
PDG_AttributeData & | operator* () |
bool | operator== (const PDG_AttributeHolder &other) const |
bool | operator!= (const PDG_AttributeHolder &other) const |
operator bool () const | |
template<typename Attribute > | |
bool | typeMatch () const |
PDG_AttributeType | type () const |
Returns the attribute type. More... | |
uint16 | flags () const |
Returns the attribute flags. More... | |
bool | hasAnyFlags () const |
Returns true if this attribute has at least one flag set. More... | |
bool | hasFlag (PDG_AttributeFlag flag) const |
Returns true if this attribute has the specified flag. More... | |
bool | hasFlags (uint16 flags) const |
Returns true if this attribute has all of the specified flags set. More... | |
bool | hasAnyFlags (uint16 flags) const |
Returns true if this attribute has any of the specified flags set. More... | |
bool | setFlag (PDG_AttributeFlag flag, bool set) |
bool | setFlags (uint16 flags) |
void | setIsConcat (bool is_concat) |
Sets the concat bit to the specified value. More... | |
void | setIsChanged (bool is_changed) |
Sets the changed bit to the specified value. More... | |
template<typename Attribute > | |
bool | concat (const PDG_AttributeHolder &other) |
Concats the specified attribute with the attribute in this holder. More... | |
template<typename Attribute > | |
bool | adjustSize (int offset) |
Sets the size of the attribute. More... | |
template<typename Attribute > | |
void | clear () |
Clears the attribute. More... | |
template<typename Attribute > | |
void | swap (PDG_AttributeHolder &other) |
Swaps the specified attribute with the attribute in this holder. More... | |
Reference to a PDG attribute instance, either owned or shared. Contains the type information for the attribute as well as various flags (no copy, export, etc).
Definition at line 24 of file PDG_AttributeHolder.h.
|
inline |
Constructs an invalid attribute holder.
Definition at line 28 of file PDG_AttributeHolder.h.
|
inline |
Move constructs an attribute holder.
Definition at line 40 of file PDG_AttributeHolder.h.
|
inline |
Constructs an attribute holder from an attribute data pointer, with the specified ownership
Definition at line 59 of file PDG_AttributeHolder.h.
|
inline |
Destroys the attribute own by this holder if it exists, and the own flag is set
Definition at line 76 of file PDG_AttributeHolder.h.
|
inline |
Sets the size of the attribute.
Definition at line 452 of file PDG_AttributeHolder.h.
|
inline |
Const accessor for the own attribute - could be nullptr.
Definition at line 267 of file PDG_AttributeHolder.h.
|
inline |
Non-const accessor for the own attribute - could be nullptr.
Definition at line 274 of file PDG_AttributeHolder.h.
Clears the attribute.
Definition at line 459 of file PDG_AttributeHolder.h.
|
inline |
Concats the specified attribute with the attribute in this holder.
Definition at line 444 of file PDG_AttributeHolder.h.
|
inline |
Returns the attribute flags.
Definition at line 367 of file PDG_AttributeHolder.h.
|
inline |
Returns the memory usage of the attribute, including the data only if this holder owns it.
Definition at line 102 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute has at least one flag set.
Definition at line 373 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute has any of the specified flags set.
Definition at line 391 of file PDG_AttributeHolder.h.
|
inline |
Returns true if the underlying attribute has any data.
Definition at line 281 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute has the specified flag.
Definition at line 379 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute has all of the specified flags set.
Definition at line 385 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute has been modified since the changed flag was cleared
Definition at line 132 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this attribute contains data that was concatenated from multiple input attributes
Definition at line 125 of file PDG_AttributeHolder.h.
|
inline |
Returns whether or not this holder has taken ownership of the attribute.
Definition at line 111 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this is a stale owned attribute, which happens during deserialization
Definition at line 118 of file PDG_AttributeHolder.h.
|
inline |
Returns true if this holder refers to a valid attribute pointer, else false.
Definition at line 346 of file PDG_AttributeHolder.h.
|
inline |
Compares two attribute holders for inequality - the inverse of the above function.
Definition at line 339 of file PDG_AttributeHolder.h.
|
inline |
Const dereference, invalid to use if this holder refers to a null attribute.
Definition at line 305 of file PDG_AttributeHolder.h.
|
inline |
Nonconst dereference, invalid to use if this holder refers to a null attribute.
Definition at line 312 of file PDG_AttributeHolder.h.
|
inline |
Const arrow operator, invalid to use if this holder refers to a null attribute.
Definition at line 291 of file PDG_AttributeHolder.h.
|
inline |
Nonconst arrow operator, invalid to use if this holder refers to a null attribute.
Definition at line 298 of file PDG_AttributeHolder.h.
|
inline |
Move assignment is permitted.
Definition at line 83 of file PDG_AttributeHolder.h.
|
inline |
Compares two attribute holders and returns true if they're the same. The data is only compared if all other aspects are the same.
Definition at line 319 of file PDG_AttributeHolder.h.
|
inline |
Takes ownership of the attribute pointer if it is not already owned. If it is, the pointer is returned back directly
Definition at line 139 of file PDG_AttributeHolder.h.
Resets the holder to a nullptr, thus making it an invalid holder.
Definition at line 169 of file PDG_AttributeHolder.h.
|
inline |
Changes the attribute owned by this holder, and deletes the existing attribute if one existed and was owned by this holder.
Definition at line 183 of file PDG_AttributeHolder.h.
|
inline |
Changes the attribute owned by this holder so that it has a shallow holder to the one owned by the specififed attribute, or copies it depending on the own arg. Deletes the existing attribute if one existed and was owned by this holder
Definition at line 221 of file PDG_AttributeHolder.h.
|
inline |
Sets a flag on the attribute. Returns true if the flag was changed as a result of this operation.
Definition at line 398 of file PDG_AttributeHolder.h.
|
inline |
Sets the flags on the attribute directly. Returns true if any of the flags were modified.
Definition at line 421 of file PDG_AttributeHolder.h.
|
inline |
Sets the changed bit to the specified value.
Definition at line 437 of file PDG_AttributeHolder.h.
|
inline |
Sets the concat bit to the specified value.
Definition at line 431 of file PDG_AttributeHolder.h.
|
inline |
Swaps the specified attribute with the attribute in this holder.
Definition at line 466 of file PDG_AttributeHolder.h.
|
inline |
Swaps the attributes in this holder and the specified holder, but leaves the flags unmodified.
Definition at line 151 of file PDG_AttributeHolder.h.
|
inline |
Returns the attribute type.
Definition at line 361 of file PDG_AttributeHolder.h.
|
inline |
Returns true if the type of the template argumented is a match for the the type of this holder
Definition at line 354 of file PDG_AttributeHolder.h.