HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_PackedNameMap Class Reference

Map to translate from Alembic attribute names to Houdini names. More...

#include <GEO_PackedNameMap.h>

+ Inheritance diagram for GEO_PackedNameMap:

Classes

class  LoadContainer
 

Public Types

typedef UT_SymbolMap< UT_StringMapType
 

Public Member Functions

 GEO_PackedNameMap ()
 
 ~GEO_PackedNameMap ()
 
bool isEqual (const GEO_PackedNameMap &src) const
 Compare equality. More...
 
uint hash () const
 Compute a hash for the name map. More...
 
bool isDefault () const
 Is the name map default (allow all attributes and no renaming) More...
 
const char * getName (const char *name) const
 
const char * getName (const std::string &name) const
 
const char * getTypeInfo (const char *name) const
 
const char * getTypeInfo (const std::string &name) const
 
void addMap (const char *abcName, const char *houdiniName)
 Add a translation from the abcName to the houdini attribute name. More...
 
void addTypeInfo (const char *abcName, const char *typeInfo)
 Add a translation from the abcName to the attribute's type info. More...
 
void skip (const char *abcName)
 Avoid adding an attribute of the given name. This is done by. More...
 
void setPattern (GA_AttributeOwner owner, const char *pattern)
 
const char * pattern (GA_AttributeOwner owner) const
 Return the attribute type pattern. More...
 
bool matchPattern (GA_AttributeOwner owner, const char *name) const
 
int64 getMemoryUsage (bool inclusive) const
 Report memory usage (includes all shared memory) More...
 
void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
void dump () const
 
bool operator== (const GEO_PackedNameMap &src) const
 
bool operator!= (const GEO_PackedNameMap &src) const
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GEO_PackedNameMap >
SYS_FORCE_INLINE UT_IntrusiveRefCounter ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 
bool save (UT_JSONWriter &w, int version=2) const
 
static bool load (GEO_PackedNameMapPtr &map, UT_JSONParser &p, int version)
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< GEO_PackedNameMap >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Map to translate from Alembic attribute names to Houdini names.

Definition at line 30 of file GEO_PackedNameMap.h.

Member Typedef Documentation

Constructor & Destructor Documentation

GEO_PackedNameMap::GEO_PackedNameMap ( )
GEO_PackedNameMap::~GEO_PackedNameMap ( )

Member Function Documentation

void GEO_PackedNameMap::addMap ( const char *  abcName,
const char *  houdiniName 
)

Add a translation from the abcName to the houdini attribute name.

void GEO_PackedNameMap::addTypeInfo ( const char *  abcName,
const char *  typeInfo 
)

Add a translation from the abcName to the attribute's type info.

void GEO_PackedNameMap::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly.

void GEO_PackedNameMap::dump ( ) const
int64 GEO_PackedNameMap::getMemoryUsage ( bool  inclusive) const

Report memory usage (includes all shared memory)

const char* GEO_PackedNameMap::getName ( const char *  name) const

Get the name mapping. If the name isn't mapped, the original name will be returned. If the attribute should be skipped, a NULL pointer will be returned.

const char* GEO_PackedNameMap::getName ( const std::string name) const
inline

Definition at line 81 of file GEO_PackedNameMap.h.

const char* GEO_PackedNameMap::getTypeInfo ( const char *  name) const

Get the typeinfo mapping. If the name isn't mapped, nullptr will be returned.

const char* GEO_PackedNameMap::getTypeInfo ( const std::string name) const
inline

Definition at line 86 of file GEO_PackedNameMap.h.

uint GEO_PackedNameMap::hash ( ) const

Compute a hash for the name map.

bool GEO_PackedNameMap::isDefault ( ) const
inline

Is the name map default (allow all attributes and no renaming)

Definition at line 61 of file GEO_PackedNameMap.h.

bool GEO_PackedNameMap::isEqual ( const GEO_PackedNameMap src) const

Compare equality.

static bool GEO_PackedNameMap::load ( GEO_PackedNameMapPtr map,
UT_JSONParser p,
int  version 
)
static

JSON I/O. It's up to the caller to determine which version of the name map to load. This is typically done by using a different keyword when loading/saving.

  • Version 1:
    Saves a single map for the attribute name map
  • Version 2:
    Saves a keyword map with different components. The name map along with the patterns.
bool GEO_PackedNameMap::matchPattern ( GA_AttributeOwner  owner,
const char *  name 
) const

Check to see whether an attribute can be added. This matches the pattern for the given owner.

bool GEO_PackedNameMap::operator!= ( const GEO_PackedNameMap src) const
inline

Equality operator

Definition at line 73 of file GEO_PackedNameMap.h.

bool GEO_PackedNameMap::operator== ( const GEO_PackedNameMap src) const
inline

Equality operator

Definition at line 71 of file GEO_PackedNameMap.h.

const char* GEO_PackedNameMap::pattern ( GA_AttributeOwner  owner) const
inline

Return the attribute type pattern.

Definition at line 106 of file GEO_PackedNameMap.h.

bool GEO_PackedNameMap::save ( UT_JSONWriter w,
int  version = 2 
) const

JSON I/O. It's up to the caller to determine which version of the name map to load. This is typically done by using a different keyword when loading/saving.

  • Version 1:
    Saves a single map for the attribute name map
  • Version 2:
    Saves a keyword map with different components. The name map along with the patterns.
void GEO_PackedNameMap::setPattern ( GA_AttributeOwner  owner,
const char *  pattern 
)

Set a pattern for load attributes. Only attributes which match the given pattern should be created. The default pattern is "*" (allowing all attributes).

void GEO_PackedNameMap::skip ( const char *  abcName)
inline

Avoid adding an attribute of the given name. This is done by.

Definition at line 96 of file GEO_PackedNameMap.h.


The documentation for this class was generated from the following file: