CFx SDK Documentation  2023 SP0
DbDynBlockReference.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 _DbDynBlock_h_Included_
25 #define _DbDynBlock_h_Included_
26 
27 
28 #include "DbEvalGraph.h"
29 #include "TD_PackPush.h"
30 
31 // Forward class declarations
32 
33 class OdDbBlockReference;
36 class OdDbDynBlockReferencePropertyImpl;
37 class OdDbDynBlockReferenceImpl;
39 class OdDbBlockParameter;
40 class OdDbDynBlockTableRecordImpl;
43 
53 {
54 public:
55 
56  enum UnitsType {
57  kNoUnits = 0, // No units defined.
58  kAngular = 1, // Angle.
59  kDistance = 2, // Distance.
60  kArea = 3 // 2D area.
61  };
62 
65 
70 
72  const OdDbDynBlockReferenceProperty& other);
73 
78 
85 
90 
94  bool readOnly() const;
95 
96 
100  bool show() const;
101 
106 
111 
129 
130 
135  void getAllowedValues(OdResBufArray& allowedValues);
136 
140  OdResBufPtr value () const;
141 
148  bool setValue (const OdResBufPtr& value);
149 
154 
162 
163 private:
164  friend class OdDbDynBlockReferencePropertyImpl;
165  OdDbDynBlockReferencePropertyImpl* m_pImpl;
166 };
167 
176 
183 {
184 // FELIX_CHANGE_BEGIN
185  // need to make BomUtil a friend class since it uses a private function
186  // which became public in a newer ODA version
187  friend class BomUtil;
188 // FELIX_CHANGE_END
190 public:
191 
196 
201 
203 
214  static bool isDynamicBlock (const OdDbObjectId& blockTableRecordId);
215 
223  bool isDynamicBlock () const;
224 
229 
230 
240 
244  void resetBlock();
245 
255  bool convertToStaticBlock (const OdString& newBlockName);
256 
264 
269 private:
271  OdDbBlockRepresentationContext* getRepresentationContext() const;
272  OdDbDynBlockReferenceImpl* m_pImpl;
274 };
275 
277 {
279 public:
282  bool isDynamicBlock() const;
284 
290  void getAnonymousBlockIds(OdDbObjectIdArray& anonymousIds) const;
291  void updateAnonymousBlocks() const;
292 private:
294  OdDbDynBlockTableRecordImpl* m_pImpl;
295 };
296 
297 #include "TD_PackPop.h"
298 
299 #endif
OdSmartPtr< OdDbBlockParameter > OdDbBlockParameterPtr
OdArray< OdDbDynBlockReferencePropertyPtr > OdDbDynBlockReferencePropertyArray
OdSmartPtr< OdDbDynBlockReferenceProperty > OdDbDynBlockReferencePropertyPtr
#define DYNBLOCKS_EXPORT
Definition: DbEvalGraph.h:91
unsigned long OdDbEvalNodeId
Definition: DbEvalGraph.h:60
static bool isDynamicBlock(const OdDbObjectId &blockTableRecordId)
OdDbDynBlockReference(const OdDbObjectId &blockRefId)
bool isDynamicBlock() const
OdDbObjectId dynamicBlockTableRecord() const
OdDbObjectId blockId() const
bool convertToStaticBlock(const OdString &newBlockName)
virtual ~OdDbDynBlockReference()
void getBlockProperties(OdDbDynBlockReferencePropertyArray &properties) const
OdDbObjectId anonymousBlockTableRecord() const
OdDbDynBlockReference(OdDbBlockReference *pRef)
OdDbObjectId blockId() const
void getAllowedValues(OdResBufArray &allowedValues)
OdString propertyName() const
OdResBuf::ValueType propertyType() const
OdDbDynBlockReferenceProperty & operator=(const OdDbDynBlockReferenceProperty &other)
OdDbBlockParameterPtr getParameter()
bool visibleInCurrentVisibilityState() const
UnitsType unitsType() const
OdString description() const
bool setValue(const OdResBufPtr &value)
OdDbDynBlockReferenceProperty(const OdDbDynBlockReferenceProperty &other)
void getDescriptor(OdDbEvalNodeId &parameterId, OdDbBlkParamPropertyDescriptor &pDescriptor)
OdResBufPtr value() const
void updateAnonymousBlocks() const
bool isDynamicBlock() const
void getAnonymousBlockIds(OdDbObjectIdArray &anonymousIds) const
OdDbObjectId blockTableRecordId() const
OdDbDynBlockTableRecord(OdDbObjectId blockId)
ValueType
Definition: ResBuf.h:171
ODRX_HEAP_OPERATORS()
GLsizei const GLfloat * value
Definition: gles2_ext.h:302