HDK
|
A symbol table for attribute data. More...
#include <GT_AttributeMap.h>
Public Types | |
typedef UT_ArrayStringMap < UT_StringHolder > | ExportMapType |
typedef ExportMapType::const_iterator | const_export_iterator |
typedef UT_ArrayStringMap< int > | NamesMapType |
typedef NamesMapType::const_iterator | const_names_iterator |
Static Public Member Functions | |
static const GT_AttributeMapHandle | filter (const GT_AttributeMapHandle &src, const GT_AttributeMapFilter &filter) |
Friends | |
class | GT_AttributeList |
Additional Inherited Members | |
![]() | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
A symbol table for attribute data.
Attribute data is stored in two structures. The GT_AttributeMap keeps a mapping of names to integer values. The integer values are the offsets into the GT_AttributeList, which stores the actual data.
Definition at line 42 of file GT_AttributeMap.h.
Definition at line 47 of file GT_AttributeMap.h.
Definition at line 49 of file GT_AttributeMap.h.
Definition at line 46 of file GT_AttributeMap.h.
Definition at line 48 of file GT_AttributeMap.h.
|
explicit |
Default constructor.
GT_AttributeMap::GT_AttributeMap | ( | const GT_AttributeMap & | src | ) |
Copy constructor.
GT_AttributeMap::~GT_AttributeMap | ( | ) |
Destructor.
int GT_AttributeMap::add | ( | const UT_StringHolder & | name, |
bool | replace_existing | ||
) |
Add a new symbol to the index. If this is a duplicate symbol, setting replace_existing
will return the previous index. Otherwise, -1 will be returned.
|
inline |
Add export mapping (from parameter name to export name)
Definition at line 100 of file GT_AttributeMap.h.
void GT_AttributeMap::addExportName | ( | const UT_StringHolder & | name, |
const UT_StringHolder & | export_name | ||
) |
Add export mapping (from parameter name to export name)
|
inline |
Access to a symbol table traverser.
Definition at line 127 of file GT_AttributeMap.h.
void GT_AttributeMap::clear | ( | ) |
Clear the map.
|
inline |
How many symbols are there.
Definition at line 74 of file GT_AttributeMap.h.
|
static |
Create a new attribute map by filtering the entries. Each entry in the src
is filtered by the filter
and if accepted, added to the new map.
|
inline |
Find the symbol index (or -1 if no symbol exists)
Definition at line 80 of file GT_AttributeMap.h.
const UT_StringHolder& GT_AttributeMap::getExportName | ( | int | index | ) | const |
Get the exported name for a parameter
const char* GT_AttributeMap::getLabel | ( | int | index, |
UT_WorkBuffer & | label_storage | ||
) | const |
Get a label which includes the export name and other properties This returns the string stored in the label_storage
int64 GT_AttributeMap::getMemoryUsage | ( | bool | inclusive | ) | const |
Return approximate memory used by map.
|
inline |
Find the name for the given index.
Definition at line 91 of file GT_AttributeMap.h.
|
inline |
Get the symbol names.
Definition at line 119 of file GT_AttributeMap.h.
Since GT can move attribute storage classes around, especially compared with GEO, it's sometimes useful to know what the original attribute owner was. This is not always guaranteed to be set to something other that GT_OWNER_INVALID, but it will likely be set if the attribute originates from a GA_Attribute.
Definition at line 113 of file GT_AttributeMap.h.
|
inline |
Test if a name exists.
Definition at line 87 of file GT_AttributeMap.h.
|
inline |
Definition at line 67 of file GT_AttributeMap.h.
bool GT_AttributeMap::operator== | ( | const GT_AttributeMap & | map | ) | const |
Compare two maps.
Set the original owner.
Definition at line 116 of file GT_AttributeMap.h.
|
friend |
Definition at line 134 of file GT_AttributeMap.h.