24#ifndef __GSOVERLAYDEFS_H_INCLUDED_
25#define __GSOVERLAYDEFS_H_INCLUDED_
208template <
typename OverlayDataType = OdGsOverlayDataPlaceholder>
220 virtual OverlayDataType *
createData() {
return new OverlayDataType(); }
225 virtual void deleteData(OverlayDataType *pObj) {
delete pObj; }
243 if ((pAllocator !=
m_pAllocator) && (pAllocator != NULL))
247 for (
OdUInt32 nOverlay = 0; nOverlay < nOverlays; nOverlay++)
249 if (pOverlays[nOverlay].m_data)
251 OverlayDataType *pNewData = pAllocator->
createData();
252 *pNewData = *pOverlays[nOverlay].
m_data;
254 pOverlays[nOverlay].
m_data = pNewData;
308 for (
OdUInt32 nOverlay = 0; nOverlay < nOverlays; nOverlay++)
310 if (pOverlays[nOverlay].m_data)
444 if (
GETBIT(bitSet, 1 << nOlay))
@ kGsDirectTopmostOverlay
@ kGsHighlightSelectionOverlay
#define SETBIT(flags, bit, value)
#define SETBIT_0(flags, bit)
#define GETBIT(flags, bit)
#define SETBIT_1(flags, bit)
const T * asArrayPtr() const
T & at(size_type arrayIndex)
void resize(size_type logicalLength, const T &value)
const OverlayDataType * overlayData() const
Iterator(OverlayDataArray &_overlaysData, OdUInt32 _bitSet)
OverlayDataType * overlayData()
OdGsOverlayId overlayId() const
OverlayDataArray & overlaysData
OdGsOverlayDataContainer()
bool deactivateOverlay(OdGsOverlayId id)
bool isMultipleOverlays() const
bool isOverlayActive(OdGsOverlayId id) const
bool isAnyOverlayInvalid() const
OdUInt32 m_uActiveOverlays
OverlayDataArray m_overlaysData
bool isAllOverlaysIvalid() const
void setOverlaysInvalid(OdUInt32 nOverlays, bool bSet=true)
void substituteAllocator(Allocator *pAllocator)
OverlayDataType * getOverlayData(OdGsOverlayId id, bool bActivate=false)
~OdGsOverlayDataContainer()
OdUInt32 m_uInvalidOverlays
void setOverlaysInvalid(bool bSet=true)
bool activateOverlay(OdGsOverlayId id)
void subAllocator(Allocator *pAllocator)
void activate(OdGsOverlayId id) const
OdArray< OverlayData > OverlayDataArray
OdUInt32 activeOverlays() const
void setOverlayInvalid(OdGsOverlayId id, bool bSet=true)
OdUInt32 invalidOverlays() const
void deactivate(OdGsOverlayId id)
Iterator newIterator(OdUInt32 nMask=kGsAllOverlays) const
bool execForEach(ForEach &impl, OdUInt32 nMask=kGsAllOverlays) const
const OverlayDataType * getOverlayData(OdGsOverlayId id, bool bActivate=false) const
bool isOverlayInvalid(OdGsOverlayId id) const
OdUInt32 overlayNumRefs(OdGsOverlayId id) const
OdGsOverlayDataPlaceholder()
~OdGsOverlayDataPlaceholder()
virtual OverlayDataType * createData()
virtual void deleteData(OverlayDataType *pObj)
virtual bool call(OdGsOverlayId overlayId, OverlayDataType *pData)=0
OdUInt32 m_numOverlayRefs
static OdUInt32 overlayFlags(OdGsOverlayId id)
static bool validateOverlayIndex(OdGsOverlayId id)
static bool validateDefinitions(OdUInt32 gsModelDef)
static OdUInt32 overlayIndexToRenderingOrder(OdGsOverlayId id)
static bool validateRenderingOrder(OdUInt32 renderOrder)
static OdGsOverlayId overlayRenderingOrderToIndex(OdUInt32 renderOrder)