CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdGsOverlayDataContainer< OverlayDataType > Class Template Reference

#include <GsOverlayDefs.h>

Classes

struct  Allocator
 
struct  ForEach
 
class  Iterator
 
struct  OverlayData
 

Public Member Functions

 OdGsOverlayDataContainer ()
 
 ~OdGsOverlayDataContainer ()
 
void substituteAllocator (Allocator *pAllocator)
 
void resetAllocator ()
 
bool activateOverlay (OdGsOverlayId id)
 
bool deactivateOverlay (OdGsOverlayId id)
 
OdUInt32 overlayNumRefs (OdGsOverlayId id) const
 
OdUInt32 activeOverlays () const
 
bool isOverlayActive (OdGsOverlayId id) const
 
bool isMultipleOverlays () const
 
OverlayDataType * getOverlayData (OdGsOverlayId id, bool bActivate=false)
 
const OverlayDataType * getOverlayData (OdGsOverlayId id, bool bActivate=false) const
 
bool execForEach (ForEach &impl, OdUInt32 nMask=kGsAllOverlays) const
 
Iterator newIterator (OdUInt32 nMask=kGsAllOverlays) const
 
OdUInt32 invalidOverlays () const
 
bool isOverlayInvalid (OdGsOverlayId id) const
 
void setOverlayInvalid (OdGsOverlayId id, bool bSet=true)
 
void setOverlaysInvalid (bool bSet=true)
 
void setOverlaysInvalid (OdUInt32 nOverlays, bool bSet=true)
 
bool isAnyOverlayInvalid () const
 
bool isAllOverlaysIvalid () const
 

Protected Types

typedef OdArray< OverlayDataOverlayDataArray
 

Protected Member Functions

void subAllocator (Allocator *pAllocator)
 
void activate (OdGsOverlayId id) const
 
void deactivate (OdGsOverlayId id)
 

Protected Attributes

OverlayDataArray m_overlaysData
 
Allocator m_defAllocator
 
Allocatorm_pAllocator
 
OdUInt32 m_uActiveOverlays
 
OdUInt32 m_uInvalidOverlays
 

Detailed Description

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
class OdGsOverlayDataContainer< OverlayDataType >

This class is a container for overlay data.

<group OdGs_Classes>

Definition at line 225 of file GsOverlayDefs.h.

Member Typedef Documentation

◆ OverlayDataArray

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
typedef OdArray<OverlayData> OdGsOverlayDataContainer< OverlayDataType >::OverlayDataArray
protected

Definition at line 252 of file GsOverlayDefs.h.

Constructor & Destructor Documentation

◆ OdGsOverlayDataContainer()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdGsOverlayDataContainer< OverlayDataType >::OdGsOverlayDataContainer ( )
inline

Default constructor for the OdGsOverlayDataContainer class. Sets the allocator and activates main overlay.

Definition at line 312 of file GsOverlayDefs.h.

◆ ~OdGsOverlayDataContainer()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdGsOverlayDataContainer< OverlayDataType >::~OdGsOverlayDataContainer ( )
inline

Destructor for the OdGsOverlayDataContainer class. Frees resources allocated for overlays.

Definition at line 324 of file GsOverlayDefs.h.

Member Function Documentation

◆ activate()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::activate ( OdGsOverlayId id) const
inlineprotected

Definition at line 278 of file GsOverlayDefs.h.

◆ activateOverlay()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::activateOverlay ( OdGsOverlayId id)
inline

Activates the passed overlay.

Parameters
id[in] Overlay index.
Returns
true if the passed overlay was not active before but now is, false otherwise.

Definition at line 360 of file GsOverlayDefs.h.

◆ activeOverlays()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdUInt32 OdGsOverlayDataContainer< OverlayDataType >::activeOverlays ( ) const
inline

Returns a number of active overlays.

Definition at line 401 of file GsOverlayDefs.h.

◆ deactivate()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::deactivate ( OdGsOverlayId id)
inlineprotected

Definition at line 288 of file GsOverlayDefs.h.

◆ deactivateOverlay()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::deactivateOverlay ( OdGsOverlayId id)
inline

Deactivates the passed overlay and removes overlay data from the allocator.

Parameters
id[in] Overlay index.
Returns
true if the passed overlay was active before but now is not, false otherwise.

Definition at line 374 of file GsOverlayDefs.h.

◆ execForEach()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::execForEach ( ForEach & impl,
OdUInt32 nMask = kGsAllOverlays ) const
inline

Definition at line 459 of file GsOverlayDefs.h.

◆ getOverlayData() [1/2]

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OverlayDataType * OdGsOverlayDataContainer< OverlayDataType >::getOverlayData ( OdGsOverlayId id,
bool bActivate = false )
inline

Retrieves a pointer to the overlay data.

Parameters
id[in] Overlay index.
bActivate[in] Flag that specifies whether to activate overlay if it is not currently active.

Definition at line 425 of file GsOverlayDefs.h.

◆ getOverlayData() [2/2]

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
const OverlayDataType * OdGsOverlayDataContainer< OverlayDataType >::getOverlayData ( OdGsOverlayId id,
bool bActivate = false ) const
inline

Retrieves a pointer to the overlay data.

