HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER > Class Template Reference

#include <GA_Handle.h>

Public Member Functions

 GA_RWBatchHandleTHolder ()
 
 GA_RWBatchHandleTHolder (GA_Attribute *attrib)
 
 GA_RWBatchHandleTHolder (GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
 
void operator= (GA_Attribute *attrib)
 
void bind (GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
 
void bind (GA_Attribute *attrib, int minsize=1)
 Bind the handle to the given attribute. More...
 
GA_AttributegetAttribute () const
 Access to attribute. More...
 
int getTupleSize () const
 Tuple size of the attribute. More...
 
GA_DataId getDataId () const
 
void clear ()
 Clear the handle. More...
 
SYS_FORCE_INLINE HOLDER get (GA_Offset off, int comp=0) const
 Get the string at the given offset. More...
 
SYS_FORCE_INLINE INDEXTYPE getIndex (GA_Offset off, int comp=0) const
 Get the string index at the given offset. More...
 
SYS_FORCE_INLINE void set (GA_Offset off, const HOLDER &str)
 Store the str at the given offset. More...
 
SYS_FORCE_INLINE void set (const GA_Range &range, const HOLDER &str)
 
SYS_FORCE_INLINE void set (GA_Offset off, int comp, const HOLDER &str)
 
SYS_FORCE_INLINE void set (const GA_Range &range, int comp, const HOLDER &str)
 
SYS_FORCE_INLINE void set (GA_Offset off, INDEXTYPE idx)
 Store the string indexed by the idx at the given offset. More...
 
SYS_FORCE_INLINE void set (const GA_Range &range, INDEXTYPE idx)
 
SYS_FORCE_INLINE void set (GA_Offset off, int comp, INDEXTYPE idx)
 
SYS_FORCE_INLINE void set (const GA_Range &range, int comp, INDEXTYPE idx)
 
SYS_FORCE_INLINE bool hasChanges () const
 
SYS_FORCE_INLINE bool isValid () const
 
SYS_FORCE_INLINE bool isInvalid () const
 

Protected Attributes

ATI * myAttrib
 
DELAYEDWRITER myWriter
 

Detailed Description

template<typename HOLDER, typename INDEXTYPE, typename ATI, typename DELAYEDWRITER>
class GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >

Read-Write string handle Batches all reference counts until a flush() or its destructor. Because it tracks this locally, you MUST create a separate one per thread! (Even if this were made thread safe, that would defeat the purpose of this, which is to use thread-local reference counts to avoid write contention) NOTE: This bumps the data ID of any attribute it's bound to upon destruction.

Definition at line 1035 of file GA_Handle.h.

Constructor & Destructor Documentation

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::GA_RWBatchHandleTHolder ( )
inline

Definition at line 1038 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::GA_RWBatchHandleTHolder ( GA_Attribute attrib)
inline

Definition at line 1042 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::GA_RWBatchHandleTHolder ( GA_Detail gdp,
GA_AttributeOwner  owner,
const UT_StringRef name,
int  minsize = 1 
)

Member Function Documentation

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::bind ( GA_Detail gdp,
GA_AttributeOwner  owner,
const UT_StringRef name,
int  minsize = 1 
)
template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::bind ( GA_Attribute attrib,
int  minsize = 1 
)
inline

Bind the handle to the given attribute.

Definition at line 1055 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::clear ( )
inline

Clear the handle.

Definition at line 1077 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE HOLDER GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::get ( GA_Offset  off,
int  comp = 0 
) const
inline

Get the string at the given offset.

Definition at line 1090 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
GA_Attribute* GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::getAttribute ( ) const
inline

Access to attribute.

Definition at line 1066 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
GA_DataId GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::getDataId ( ) const
inline

Definition at line 1069 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE INDEXTYPE GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::getIndex ( GA_Offset  off,
int  comp = 0 
) const
inline

Get the string index at the given offset.

Definition at line 1098 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
int GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::getTupleSize ( ) const
inline

Tuple size of the attribute.

Definition at line 1068 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE bool GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::hasChanges ( ) const
inline

Definition at line 1147 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE bool GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::isInvalid ( ) const
inline

Validity checks

Definition at line 1086 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE bool GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::isValid ( ) const
inline

Validity checks

Definition at line 1085 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::operator= ( GA_Attribute attrib)
inline

Definition at line 1048 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( GA_Offset  off,
const HOLDER &  str 
)
inline

Store the str at the given offset.

Definition at line 1107 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( const GA_Range range,
const HOLDER &  str 
)
inline

Definition at line 1111 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( GA_Offset  off,
int  comp,
const HOLDER &  str 
)
inline

Definition at line 1115 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( const GA_Range range,
int  comp,
const HOLDER &  str 
)
inline

Definition at line 1122 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( GA_Offset  off,
INDEXTYPE  idx 
)
inline

Store the string indexed by the idx at the given offset.

Definition at line 1127 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( const GA_Range range,
INDEXTYPE  idx 
)
inline

Definition at line 1131 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( GA_Offset  off,
int  comp,
INDEXTYPE  idx 
)
inline

Definition at line 1135 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
SYS_FORCE_INLINE void GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::set ( const GA_Range range,
int  comp,
INDEXTYPE  idx 
)
inline

Definition at line 1142 of file GA_Handle.h.

Member Data Documentation

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
ATI* GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::myAttrib
protected

Definition at line 1152 of file GA_Handle.h.

template<typename HOLDER , typename INDEXTYPE , typename ATI , typename DELAYEDWRITER >
DELAYEDWRITER GA_RWBatchHandleTHolder< HOLDER, INDEXTYPE, ATI, DELAYEDWRITER >::myWriter
protected

Definition at line 1153 of file GA_Handle.h.


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