HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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
 
SYS_FORCE_INLINE exint entries (GA_AttributeScope scope) const
 
SYS_FORCE_INLINE bool empty () const
 
SYS_FORCE_INLINE bool empty (GA_AttributeScope scope) const
 
SYS_FORCE_INLINE 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
 
SYS_FORCE_INLINE const
GA_AttributeSet
getSet () const
 
SYS_FORCE_INLINE GA_AttributeSetgetSet ()
 
SYS_FORCE_INLINE iterator begin (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
SYS_FORCE_INLINE iterator end (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
SYS_FORCE_INLINE ordered_iterator obegin (GA_AttributeScope scope=GA_SCOPE_INVALID) const
 
SYS_FORCE_INLINE 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 346 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

SYS_FORCE_INLINE 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 351 of file GA_AttributeDict.h.

SYS_FORCE_INLINE void GA_AttributeDict::clear ( )
inline

Definition at line 94 of file GA_AttributeDict.h.

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

Definition at line 332 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.)

SYS_FORCE_INLINE bool GA_AttributeDict::empty ( void  ) const
inline

Definition at line 119 of file GA_AttributeDict.h.

SYS_FORCE_INLINE bool GA_AttributeDict::empty ( GA_AttributeScope  scope) const
inline

Definition at line 124 of file GA_AttributeDict.h.

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

Unordered (fastest) iteration

Definition at line 354 of file GA_AttributeDict.h.

SYS_FORCE_INLINE exint GA_AttributeDict::entries ( ) const
inline

Definition at line 103 of file GA_AttributeDict.h.

SYS_FORCE_INLINE exint GA_AttributeDict::entries ( GA_AttributeScope  scope) const
inline

Definition at line 108 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 412 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 437 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 465 of file GA_AttributeDict.h.

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

Definition at line 375 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 392 of file GA_AttributeDict.h.

int64 GA_AttributeDict::getMemoryUsage ( bool  inclusive) const
inline

Report memory usage.

Definition at line 61 of file GA_AttributeDict.h.

SYS_FORCE_INLINE const GA_AttributeSet& GA_AttributeDict::getSet ( ) const
inline

Get access to the containing attribute set.

Definition at line 55 of file GA_AttributeDict.h.

SYS_FORCE_INLINE GA_AttributeSet& GA_AttributeDict::getSet ( )
inline

Get access to the containing attribute set.

Definition at line 57 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 79 of file GA_AttributeDict.h.

SYS_FORCE_INLINE 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 361 of file GA_AttributeDict.h.

SYS_FORCE_INLINE 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 367 of file GA_AttributeDict.h.

SYS_FORCE_INLINE Range GA_AttributeDict::range ( GA_AttributeScope  scope) const
inline

Definition at line 329 of file GA_AttributeDict.h.

Friends And Related Function Documentation

friend class GA_AttributeSet
friend

Definition at line 537 of file GA_AttributeDict.h.

friend class GA_GroupTable
friend

Definition at line 538 of file GA_AttributeDict.h.


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