HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_UnifiedCacheAccessor< T > Class Template Reference

Scoped accessor object for accessing unified cache items. More...

#include <UT_ThreadSafeCache.h>

Public Member Functions

 UT_UnifiedCacheAccessor (T *item=0, void *parm=0)
 
 ~UT_UnifiedCacheAccessor ()
 Release the currently accessed cache item, if any. More...
 
bool empty () const
 Returns true if no item is being accessed. More...
 
Titem () const
 Returns the current item being accessed. More...
 
Toperator-> () const
 
void reset (T *item, void *parm=0)
 

Detailed Description

template<typename T>
class UT_UnifiedCacheAccessor< T >

Scoped accessor object for accessing unified cache items.

Definition at line 409 of file UT_ThreadSafeCache.h.

Constructor & Destructor Documentation

template<typename T >
UT_UnifiedCacheAccessor< T >::UT_UnifiedCacheAccessor ( T item = 0,
void parm = 0 
)
inline

Default initializer. Can be used to initialize the accessor to a cache item right away. Otherwise call reset to set the item to access.

Definition at line 414 of file UT_ThreadSafeCache.h.

template<typename T >
UT_UnifiedCacheAccessor< T >::~UT_UnifiedCacheAccessor ( )
inline

Release the currently accessed cache item, if any.

Definition at line 420 of file UT_ThreadSafeCache.h.

Member Function Documentation

template<typename T >
bool UT_UnifiedCacheAccessor< T >::empty ( void  ) const
inline

Returns true if no item is being accessed.

Definition at line 426 of file UT_ThreadSafeCache.h.

template<typename T >
T* UT_UnifiedCacheAccessor< T >::item ( ) const
inline

Returns the current item being accessed.

Definition at line 429 of file UT_ThreadSafeCache.h.

template<typename T >
T* UT_UnifiedCacheAccessor< T >::operator-> ( void  ) const
inline

Indirection operator for the current item being accessed. It is the caller's responsibility to ensure that the item is valid, e.g. by calling empty on it first.

Definition at line 434 of file UT_ThreadSafeCache.h.

template<typename T >
void UT_UnifiedCacheAccessor< T >::reset ( T item,
void parm = 0 
)
inline

Reset the currently accessed cached item to a new item. If the item given is the same as the one currently being accessed, this call is a no-op, even if a new param value is given. Reset the item to nullptr and back to the wanted item if a change in parm value is required.

Definition at line 441 of file UT_ThreadSafeCache.h.


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