CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef __GSOVERLAYDEFS_H_INCLUDED_
25 #define __GSOVERLAYDEFS_H_INCLUDED_
198 template <
typename OverlayDataType = OdGsOverlayDataPlaceholder>
204 virtual OverlayDataType *
createData() {
return new OverlayDataType(); }
205 virtual void deleteData(OverlayDataType *pObj) {
delete pObj; }
227 for (
OdUInt32 nOverlay = 0; nOverlay < nOverlays; nOverlay++)
229 if (pOverlays[nOverlay].m_data)
231 OverlayDataType *pNewData = pAllocator->createData();
232 *pNewData = *pOverlays[nOverlay].
m_data;
234 pOverlays[nOverlay].m_data = pNewData;
245 if (!overlay.m_numOverlayRefs)
247 overlay.m_numOverlayRefs++;
255 if (overlay.m_numOverlayRefs)
258 if (!overlay.m_numOverlayRefs)
261 overlay.m_data =
NULL;
281 for (
OdUInt32 nOverlay = 0; nOverlay < nOverlays; nOverlay++)
283 if (pOverlays[nOverlay].m_data)
346 if (
GETBIT(bitSet, 1 << nOlay))
406 #endif // __GSOVERLAYDEFS_H_INCLUDED_
#define GETBIT(flags, bit)
OverlayDataArray & overlaysData
static OdGsOverlayId overlayRenderingOrderToIndex(OdUInt32 renderOrder)
OdArray< OverlayData > OverlayDataArray
OverlayDataType * overlayData()
bool deactivateOverlay(OdGsOverlayId id)
static bool validateOverlayIndex(OdGsOverlayId id)
#define SETBIT_1(flags, bit)
~OdGsOverlayDataContainer()
static bool validateRenderingOrder(OdUInt32 renderOrder)
const OverlayDataType * overlayData() const
OdUInt32 invalidOverlays() const
#define SETBIT(flags, bit, value)
static OdUInt32 overlayFlags(OdGsOverlayId id)
void setOverlaysInvalid(bool bSet=true)
bool execForEach(ForEach &impl, OdUInt32 nMask=kGsAllOverlays) const
OdUInt32 m_numOverlayRefs
void activate(OdGsOverlayId id) const
OdGsOverlayDataPlaceholder()
const OverlayDataType * getOverlayData(OdGsOverlayId id, bool bActivate=false) const
void deactivate(OdGsOverlayId id)
Iterator(OverlayDataArray &_overlaysData, OdUInt32 _bitSet)
OdUInt32 m_uActiveOverlays
const T * asArrayPtr() const
#define SETBIT_0(flags, bit)
virtual void deleteData(OverlayDataType *pObj)
bool isOverlayActive(OdGsOverlayId id) const
@ kGsDirectTopmostOverlay
OdGsOverlayDataContainer()
void resize(size_type logicalLength, const T &value)
@ kGsHighlightSelectionOverlay
bool isOverlayInvalid(OdGsOverlayId id) const
T & at(size_type arrayIndex)
bool isMultipleOverlays() const
Iterator newIterator(OdUInt32 nMask=kGsAllOverlays) const
bool activateOverlay(OdGsOverlayId id)
void setOverlaysInvalid(OdUInt32 nOverlays, bool bSet=true)
void subAllocator(Allocator *pAllocator)
OdUInt32 activeOverlays() const
bool isAllOverlaysIvalid() const
void setOverlayInvalid(OdGsOverlayId id, bool bSet=true)
virtual bool call(OdGsOverlayId overlayId, OverlayDataType *pData)=0
OverlayDataType * getOverlayData(OdGsOverlayId id, bool bActivate=false)
static OdUInt32 overlayIndexToRenderingOrder(OdGsOverlayId id)
OverlayDataArray m_overlaysData
OdUInt32 m_uInvalidOverlays
~OdGsOverlayDataPlaceholder()
OdGsOverlayId overlayId() const
void substituteAllocator(Allocator *pAllocator)
static bool validateDefinitions(OdUInt32 gsModelDef)
virtual OverlayDataType * createData()
bool isAnyOverlayInvalid() const