Parameters
id[in] Overlay index.
bActivate[in] Flag that specifies whether to activate overlay if it is not currently active.

Definition at line 443 of file GsOverlayDefs.h.

◆ invalidOverlays()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdUInt32 OdGsOverlayDataContainer< OverlayDataType >::invalidOverlays ( ) const
inline

Returns a number that represents set of invalid overlays.

Definition at line 549 of file GsOverlayDefs.h.

◆ isAllOverlaysIvalid()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::isAllOverlaysIvalid ( ) const
inline

Checks whether all overlay are invalid.

Returns
true if overlays are invalid, false otherwise.

Definition at line 595 of file GsOverlayDefs.h.

◆ isAnyOverlayInvalid()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::isAnyOverlayInvalid ( ) const
inline

Checks whether there is any invalid overlay.

Returns
true if there is an invalid overlay, false otherwise.

Definition at line 587 of file GsOverlayDefs.h.

◆ isMultipleOverlays()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::isMultipleOverlays ( ) const
inline

Checks whether multiple overlays are used.

Returns
true if multiple overlays are used, false otherwise.

Definition at line 417 of file GsOverlayDefs.h.

◆ isOverlayActive()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::isOverlayActive ( OdGsOverlayId id) const
inline

Checks whether the passed overlay is active.

Parameters
id[in] Overlay index.
Returns
true if passed overlay is active, false otherwise.

Definition at line 410 of file GsOverlayDefs.h.

◆ isOverlayInvalid()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
bool OdGsOverlayDataContainer< OverlayDataType >::isOverlayInvalid ( OdGsOverlayId id) const
inline

Checks whether overlay by the specified index is invalid.

Parameters
id[in] Overlay index.

Definition at line 556 of file GsOverlayDefs.h.

◆ newIterator()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
Iterator OdGsOverlayDataContainer< OverlayDataType >::newIterator ( OdUInt32 nMask = kGsAllOverlays) const
inline

Creates and returns new overlay iterator.

Parameters
nMask[in] Overlay mask.

Definition at line 541 of file GsOverlayDefs.h.

◆ overlayNumRefs()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdUInt32 OdGsOverlayDataContainer< OverlayDataType >::overlayNumRefs ( OdGsOverlayId id) const
inline

Retrives the overlay number of references.

Parameters
id[in] Overlay index.
Returns
number of specified overlay references.

Definition at line 388 of file GsOverlayDefs.h.

◆ resetAllocator()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::resetAllocator ( )
inline

Replaces current allocator with standard allocator. Current overlay data is not destroyed.

Definition at line 348 of file GsOverlayDefs.h.

◆ setOverlayInvalid()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::setOverlayInvalid ( OdGsOverlayId id,
bool bSet = true )
inline

Sets overlay by the specified index as invalid or valid.

Parameters
id[in] Overlay index.
bSet[in] Flag that specifies whether overlay should be invalid.

Definition at line 564 of file GsOverlayDefs.h.

◆ setOverlaysInvalid() [1/2]

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::setOverlaysInvalid ( bool bSet = true)
inline

Specifies whether currently active overlays should be invalid.

Parameters
bSet[in] Flag that specifies whether overlays should be invalid.

Definition at line 571 of file GsOverlayDefs.h.

◆ setOverlaysInvalid() [2/2]

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::setOverlaysInvalid ( OdUInt32 nOverlays,
bool bSet = true )
inline

Specifies whether currently active overlays should be invalid.

Parameters
nOverlays[in] Mask for active overlays.
bSet[in] Flag that specifies whether overlays should be invalid.

Definition at line 579 of file GsOverlayDefs.h.

◆ subAllocator()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::subAllocator ( Allocator * pAllocator)
inlineprotected

Definition at line 259 of file GsOverlayDefs.h.

◆ substituteAllocator()

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
void OdGsOverlayDataContainer< OverlayDataType >::substituteAllocator ( Allocator * pAllocator)
inline

Replaces current allocator with the passed allocator. Current overlay data is not destroyed.

Parameters
pAllocator[in] Pointer to a new allocator to set.

Definition at line 340 of file GsOverlayDefs.h.

Member Data Documentation

◆ m_defAllocator

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
Allocator OdGsOverlayDataContainer< OverlayDataType >::m_defAllocator
protected

Definition at line 254 of file GsOverlayDefs.h.

◆ m_overlaysData

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OverlayDataArray OdGsOverlayDataContainer< OverlayDataType >::m_overlaysData
mutableprotected

Definition at line 253 of file GsOverlayDefs.h.

◆ m_pAllocator

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
Allocator* OdGsOverlayDataContainer< OverlayDataType >::m_pAllocator
protected

Definition at line 255 of file GsOverlayDefs.h.

◆ m_uActiveOverlays

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdUInt32 OdGsOverlayDataContainer< OverlayDataType >::m_uActiveOverlays
mutableprotected

Definition at line 256 of file GsOverlayDefs.h.

◆ m_uInvalidOverlays

template<typename OverlayDataType = OdGsOverlayDataPlaceholder>
OdUInt32 OdGsOverlayDataContainer< OverlayDataType >::m_uInvalidOverlays
protected

Definition at line 257 of file GsOverlayDefs.h.


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