CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbBlockRepresentation.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
38class OdDbAttribute;
39
46{
47 OdDbObjectId m_pDynamicBlock;
48 OdDbObjectId m_pAnonymousBlock;
49 OdDbObjectId m_pBlockData;
50 OdDbObjectId m_pRef;
51 OdDbObjectId m_pGraph;
52 OdDbBlockReference* m_pNDBROBlockRef;
53 OdDbEvalGraphPtr m_NDBRO_Graph;
54 bool m_bBlockUpdateMode;
55 void eraseOldArrayClones();
56 void updateAttributeMap();
57 bool m_bNDBROAttributes;
58 std::map<OdDbAttributeDefinition*, void*> m_pAttributeMap;
59 void updateCachedData(OdDbBlockReference* ref);
60 void updateBPT();
61public:
64 void init(const OdDbDynBlockReference* ref, OdDbBlockReference* dbref, OdDbEvalGraph* gr, bool bRequireEvaluate = false, bool loadIndstanceData = true);
65 void loadInstanceData(bool bRequireEvaluate = false, bool noHistoryData = true);
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);
76 //
78 // update parameter value from the history record
81 OdDbObjectId getRepresentation() const { return m_pAnonymousBlock.isErased() ? OdDbObjectId::kNull : m_pAnonymousBlock; }
82 OdDbObjectId getOriginal() const { return m_pDynamicBlock; }
86 {
87 return m_NDBRO_Graph;
88 }
91 void readUndo(OdDbObjectId refId, OdDbDwgFiler* pFiler);
96 OdDbObjectId getBlockData() const { return m_pBlockData; }
97 void setBlockUpdateMode(bool b) { m_bBlockUpdateMode = b; }
98 bool blockUpdateMode() const { return m_bBlockUpdateMode; }
100};
101
102#include "TD_PackPop.h"
103
104#endif // _DbBlockRepresentation_h_Included_
#define DYNBLOCKS_EXPORT
Definition: DbEvalGraph.h:91
unsigned long OdDbEvalNodeId
Definition: DbEvalGraph.h:60
bool originalPathToRepresentationPath(const OdDbObjectIdArray &, OdDbEntityPtrArray &res) const
OdGeMatrix3d getRelativeMatrix(const OdGeMatrix3d &m)
OdDbXrecordPtr getHistoryRecord() const
static void tagBlockRecord(OdDbBlockTableRecord *repBTR, const OdDbHandle &originalBlockHandle)
OdDbObjectId getRepresentation() const
void createRepresentation(bool copied=true)
static OdDbBlockRepresentationContext * getRepresentationContext(OdDbBlockReference *br, bool validate=true)
bool applyHistory(OdResBufPtr pRb)
OdGeVector3d getRelativeOffset(const OdGeVector3d &v)
OdDbBlockReferencePtr getReference()
OdDbObjectId getBlockHData() const
void addHistoryRecord(const OdString &name, const OdResBuf *value, OdDbEvalNodeId node)
void readUndo(OdDbObjectId refId, OdDbDwgFiler *pFiler)
static void clearRepBlock(OdDbBlockTableRecord *repRTR)
OdDbBlockTableRecordPtr getBlock()
void writeUndo(OdDbEvalGraph *gr)
void init(const OdDbDynBlockReference *ref, OdDbBlockReference *dbref, OdDbEvalGraph *gr, bool bRequireEvaluate=false, bool loadIndstanceData=true)
void loadInstanceData(bool bRequireEvaluate=false, bool noHistoryData=true)
OdDbAttributePtr getAttribute(OdDbAttributeDefinition *)
bool representationPathToOriginalPath(OdDbObjectIdArray &) const
OdDbEvalExprPtr getRepresentationNode(OdDbEvalNodeId id)
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:110
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