CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
OdGiTraitsCache< traitsContainer, traitsTaker, byMask > Class Template Reference

#include <GiTraitsCache.h>

Inheritance diagram for OdGiTraitsCache< traitsContainer, traitsTaker, byMask >:

Classes

struct  CacheEntry
 

Public Types

enum  CacheType { kCacheNone = 0 , kCacheByMask = 1 , kCacheAll = 2 }
 

Public Member Functions

 OdGiTraitsCache ()
 
 OdGiTraitsCache (CacheType cacheType)
 
 ~OdGiTraitsCache ()
 
void setCacheType (CacheType cacheType)
 
CacheType cacheType () const
 
void setAttributes (OdDbStub *objId, OdGiContext &giCtx, bool forceCaching=false)
 
void setFlags (OdUInt32 uAttrib)
 
OdUInt32 getFlags () const
 
void clear ()
 

Protected Types

typedef std::map< OdDbStub *, CacheEntry_mmap
 

Protected Attributes

CacheType m_cacheType
 
_mmap m_cacheData
 
OdUInt32 m_traitsAttrib
 

Detailed Description

template<class traitsContainer, class traitsTaker, OdUInt32 byMask = 0>
class OdGiTraitsCache< traitsContainer, traitsTaker, byMask >
See also
TD_Gi

<group OdGi_Classes>

Definition at line 44 of file GiTraitsCache.h.

Member Typedef Documentation

◆ _mmap

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
typedef std::map<OdDbStub*, CacheEntry> OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::_mmap
protected

Definition at line 69 of file GiTraitsCache.h.

Member Enumeration Documentation

◆ CacheType

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
enum OdGiTraitsCache::CacheType

Represents cache types.

Enumerator
kCacheNone 

No caching will be performed.

kCacheByMask 

Cache traits by mask.

kCacheAll 

Cache all traits.

Definition at line 50 of file GiTraitsCache.h.

Constructor & Destructor Documentation

◆ OdGiTraitsCache() [1/2]

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::OdGiTraitsCache ( )
inline

Default constructor for the OdGiTraitsCache class. Initializes parent object properties with default values, specifies that no caching will be performed and sets traits attributes to 0.

Definition at line 77 of file GiTraitsCache.h.

◆ OdGiTraitsCache() [2/2]

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::OdGiTraitsCache ( CacheType  cacheType)
inlineexplicit

Constructor for the OdGiTraitsCache class. Initializes parent object properties with default values, sets the passed traits type and sets traits attributes to 0.

Definition at line 87 of file GiTraitsCache.h.

◆ ~OdGiTraitsCache()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::~OdGiTraitsCache ( )
inline

Destructor for the OdGiTraitsCache class.

Definition at line 96 of file GiTraitsCache.h.

Member Function Documentation

◆ cacheType()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
CacheType OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::cacheType ( ) const
inline

Retrieves cache type that is used for caching traits.

Definition at line 113 of file GiTraitsCache.h.

◆ clear()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
void OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::clear ( )
inline

Clears the cached data.

Definition at line 172 of file GiTraitsCache.h.

◆ getFlags()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
OdUInt32 OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::getFlags ( ) const
inline

Retrieves a set of flags that represents attributes to cache.

Definition at line 164 of file GiTraitsCache.h.

◆ setAttributes()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
void OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::setAttributes ( OdDbStub *  objId,
OdGiContext giCtx,
bool  forceCaching = false 
)
inline

Sets attributes for caching.

Parameters
objId[in] Pointer to the identifier of the drawable, traits of which to cache.
giCtx[in] Drawable context.
forceCaching[in] Flag that specifies whether to force traits caching.

Definition at line 124 of file GiTraitsCache.h.

◆ setCacheType()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
void OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::setCacheType ( CacheType  cacheType)
inline

Sets the cache type for caching. This method allows you to specify whether all traits are cached or specific traits are cached by mask or traits are not cached at all.

Parameters
cacheType[in] Cache type.

Definition at line 105 of file GiTraitsCache.h.

◆ setFlags()

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
void OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::setFlags ( OdUInt32  uAttrib)
inline

Sets a set of flags that represents attributes to cache.

Parameters
uAttrib[in] Attributes to cache.

Definition at line 156 of file GiTraitsCache.h.

Member Data Documentation

◆ m_cacheData

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
_mmap OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::m_cacheData
protected

Definition at line 70 of file GiTraitsCache.h.

◆ m_cacheType

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
CacheType OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::m_cacheType
protected

Definition at line 68 of file GiTraitsCache.h.

◆ m_traitsAttrib

template<class traitsContainer , class traitsTaker , OdUInt32 byMask = 0>
OdUInt32 OdGiTraitsCache< traitsContainer, traitsTaker, byMask >::m_traitsAttrib
protected

Definition at line 71 of file GiTraitsCache.h.


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