CFx SDK Documentation  2022 SP0
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_
#define DYNBLOCKS_EXPORT
Definition: DbEvalGraph.h:91
unsigned long OdDbEvalNodeId
Definition: DbEvalGraph.h:60
void init(const OdDbDynBlockReference *ref, OdDbBlockReference *dbref, OdDbEvalGraph *gr, bool bRequireEvaluate=false)
bool originalPathToRepresentationPath(const OdDbObjectIdArray &, OdDbEntityPtrArray &res) const
OdGeMatrix3d getRelativeMatrix(const OdGeMatrix3d &m)
static void tagBlockRecord(OdDbBlockTableRecord *repBTR, const OdDbHandle &originalBlockHandle)
OdDbObjectId getRepresentation() const
void createRepresentation(bool copied=true)
void addHistoryRecord(const OdString &name, const OdResBuf *value, OdDbBlockParameter *param)
OdGeVector3d getRelativeOffset(const OdGeVector3d &v)
OdDbBlockReferencePtr getReference()
void loadInstanceData(bool bRequireEvaluate=false)
void readUndo(OdDbObjectId refId, OdDbDwgFiler *pFiler)
static void clearRepBlock(OdDbBlockTableRecord *repRTR)
OdDbBlockTableRecordPtr getBlock()
void writeUndo(OdDbEvalGraph *gr)
OdDbAttributePtr getAttribute(OdDbAttributeDefinition *)
bool representationPathToOriginalPath(OdDbObjectIdArray &) const
static OdDbBlockRepresentationContext * getRepresentationContext(OdDbBlockReference *br)
OdDbEvalExprPtr getRepresentationNode(OdDbEvalNodeId id)
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
bool isErased() const
GLenum GLint ref
Definition: gles2_ext.h:262
GLuint const GLchar * name
Definition: gles2_ext.h:265
const GLfloat * v
Definition: gles2_ext.h:315
GLsizei const GLfloat * value
Definition: gles2_ext.h:302