CFx SDK Documentation  2022 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 {
185 public:
186 
191 
196 
198 
209  static bool isDynamicBlock (const OdDbObjectId& blockTableRecordId);
210 
218  bool isDynamicBlock () const;
219 
224 
225 
235 
239  void resetBlock();
240 
250  bool convertToStaticBlock (const OdString& newBlockName);
251 
259 
264 private:
266  OdDbBlockRepresentationContext* getRepresentationContext() const;
267  OdDbDynBlockReferenceImpl* m_pImpl;
269 };
270 
272 {
274 public:
277  bool isDynamicBlock() const;
279 
285  void getAnonymousBlockIds(OdDbObjectIdArray& anonymousIds) const;
286  void updateAnonymousBlocks() const;
287 private:
289  OdDbDynBlockTableRecordImpl* m_pImpl;
290 };
291 
292 #include "TD_PackPop.h"
293 
294 #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