24 #ifndef __OD_GS_BLOCK_NODE__
25 #define __OD_GS_BLOCK_NODE__
38 class OdGsSharedRefDefinition;
39 class OdGsReferenceImpl;
51 m_layoutBlockId(layoutBlockId),
53 , m_lineTypeId(tr.lineType())
54 , m_cmColor(tr.trueColor().color())
55 , m_lineWeight(tr.lineWeight())
56 , m_lineTypeScale(tr.lineTypeScale())
58 , m_plotStyleNameId(bUsePlotStyles ? tr.plotStyleNameId() :
NULL)
59 , m_materialId(tr.material()), m_cmTransparency(tr.transparency().serializeOut())
110 if(lessOrEqual(
v, bEqual) && !bEqual)
112 return bEqual ? m_annoScales <
v.m_annoScales :
false;
129 kLastFlag = kUnloaded
142 bool bSetGsNode):
OdGsNode(pModel, pUnderlyingDrawable), m_bModelTfDependent(0)
145 setToDrawable(pUnderlyingDrawable);
153 SETBIT(m_flags, kSyncDrawable,
false);
158 void setUnloaded(
bool isUnloaded);
159 bool isUnloaded()
const;
160 void setModelTfDependent(
bool bOn);
172 m_inserts.insert(pEntity);
176 m_inserts.insert(pEntity);
183 m_inserts.erase(pEntity);
184 if(!isUnloaded() || !m_inserts.empty())
188 SETBIT(m_flags, kSyncDrawable,
false);
189 baseModel()->detach(
this);
238 m_sharedImp.destroy();
247 OdGsSharedRefDefinition* pRes = m_sharedImp.findAt(d);
248 return pRes ? pRes : createDef(d);
250 OdGsSharedRefDefinition* pRes = m_sharedImp.findAt(d);
251 return pRes ? pRes : createDef(d);
265 m_sharedImp.removeDef(pDef);
269 m_sharedImp.removeDef(pDef);
277 return m_sharedImp.findDef(pDef, d);
279 return m_sharedImp.findDef(pDef, d);
298 _map::iterator it = m_map.find(d);
299 return (it == m_map.end() ?
NULL : it->second);
302 OdGsReferenceImpl* pImp);
309 #ifndef ODGS_LOCAL_IDS
318 std::less<OdGsBlockRefNodeDesc> >
_map;
323 typedef std::set<OdGsBlockReferenceNode*>
Inserts;
346 #ifndef TD_SINGLE_THREAD
370 #ifndef TD_SINGLE_THREAD
#define GS_TOOLKIT_EXPORT
bool isModelTfDependent(OdUInt32 flags)
bool operator<(const OdString &s1, const OdString &s2)
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
FIRSTDLL_EXPORT ThreadsCounter & odThreadsCounter()
#define TD_AUTOLOCK_P_DEF(Mutex)
#define TD_AUTOLOCK_P(Mutex)
bool layersChanged(OdGsViewImpl &view, OdGsBaseModel *pModel)
void removeDef(OdGsSharedRefDefinition *pDef)
void invalidateRegenDraw(OdUInt32 vpID, const OdDbStub *layoutId)
void propagateLayerChangesStock()
OdGsSharedRefDefinition * insertAt(const OdGsBlockRefNodeDesc &d, OdGsReferenceImpl *pImp)
bool findDef(OdGsSharedRefDefinition *pDef, OdGsBlockRefNodeDesc &d)
void invalidateAwareFlags(OdGsViewImpl *pView, OdUInt32 nViewChanges, const OdDbStub *layoutId)
std::map< OdGsBlockRefNodeDesc, OdGsSharedRefDefinition *, std::less< OdGsBlockRefNodeDesc > > _map
OdGsSharedRefDefinition * findAt(const OdGsBlockRefNodeDesc &d)
void invalidateSectionable()
void invalidateSubents(OdUInt32 vpID, OdUInt32 nViewChanges)
Inserts::iterator InsertIterator
bool extents(OdGeExtents3d &) const
virtual void propagateLayerChanges(OdGsViewImpl &)
ODRX_DECLARE_MEMBERS(OdGsBlockNode)
void update(OdGsUpdateContext &, OdGsContainerNode *, OdSiSpatialIndex *)
bool findDef(OdGsSharedRefDefinition *pDef, OdGsBlockRefNodeDesc &d)
bool saveNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
void removeDef(OdGsSharedRefDefinition *pDef)
void invalidateSharedAwareFlags(OdGsViewImpl *pView, OdUInt32 nViewChanges, const OdDbStub *layoutId)
void invalidateSharedRegenDraw(OdUInt32 vpID, const OdDbStub *layoutId)
void setModelTfDependent(bool bOn)
void invalidate(OdGsContainerNode *pParent, OdGsViewImpl *view, OdUInt32 mask)
std::set< OdGsBlockReferenceNode * > Inserts
OdGsBlockNode(OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable, bool bSetGsNode)
void invalidateSharedSectionable()
void display(OdGsDisplayContext &)
bool loadNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
void release(OdGsBlockReferenceNode *pEntity)
volatile int m_bModelTfDependent
OdGsSharedRefDefinition * findCreateDef(const OdGsBlockRefNodeDesc &d)
void setUnloaded(bool isUnloaded)
void addRef(OdGsBlockReferenceNode *pEntity)
virtual ENodeType nodeType() const
void invalidateSharedSubents(OdUInt32 vpID, OdUInt32 nViewChanges)
OdGsSharedRefDefinition * createDef(const OdGsBlockRefNodeDesc &d)
bool isModelTfDependent() const
bool postprocessNodeLoading(OdGsFiler *pFiler)
OdGsBlockRefNodeDesc(const OdGsBlockRefNodeDesc &c)
OdGiAnnoScaleSet m_annoScales
OdGsBlockRefNodeDesc(const OdDbStub *layoutBlockId, const OdGiSubEntityTraitsData &tr, const OdGeScale3d &scale, bool bUsePlotStyles, const OdGiAnnoScaleSet &annoScales)
OdGsBlockRefNodeDescMem(const OdGsBlockRefNodeDescMem &c)
OdUInt32 m_cmTransparency
bool lessOrEqual(const OdGsBlockRefNodeDescMem &v, bool &bEqual) const
OdGsBlockRefNodeDescMem(const OdDbStub *layoutBlockId, const OdGiSubEntityTraitsData &tr, const OdGeScale3d &scale, bool bUsePlotStyles)
OdGsBlockRefNodeDescMem()
OdDb::LineWeight m_lineWeight
OdDbStub * m_plotStyleNameId
const OdDbStub * m_layoutBlockId
OdDb::PlotStyleNameType m_plotStyleNameType
@ kPlotStyleNameIsDictDefault