HDK
|
#include <GA_AttributeType.h>
Public Member Functions | |
GA_AttributeType (const UT_StringHolder &name) | |
virtual | ~GA_AttributeType () |
GA_Attribute * | create (const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name, const UT_Options *creation_options, const GA_AttributeOptions *attribute_options) const |
bool | recycleAttribute (GA_Attribute &attrib, const GA_ReuseStrategy &strategy, const GA_AttributeType &requested_type, const UT_Options *creation_options, const GA_AttributeOptions *attribute_options) const |
SYS_FORCE_INLINE const UT_StringHolder & | getTypeName () const |
Return information about the type. More... | |
SYS_FORCE_INLINE int | getTypeId () const |
bool | isFactoryType () const |
bool | isStandardType () const |
bool | isTopologyType () const |
virtual bool | jsonLoadDeltaDefinition (UT_JSONParser &p, GA_AIFEditDelta *&delta) const |
Static Public Member Functions | |
static const GA_AttributeType * | findType (const UT_StringRef &name) |
template<typename AIF_TYPE > | |
static GA_AIFDefinition< AIF_TYPE > | registerAIF (AIF_TYPE *default_impl) |
Protected Member Functions | |
virtual GA_Attribute * | alloc (const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name, const UT_Options *creation_options) const =0 |
Allocate the attribute. More... | |
virtual bool | recycle (GA_Attribute &attrib, const GA_ReuseStrategy &strategy, const UT_Options *creation_options) const =0 |
Friends | |
template<typename AIF_TYPE > | |
class | GA_AIFDefinition |
Definition at line 42 of file GA_AttributeType.h.
GA_AttributeType::GA_AttributeType | ( | const UT_StringHolder & | name | ) |
|
virtual |
|
protectedpure virtual |
Allocate the attribute.
GA_Attribute* GA_AttributeType::create | ( | const GA_IndexMap & | index_map, |
GA_AttributeScope | scope, | ||
const UT_StringHolder & | name, | ||
const UT_Options * | creation_options, | ||
const GA_AttributeOptions * | attribute_options | ||
) | const |
Method to create and initialize a new attribute. The pure virtual alloc() method is used to allocate the attribute.
|
static |
|
inline |
Definition at line 78 of file GA_AttributeType.h.
|
inline |
Return information about the type.
Definition at line 76 of file GA_AttributeType.h.
|
inline |
Definition at line 80 of file GA_AttributeType.h.
|
inline |
Definition at line 81 of file GA_AttributeType.h.
|
inline |
Definition at line 82 of file GA_AttributeType.h.
|
virtual |
This method is used to parse the GA_AIFEditDelta type arguments saved to a JSON stream in order to allocate the appropriate subclass. The type arguments should be stored as the next object. TODO: Maybe we should parse a UT_Options object externally and pass that in?
|
protectedpure virtual |
This method is the type-specific implementation of recycleAttribute().
bool GA_AttributeType::recycleAttribute | ( | GA_Attribute & | attrib, |
const GA_ReuseStrategy & | strategy, | ||
const GA_AttributeType & | requested_type, | ||
const UT_Options * | creation_options, | ||
const GA_AttributeOptions * | attribute_options | ||
) | const |
There may already be an attribute with the same name when we attempt to add a new attribute. Whenever possible we want to try to recycle the existing attribute, updating it for our current needs, instead of allocating a new attribute and copying any compatible values.
This method returns false whenever it was not possible to update the supplied attribute to meet the new requirements. The attribute may be partially modified even on failure.
|
inlinestatic |
This method is used to register a new AIF type. The returned object can be used to bind custom implementations to specific types and get the implementation bound to a given type. A default implementation can be specified during the registration that will be used for those types without an explicitly bound custom implementation.
Definition at line 99 of file GA_AttributeType.h.
|
friend |
Definition at line 144 of file GA_AttributeType.h.