CFx SDK Documentation  2020SP3
DbBlockRepresentation.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _DbBlockRepresentation_h_Included_
25 #define _DbBlockRepresentation_h_Included_
26 
27 #include "TD_PackPush.h"
28 
29 #include "RxObjectImpl.h"
30 #include "DbBlockReference.h"
31 #include "DbEvalGraph.h"
32 #define STL_USING_MAP
33 #include "OdaSTL.h"
34 
35 class OdDbBlockParameter;
38 class OdDbAttribute;
39 
48 {
49  OdDbObjectId m_pDynamicBlock;
50  OdDbObjectId m_pAnonymousBlock;
51  OdDbObjectId m_pBlockData;
52  OdDbObjectId m_pRef;
53  OdDbObjectId m_pGraph;
54  OdDbBlockReference* m_pNDBROBlockRef;
55  OdDbEvalGraphPtr m_NDBRO_Graph;
56  void eraseOldArrayClones();
57  void updateAttributeMap();
58  bool m_bNDBROAttributes;
59  std::map<OdDbAttributeDefinition*, void*> m_pAttributeMap;
60  void updateCachedData(OdDbBlockReference* ref);
61 public:
64  void init(const OdDbDynBlockReference* ref, OdDbBlockReference* dbref, OdDbEvalGraph* gr, bool bRequireEvaluate = false);
65  void loadInstanceData(bool bRequireEvaluate = false);
69  // set RepBTag on representation block
70  static void tagBlockRecord(OdDbBlockTableRecord* repBTR, const OdDbHandle& originalBlockHandle);
71  // remove dynamic block related xdata && xdictionary entries
72  static void clearRepBlock(OdDbBlockTableRecord* repRTR);
73  // create representation block for the insert
74  void createRepresentation(bool copied = true);
77  OdDbObjectId getRepresentation() const { return m_pAnonymousBlock.isErased() ? OdDbObjectId::kNull : m_pAnonymousBlock; }
78  OdDbObjectId getOriginal() const { return m_pDynamicBlock; }
82  {
83  return m_NDBRO_Graph;
84  }
87  void readUndo(OdDbObjectId refId, OdDbDwgFiler* pFiler);
92  OdDbObjectId getBlockData() const { return m_pBlockData; }
93 };
94 
95 #include "TD_PackPop.h"
96 
97 #endif // _DbBlockRepresentation_h_Included_
OdGeVector3d
Definition: GeVector3d.h:54
OdString
Definition: OdString.h:95
OdDbBlockReference
Definition: DbBlockReference.h:57
OdDbBlockRepresentationContext
Definition: DbBlockRepresentation.h:48
OdDbBlockRepresentationContext::updateRepresentation
void updateRepresentation()
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdDbBlockRepresentationContext::representationPathToOriginalPath
bool representationPathToOriginalPath(OdDbObjectIdArray &) const
OdDbBlockRepresentationContext::getRepresentationNode
OdDbEvalExprPtr getRepresentationNode(OdDbEvalNodeId id)
OdResBuf
Definition: ResBuf.h:112
DYNBLOCKS_EXPORT
#define DYNBLOCKS_EXPORT
Definition: DbEvalGraph.h:91
OdRxObject
Definition: RxObject.h:564
OdDbObjectId
Definition: DbObjectId.h:99
OdaSTL.h
OdDbBlockRepresentationContext::OdDbBlockRepresentationContext
OdDbBlockRepresentationContext()
OdArray< OdDbObjectId, OdMemoryAllocator< OdDbObjectId > >
TD_PackPop.h
OdDbBlockRepresentationContext::getGraph
OdDbEvalGraphPtr getGraph()
Definition: DbBlockRepresentation.h:81
OdDbBlockRepresentationContext::clearRepBlock
static void clearRepBlock(OdDbBlockTableRecord *repRTR)
OdDbBlockRepresentationContext::getBlockData
OdDbObjectId getBlockData() const
Definition: DbBlockRepresentation.h:92
OdDbAttribute
Definition: DbAttribute.h:45
DbBlockReference.h
OdGeMatrix3d
Definition: GeMatrix3d.h:73
ref
GLenum GLint ref
Definition: gles2_ext.h:262
OdDbBlockRepresentationContext::getRepresentationContext
static OdDbBlockRepresentationContext * getRepresentationContext(OdDbBlockReference *br)
OdDbBlockRepresentationContext::loadInstanceData
void loadInstanceData(bool bRequireEvaluate=false)
OdDbBlockRepresentationContext::~OdDbBlockRepresentationContext
~OdDbBlockRepresentationContext()
OdDbBlockRepresentationContext::init
void init(const OdDbDynBlockReference *ref, OdDbBlockReference *dbref, OdDbEvalGraph *gr, bool bRequireEvaluate=false)
OdDbEvalNodeId
unsigned long OdDbEvalNodeId
Definition: DbEvalGraph.h:60
OdDbDynBlockReference
Definition: DbDynBlockReference.h:183
OdDbBlockRepresentationContext::getRepresentation
OdDbObjectId getRepresentation() const
Definition: DbBlockRepresentation.h:77
OdDbBlockRepresentationContext::tagBlockRecord
static void tagBlockRecord(OdDbBlockTableRecord *repBTR, const OdDbHandle &originalBlockHandle)
OdDbBlockRepresentationContext::getRelativeMatrix
OdGeMatrix3d getRelativeMatrix(const OdGeMatrix3d &m)
OdSmartPtr< OdDbEvalGraph >
OdDbBlockRepresentationContext::getRelativeOffset
OdGeVector3d getRelativeOffset(const OdGeVector3d &v)
OdDbBlockRepresentationContext::getAttribute
OdDbAttributePtr getAttribute(OdDbAttributeDefinition *)
OdDbBlockRepresentationContext::getReference
OdDbBlockReferencePtr getReference()
OdDbBlockRepresentationContext::writeUndo
void writeUndo(OdDbEvalGraph *gr)
OdDbBlockRepresentationContext::readUndo
void readUndo(OdDbObjectId refId, OdDbDwgFiler *pFiler)
OdDbEvalGraph
Definition: DbEvalGraph.h:122
OdDbObjectId::kNull
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
v
const GLfloat * v
Definition: gles2_ext.h:315
TD_PackPush.h
OdDbBlockTableRecord
Definition: DbBlockTableRecord.h:57
OdDbHandle
Definition: DbHandle.h:67
OdDbBlockRepresentationContext::originalPathToRepresentationPath
bool originalPathToRepresentationPath(const OdDbObjectIdArray &, OdDbEntityPtrArray &res) const
OdDbBlockRepresentationContext::getOriginal
OdDbObjectId getOriginal() const
Definition: DbBlockRepresentation.h:78
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdDbAttributeDefinition
Definition: DbAttributeDefinition.h:44
OdDbBlockRepresentationContext::compactRepresentation
void compactRepresentation()
OdDbBlockRepresentationContext::getBlock
OdDbBlockTableRecordPtr getBlock()
OdDbBlockRepresentationContext::addHistoryRecord
void addHistoryRecord(const OdString &name, const OdResBuf *value, OdDbBlockParameter *param)
RxObjectImpl.h
OdDbBlockRepresentationContext::createRepresentation
void createRepresentation(bool copied=true)
DbEvalGraph.h
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbObjectId::isErased
bool isErased() const
OdDbBlockParameter
Definition: DbBlockParameter.h:66