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

A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often pass around a GB_AttributeDict around. The GA library really only requires a string map of attributes since the attributes are managed by the GA_AttributeSet. More...

#include <GA_AttributeDict.h>

Classes

class  iterator
 
class  Range
 

Public Types

typedef UT_ArrayStringMap
< GA_AttributeProxy * > 
MapType
 
typedef MapType::const_iterator const_map_iterator
 
typedef MapType::iterator map_iterator
 
typedef UT_OrderedIterator
< GA_Attribute *, iterator
ordered_iterator
 Iterator which traverses attributes in given order. More...
 

Public Member Functions

 GA_AttributeDict ()
 
 ~GA_AttributeDict ()
 
int64 getMemoryUsage (bool inclusive) const
 Report memory usage. More...
 
exint getVersionParms () const
 
void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
GA_Attributefind (GA_AttributeScope scope, const UT_StringRef &name) const
 
GA_AttributeProxyfindProxy (GA_AttributeScope scope, const UT_StringRef &name) const
 
SYS_FORCE_INLINE void clear ()
 
SYS_FORCE_INLINE exint entries () const
 
exint entries (GA_AttributeScope scope) const
 
bool empty () const
 
bool empty (GA_AttributeScope scope) const
 
Range range (GA_AttributeScope scope) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachProxy (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachProxy (GA_AttributeScope scope, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachAttribute (FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachAttribute (GA_AttributeScope scope, FUNCTOR &&functor) const
 
template<typename FUNCTOR >
SYS_FORCE_INLINE void forEachName (GA_AttributeScope scope, FUNCTOR &&functor) const
 
const GA_AttributeSetgetSet () const
 
GA_AttributeSetgetSet ()
 
iterator begin (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
iterator end (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
ordered_iterator obegin (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
ordered_iterator oend (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 

Static Public Member Functions

static int compareAlpha (GA_Attribute *const *a, GA_Attribute *const *b)
 

Friends

class GA_AttributeSet
 
class GA_GroupTable
 

Detailed Description

A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often pass around a GB_AttributeDict around. The GA library really only requires a string map of attributes since the attributes are managed by the GA_AttributeSet.

Examples:
RAY/RAY_DemoSprite.C.

Definition at line 42 of file GA_AttributeDict.h.

Member Typedef Documentation

Iterator which traverses attributes in given order.

Definition at line 325 of file GA_AttributeDict.h.

Constructor & Destructor Documentation

GA_AttributeDict::GA_AttributeDict ( )
inline

Definition at line 49 of file GA_AttributeDict.h.

GA_AttributeDict::~GA_AttributeDict ( )
inline

Definition at line 50 of file GA_AttributeDict.h.

Member Function Documentation

iterator GA_AttributeDict::begin ( GA_AttributeScope  scope = GA_SCOPE_INVALID) const
inline

Unordered (fastest) iteration

Examples:
field3d/f3d_io.C, RAY/RAY_DemoSprite.C, and SOP/SOP_PrimVOP.C.

Definition at line 329 of file GA_AttributeDict.h.

SYS_FORCE_INLINE void GA_AttributeDict::clear ( )
inline

Definition at line 92 of file GA_AttributeDict.h.

static int GA_AttributeDict::compareAlpha ( GA_Attribute *const a,
GA_Attribute *const b 
)
inlinestatic

Definition at line 311 of file GA_AttributeDict.h.

void GA_AttributeDict::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.)

bool GA_AttributeDict::empty ( void  ) const
inline

Definition at line 115 of file GA_AttributeDict.h.

bool GA_AttributeDict::empty ( GA_AttributeScope  scope) const
inline

Definition at line 119 of file GA_AttributeDict.h.

iterator GA_AttributeDict::end ( GA_AttributeScope  scope = GA_SCOPE_INVALID) const
inline

Unordered (fastest) iteration

Definition at line 331 of file GA_AttributeDict.h.

SYS_FORCE_INLINE exint GA_AttributeDict::entries ( ) const
inline

Definition at line 101 of file GA_AttributeDict.h.

exint GA_AttributeDict::entries ( GA_AttributeScope  scope) const
inline

Definition at line 105 of file GA_AttributeDict.h.

GA_Attribute* GA_AttributeDict::find ( GA_AttributeScope  scope,
const UT_StringRef name 
) const
GA_AttributeProxy* GA_AttributeDict::findProxy ( GA_AttributeScope  scope,
const UT_StringRef name 
) const
template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_AttributeDict::forEachAttribute ( FUNCTOR &&  functor) const
inline

Definition at line 387 of file GA_AttributeDict.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_AttributeDict::forEachAttribute ( GA_AttributeScope  scope,
FUNCTOR &&  functor 
) const
inline

Definition at line 412 of file GA_AttributeDict.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_AttributeDict::forEachName ( GA_AttributeScope  scope,
FUNCTOR &&  functor 
) const
inline

Definition at line 440 of file GA_AttributeDict.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_AttributeDict::forEachProxy ( FUNCTOR &&  functor) const
inline

Definition at line 350 of file GA_AttributeDict.h.

template<typename FUNCTOR >
SYS_FORCE_INLINE void GA_AttributeDict::forEachProxy ( GA_AttributeScope  scope,
FUNCTOR &&  functor 
) const
inline

Definition at line 367 of file GA_AttributeDict.h.

int64 GA_AttributeDict::getMemoryUsage ( bool  inclusive) const
inline

Report memory usage.

Definition at line 59 of file GA_AttributeDict.h.

const GA_AttributeSet& GA_AttributeDict::getSet ( ) const
inline

Get access to the containing attribute set.

Definition at line 54 of file GA_AttributeDict.h.

GA_AttributeSet& GA_AttributeDict::getSet ( )
inline

Get access to the containing attribute set.

Definition at line 55 of file GA_AttributeDict.h.

exint GA_AttributeDict::getVersionParms ( ) const
inline

Report a cache-count. This is bumped when attributes are created/destroyed (and hence renamed) Only unique to the GA_Detail that owns it, so combine with the GA_Detail::getUniqueId() (Name comes from OP_Node::getVersionParms which has a similar meaning)

Definition at line 77 of file GA_AttributeDict.h.

ordered_iterator GA_AttributeDict::obegin ( GA_AttributeScope  scope = GA_SCOPE_INVALID) const
inline

Ordered iteration. This traverses attributes in a fixed order

Definition at line 337 of file GA_AttributeDict.h.

ordered_iterator GA_AttributeDict::oend ( GA_AttributeScope  scope = GA_SCOPE_INVALID) const
inline

Ordered iteration. This traverses attributes in a fixed order

Definition at line 342 of file GA_AttributeDict.h.

Range GA_AttributeDict::range ( GA_AttributeScope  scope) const
inline

Definition at line 308 of file GA_AttributeDict.h.

Friends And Related Function Documentation

friend class GA_AttributeSet
friend

Definition at line 508 of file GA_AttributeDict.h.

friend class GA_GroupTable
friend

Definition at line 509 of file GA_AttributeDict.h.


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