AcDbAssocDimDependencyBodyBase.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // CREATED BY: Jiri Kripac October 2007
  12. //
  13. // DESCRIPTION:
  14. //
  15. // AcDbAssocDimDependencyBodyBase class.
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18. #pragma once
  19. #include "AcDbAssocGlobal.h"
  20. #include "AcString.h"
  21. #include "AcArray.h"
  22. #include "AcConstrainedGeometry.h"
  23. #include "AcDbAssocDependencyBody.h"
  24. #pragma pack (push, 8)
  25. /// <summary>
  26. /// A simple class that just keeps geometry of a vertex or edge subentity.
  27. /// </summary>
  28. /// <remarks>
  29. /// Notice that no copy constructor, assignment operator or destructor are
  30. /// implemented that would manage the referenced curve. The AcDbSubentGeometry
  31. /// is not the owner of the curve, it just references it.
  32. /// </remarks>
  33. ///
  34. class ACDB_PORT AcDbSubentGeometry
  35. {
  36. public:
  37. /// <summary> Default constructor. </summary>
  38. AcDbSubentGeometry() : mSubentType(AcDb::kNullSubentType), mpCurve(NULL) {}
  39. /// <summary> Constructor initializing with a vertex subentity. </summary>
  40. /// <param name="pnt"> The coordinates of the point subentity. </param>
  41. ///
  42. AcDbSubentGeometry(const AcGePoint3d& pnt)
  43. : mSubentType(AcDb::kVertexSubentType), mPoint(pnt), mpCurve(NULL) {}
  44. /// <summary> Constructor initializing with an edge subnetity. </summary>
  45. /// <param name="pCurve"> The curve is not owned by this AcDbSubentGeometry. </param>
  46. ///
  47. AcDbSubentGeometry(AcGeCurve3d* pCurve)
  48. : mSubentType(AcDb::kEdgeSubentType), mpCurve(pCurve) {}
  49. /// <summary> Returns AcDb::SubentType of the subentity. </summary>
  50. /// <returns> AcDb::SubentType. </returns>
  51. ///
  52. AcDb::SubentType type() const { return mSubentType; }
  53. /// <summary> Returns coordinates of the vertex subentity. </summary>
  54. /// <returns> Coordinates of the vertex subentity. </returns>
  55. ///
  56. AcGePoint3d point() const { return mPoint; }
  57. /// <summary> Returns pointer to the curve of the edge subentity. </summary>
  58. /// <returns> Pointer to the curve of the edge subentity. The curve is not
  59. /// owned by this AcDbSubentGeometry. </returns>
  60. ///
  61. AcGeCurve3d* curve() const { return mpCurve; }
  62. private:
  63. AcDb::SubentType mSubentType;
  64. AcGePoint3d mPoint;
  65. AcGeCurve3d* mpCurve;
  66. };
  67. /// <summary> <para>
  68. /// AcDbAssocDimDependencyBodyBase ties together the following objects that
  69. /// define a dimensional constraint:
  70. ///
  71. /// AcDbAssocVariable Keeps dimensional constraint name and expression.
  72. /// AcDbAssoc2dConstraintGroup Keeps AcExplicitConstraint.
  73. /// AcDbEntity (such as AcDbDimension) Graphical representation of the dimensional constraint.
  74. ///
  75. /// AcDbAssocDimDependencyBodyBase class represents a dependency of an AcExplicitConstraint
  76. /// owned by an AcDbAssoc2dConstraintGroup, on an AcDbEntity that is the graphical
  77. /// representation of the dimensional constraint. AcDbAssocDimDependencyBodyBase
  78. /// is an abstract base class, there are concrete derived classes (such as
  79. /// AcDbAssocDimDependencyBody) that deal with concrete entity types (such as AcDbDimension)
  80. /// that are used as graphical representations of dimensional constraints.
  81. /// </para> <para>
  82. /// The AcDbAssocDimDependencyBodyBase does all the work of managing the graphical
  83. /// entity, receiving notifications about entity text changes, updating the entity
  84. /// text and entity positioning, keeping the entity text in sync with the
  85. /// AcDbAssocVariable, and keeping it in sync with the corresponding
  86. /// AcExplicitConstraint in AcDbAssoc2dConstraintGroup.
  87. /// </para> <para>
  88. /// There always is a corresponding AcDbAssocVariable that keeps the name, expression
  89. /// and value of the dimensional constraint and is also referenced by the
  90. /// AcExplicitConstraint via AcDbAssocValueDependency. The AcDbAssocDimDependencyBodyBase
  91. /// obtains the corresponding AcDbAssocVariable by going up to the
  92. /// AcDbAssoc2dConstraintGroup that owns the AcDbAssocDimDependencyBody, finds
  93. /// the AcExplicitConstraint that references this dependency, obtains the
  94. /// AcDbAssocValueDependency and obtains the object it depends on, which is the
  95. /// corresponding AcDbAssocVariable.
  96. /// </para> </summary>
  97. ///
  98. class ACDB_PORT AcDbAssocDimDependencyBodyBase : public AcDbAssocDependencyBody
  99. {
  100. public:
  101. ACRX_DECLARE_MEMBERS(AcDbAssocDimDependencyBodyBase);
  102. /// <summary> Default constructor. </summary>
  103. explicit AcDbAssocDimDependencyBodyBase(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  104. /// <summary> Destructor. </summary>
  105. virtual ~AcDbAssocDimDependencyBodyBase();
  106. /// <summary>
  107. /// Derived classes needs to override this pure virtual method. This is how
  108. /// they provide the text of the entity they manage.
  109. /// </summary>
  110. /// <returns> The entity text. </returns>
  111. ///
  112. virtual AcString getEntityTextOverride() const = 0;
  113. /// <summary>
  114. /// Derived classes need to override this pure virtual method to set the
  115. /// text of the entity they manage.
  116. /// </summary>
  117. /// <param name="newText"> New text to set to the entity. </param>
  118. /// <returns> Acad::eOk if successful. </returns>
  119. ///
  120. virtual Acad::ErrorStatus setEntityTextOverride(const AcString& newText) = 0;
  121. /// <summary>
  122. /// Derived classes needs to override this pure virtual method to provide the
  123. /// current measurement of the entity they manage.
  124. /// </summary>
  125. /// <returns> The entity measurement. </returns>
  126. ///
  127. virtual double getEntityMeasurementOverride() const = 0;
  128. /// <summary>
  129. /// Derived classes need to override this pure virtual method to inform
  130. /// whether the attachment of the entity they manage changed, such as whether
  131. /// the entity has been repositioned.
  132. /// </summary>
  133. /// <returns> True if the entity attachment changed, false otherwise. </returns>
  134. ///
  135. virtual bool isEntityAttachmentChangedOverride() const = 0;
  136. /// <summary> This method needs to be overriden and implemented by derived
  137. /// classes. It updates the controlled entity position, size and orientation.
  138. /// The base class impplementation just handles reference dimensions that are
  139. /// not dimensional constraints. This method updates the corresponding
  140. /// AcDbAssocVariable with the current measured value of the dimension and
  141. /// updates the entity text with the current measurement. </summary>
  142. /// <returns> Acad::eOk if successful. </returns>
  143. ///
  144. virtual Acad::ErrorStatus updateDependentOnObjectOverride();
  145. /// <summary> Returns the corresponding dimensional constraint node. </summary>
  146. /// <returns> The dimensional constraint node. </returns>
  147. ///
  148. class AcExplicitConstraint* constraint() const;
  149. /// <summary> Returns object id of the corresponding AcDbAssocVariable. </summary>
  150. /// <returns> Object id of the AcDbAssocVariable. </returns>
  151. ///
  152. AcDbObjectId variable() const; // of AcDbAssocVariable
  153. /// <summary> Returns all AcConstrainedGeometries constrained by this
  154. /// dimensional constraint. </summary>
  155. /// <param name="geoms"> All AcConstrainedGeometries constrained by this
  156. /// dimensional constraint. </param>
  157. /// <returns> Acad::eOk if successful. </returns>
  158. ///
  159. Acad::ErrorStatus getConstrainedGeoms(AcArray<AcConstrainedGeometry*>& geoms) const;
  160. /// <summary> Returns all constrained subentities of AcDbEntities constrained
  161. /// by this dimensional constraint. </summary>
  162. /// <param name="geoms"> All constrained subentities of AcDbEntities
  163. /// constrained by this dimensional constraint. </param>
  164. /// <returns> Returns Acad::eOk if successful. </returns>
  165. ///
  166. Acad::ErrorStatus getConstrainedGeoms(AcArray<AcDbFullSubentPath>& geoms) const;
  167. /// <summary> Returns all constrained subentities of AcDbEntities constrained
  168. /// by this dimensional constraint. </summary>
  169. /// <param name="geoms"> All constrained subentities of AcDbEntities
  170. /// constrained by this dimensional constraint. </param>
  171. /// <param name="distanceDirection"> Direction of the distance constraint. </param>
  172. /// <returns> Acad::eOk if successful. </returns>
  173. ///
  174. Acad::ErrorStatus getConstrainedGeoms(AcArray<AcDbSubentGeometry>& geoms,
  175. AcGeVector3d& distanceDirection) const;
  176. /// <summary> Returns name, expression and current value of the AcDbAssocVariable
  177. /// that corresponds to this dimensional constraint. </summary>
  178. /// <param name="name"> Variable name. </param>
  179. /// <param name="expression"> Variable expression. </param>
  180. /// <param name="value"> Variable value. </param>
  181. /// <returns> Acad::eOk if successful. </returns>
  182. ///
  183. Acad::ErrorStatus getVariableNameAndExpression(AcString& name, AcString& expression, AcString& value) const;
  184. /// <summary> Returns name and expression from the text that the managed
  185. /// entity is displaying. </summary>
  186. /// <param name="name"> Name from the managed entity display text. </param>
  187. /// <param name="expression"> Expression from the managed entity display text. </param>
  188. /// <returns> Acad::eOk if successful. </returns>
  189. ///
  190. Acad::ErrorStatus getEntityNameAndExpression(AcString& name, AcString& expression) const;
  191. /// <summary> Sets new name and expression of the AcDbAssocVariable that
  192. /// corresponds to this dimensional constraint. Either name or expression
  193. /// may be empty strings which indicates not to change them. </summary>
  194. /// <param name="name"> New name of the AcDbAssocVariable. </param>
  195. /// <param name="expression"> New expression of the AcDbAssocVariable. </param>
  196. /// <returns> Acad::eOk if successful. </returns>
  197. ///
  198. Acad::ErrorStatus setVariableNameAndExpression(const AcString& name, const AcString& expression);
  199. /// <summary> Sets name and expression that the managed entity should display.
  200. /// Either name or expression may be empty strings which indicates not
  201. /// to change them. </summary>
  202. /// <param name="name"> New name the managed entity should display. </param>
  203. /// <param name="expression"> New expression the managed entity should display. </param>
  204. /// <param name="value"> New value the managed entity should display. </param>
  205. /// <returns> Acad::eOk if successful. </returns>
  206. ///
  207. Acad::ErrorStatus setEntityNameAndExpression(const AcString& name, const AcString& expression, const AcString& value);
  208. /// <summary> Sets name and expression on both the AcDbAssocVariable that
  209. /// corresponds to this dimensional constraint and on the managed entity
  210. /// that serves as graphical representation of this dimensional constraint.
  211. /// Either name or expression may be empty strings which indicates not to
  212. /// change them. </summary>
  213. /// <param name="name"> New name to be set. </param>
  214. /// <param name="expression"> New expression to be set. </param>
  215. /// <returns> Acad::eOk if successful. </returns>
  216. ///
  217. Acad::ErrorStatus setNameAndExpression(const AcString& name, const AcString& expression); // Both variable and entity
  218. /// <summary> Checks if the given entityTextToValidate can be used as the
  219. /// text the managed entity displays. Either the name or the expression part
  220. /// of the entityTextToValidate text may be empty which means that the
  221. /// current name/expression should be used. </summary>
  222. /// <param name="entityTextToValidate"> The entity text to check. </param>
  223. /// <param name="errorMessage"> The error message if any errors. </param>
  224. /// <returns> Acad::eOk if successful. </returns>
  225. ///
  226. Acad::ErrorStatus validateEntityText(const AcString& entityTextToValidate,
  227. AcString& errorMessage) const;
  228. /// <summary>
  229. /// If needed, opens itself for write and updates the text in the managed entity.
  230. /// If no changes are needed, does nothing. Notice that this AcDbAssocDimDependencyBodyBase
  231. /// may be open just for read when this method is called. This is to avoid the overhead
  232. /// with opening the object for write in case it does not need to be modified.
  233. /// </summary>
  234. /// <returns> Acad::eOk if successful. </returns>
  235. ///
  236. Acad::ErrorStatus updateEntityText();
  237. /// <summary> Composes the text that the managed entity should display. The
  238. /// text is composed from the corresponding AcDbAssocVariable name, expression
  239. /// and/or value. The text formatting follows requiredNameFormat. </summary>
  240. /// <param name="requiredNameFormat">
  241. /// The constraint name format display, deafault value if -1.
  242. /// If requiredNameFormat == -1, CONSTRAINTNAMEFORMAT sysvar is used for
  243. /// choosing the text format. </param>
  244. /// <returns> The composed entity text. </returns>
  245. ///
  246. AcString composeEntityText(int requiredNameFormat = -1) const;
  247. /// <summary> Measures the current dimensional constraint based on
  248. /// the current positions and sizes of the constrained geometries and sets
  249. /// the corresponding AcDbAssocVariable to this measured value. If the
  250. /// dimensional constraint is satisfied, the AcDbAssocVariable value will
  251. /// already be equal to the measured value and no setting is needed and it
  252. /// does not happen. Notice that if AcDbAssocVariable contained an expression,
  253. /// it will be erased and the variable will just contain a numerical value,
  254. /// not expression. </summary>
  255. /// <returns> Acad::eOk if successful. </returns>
  256. ///
  257. Acad::ErrorStatus setVariableValueToMeasuredValue() const;
  258. /// <summary> Deactivates the constraint. Deactivating a constraint means
  259. /// still keeping the AcExplicitConstraint in the AcDbAssoc2dConstraintGroup
  260. /// but removing its d_node or r_node from the DCM dimension system. </summary>
  261. /// <returns> Acad::eOk if successful. </returns>
  262. ///
  263. Acad::ErrorStatus deactivateConstraint() const;
  264. /// <summary> Reactivates the constraint. Reactivating a constraint means
  265. /// creating a d_node or r_node for this AcExplicitConstraint and adding it
  266. /// to the DCM dimension system. </summary>
  267. /// <returns> Acad::eOk if successful. </returns>
  268. ///
  269. Acad::ErrorStatus reactivateConstraint() const;
  270. /// <summary> Returns whether the constraint is active. </summary>
  271. /// <returns> True if the constraint is active, false otherwise. </returns>
  272. ///
  273. bool isConstraintActive() const; // Has DCM d_node or r_node
  274. /// <summary> Measures the current dimensional constraint based on the
  275. /// current positions and sizes of the constrained geometries. If the
  276. /// dimensional constraint is satisfied, the AcDbAssocVariable value will
  277. /// already be equal to the measured value. </summary>
  278. /// <param name="measurement"> The returned measured value. </param>
  279. /// <returns> Acad::eOk if successful. </returns>
  280. ///
  281. Acad::ErrorStatus getMeasuredValue(double& measurement) const;
  282. /// <summary> Sets whether the constraint is reference only.
  283. /// A reference "constraint" keeps updating its AcDbAssocVariable and the
  284. /// dimension text with the measured value of the dimension, but it does
  285. /// not function as a dimensional constraint. </summary>
  286. /// <param name="yesNo">
  287. /// Bool value indicating whether the constraint is reference only. </param>
  288. /// <returns> Acad::eOk if successful. </returns>
  289. ///
  290. Acad::ErrorStatus setIsReferenceOnly(bool yesNo);
  291. /// <summary> Parses the given entityText string and extracts name and
  292. /// expression components from it. It is mainly for internal use. </summary>
  293. /// <param name="entityText"> The string to extract name and expression from. </param>
  294. /// <param name="useMeasurementIfNoText">
  295. /// Indicates whether to use measurement value if no text is given. </param>
  296. /// <param name="measurement"> The provided entity measurement. </param>
  297. /// <param name="isAngular"> Indicates that the constraint is angular. </param>
  298. /// <param name="name"> Name component extracted from entityText. </param>
  299. /// <param name="expression"> Expression component extracted from entityText. </param>
  300. /// <returns> Acad::eOk if successful. </returns>
  301. ///
  302. static Acad::ErrorStatus
  303. getNameAndExpressionFromEntityText(const AcString& entityText,
  304. bool useMeasurementIfNoText,
  305. double measurement,
  306. bool isAngular,
  307. AcString& name,
  308. AcString& expression);
  309. /// <summary> Returns the format that is used to display the entity name
  310. /// and expression by looking at the currently displayed entity text.
  311. /// See CONSTRAINTNAMEFORMAT sysvar for the possible format values. </summary>
  312. /// <returns> The currently used constraint display format. </returns>
  313. ///
  314. int getCurrentlyUsedEntityNameFormat() const;
  315. /// <summary>
  316. /// This function should be called when dependent object grips are dragged.
  317. /// </summary>
  318. /// <param name="status"> The current AcDb::DragStat. </param>
  319. ///
  320. void dragStatus(const AcDb::DragStat status);
  321. /// <summary> Gets the AcDbAssocDimDependencyBodyBase from the dependent-on
  322. /// AcDbEntity, such as from the AcDbDimension it controls. If the entity
  323. /// does not have an AcDbAssocDimDependencyBodyBase attached, AcDbObjectId::kNull
  324. /// is returned. </summary>
  325. /// <param name="entityId"> The entity id of the dependent-on AcDbEntity,
  326. /// such as of an AcDbDimension. </param>
  327. /// <param name="dimDepBodyId"> The returned AcDbObjectId of the
  328. /// AcDbAssocDimDependencyBodyBase, or AcDbObjectId::kNull if none found. </param>
  329. /// <returns> Acad::eOk if successful. </returns>
  330. ///
  331. static Acad::ErrorStatus getFromEntity(const AcDbObjectId& entityId, AcDbObjectId& dimDepBodyId);
  332. /// <summary> <para> Updates the constraint geometry when dimension grip
  333. /// points are moved. Any move made through triangular grip should move the
  334. /// constraint geometry by the same amount and update the constraint variable
  335. /// value. Clients of this function need to pass new positions of the dimension
  336. /// attachment in AcDbSubentGeometry array, and new dimension measurement.
  337. /// </para> <para>
  338. /// This API performs the following operations:
  339. /// </para> <para>
  340. /// 1. Moves the constraint geometry sub entity by the same
  341. /// amount the dimension grip point has been moved.
  342. /// </para> <para>
  343. /// 2. Moves the constrained geometry at the opposite end of
  344. /// the dimensional constraint by identity transform. This is a hint to DCM
  345. /// not to move the opposite end of the dimensional constraint.
  346. /// </para> <para>
  347. /// 3. Updates the constraint variable value with new measurement.
  348. /// </para> </summary>
  349. /// <param name="newAttachedGeometries">
  350. /// The new attached geometries to be updated. </param>
  351. /// <param name="measurement"> New measurement, default value is 0.0. </param>
  352. /// <returns> Acad::eOk if successful. </returns>
  353. ///
  354. Acad::ErrorStatus entityAttachmentPointMoved(const AcArray<AcDbSubentGeometry>& newAttachedGeometries,
  355. double measurement = 0.0);
  356. /// <summary> Overridden method from AcDbAssocDependencyBody base class. </summary>
  357. /// <param name="isRelevChange">
  358. /// Returns true if one of the following has happened:
  359. /// <para> Entity text changed in any way, </para>
  360. /// <para> Name or expression of the corresponding AcDbAssocVariable are
  361. /// different from name or expression in the controlled entity, </para>
  362. /// <para> Entity attachment changed. </para>
  363. /// </param>
  364. /// <returns> Acad::eOk if successful. </returns>
  365. ///
  366. virtual Acad::ErrorStatus isRelevantChangeOverride(bool& isRelevChange) const;
  367. /// <summary> This function sets the name and expression in the controlled
  368. /// entity text to be the same as the name and expression of the corresponding
  369. /// AcDbAssocVariable. </summary>
  370. ///
  371. virtual void evaluateOverride();
  372. /// <summary> If the controlled entity text changed, this function sets the
  373. /// name and expression of the AcDbAssocVariable to be the same as the name
  374. /// and expression in the entity text. </summary>
  375. /// <param name="pDbObj"> The controlled entity. </param>
  376. ///
  377. virtual void modifiedOverride(const AcDbObject* pDbObj);
  378. /// <summary> When the dependent-on object (such as an AcDbDimension) is
  379. /// erased, the corresponding AcDbAssocVariable is also erased.</summary>
  380. /// <param name="pDbObj"> The controlled entity. </param>
  381. /// <param name="isErasing"> Boolean isErasing. </param>
  382. ///
  383. virtual void erasedOverride(const AcDbObject* pDbObj, Adesk::Boolean isErasing);
  384. /// <summary> Overridden method from the AcDbObject base class.
  385. /// It erases the controlled entity, such as the AcDbDimension. </summary>
  386. /// <param name="erasing"> Boolean erasing. </param>
  387. /// <returns> Acad::eOk if successful. </returns>
  388. ///
  389. virtual Acad::ErrorStatus subErase(Adesk::Boolean erasing);
  390. /// <summary> Formats the given expression to current precision. </summary>
  391. /// <param name="expression"> The expression to be formatted. </param>
  392. /// <param name="isAngular"> Indicates it is an angular constraint. </param>
  393. /// <returns> The formatted expression. </returns>
  394. ///
  395. static AcString formatToCurrentPrecision(const AcString& expression, bool isAngular);
  396. /// <summary> Under normal circumstances the controlled AcDbDimension object
  397. /// is erased if the AcDbAssocDimDependencyBodyBase is erased. This static
  398. /// method allows to control if this behavior is to be surpressed, i.e.
  399. /// not erasing the AcDbDimension if the AcDbAssocDimDependencyBodyBase is
  400. /// erased. This can be useful for the creation of reference constraints
  401. /// since the same dimension should be retained and used for a reference
  402. /// constraint later on. </summary>
  403. /// <param name="yesNo"> Indicates to surpress the erase behavior or not. </param>
  404. /// <returns> Returns whether the behavior is surpressed or not. </returns>
  405. ///
  406. static bool setEraseDimensionIfDependencyIsErased(bool yesNo);
  407. /// <summary> Under normal circumstances an associated AcDbDimension object
  408. /// is erased if the AcDbAssocDimDependencyBodyBase is erased. This static
  409. /// method returns true iff this behavior is surpressed , i.e. not erasing
  410. /// the AcDbDimension if the AcDbAssocDimDependencyBodyBase is erased. </summary>
  411. /// <returns> Returns whether the behavior is surpressed or not. </returns>
  412. ///
  413. static bool getEraseDimensionIfDependencyIsErased();
  414. /// <summary> This class is for internal use only. It disables notifications
  415. /// when the dependency is not yet fully setup and these notifications would
  416. /// complain about the data being in inconsistent state. </summary>
  417. ///
  418. class ACDB_PORT NotificationIgnorer
  419. {
  420. public:
  421. /// <summary> Default constructor. </summary>
  422. NotificationIgnorer();
  423. /// <summary> Destructor. </summary>
  424. ~NotificationIgnorer();
  425. /// <summary> Returns true iff notifications are ignored. </summary>
  426. /// <returns> Returns whether notifications are ignored. </returns>
  427. ///
  428. static bool isIgnoringNotifications();
  429. private:
  430. const bool mPrevIsIgnoringNotifications;
  431. static bool smIsIgnoringNotifications;
  432. };
  433. };
  434. /// <summary> This enum describes dimensional constraint type. </summary>
  435. ///
  436. enum AcDbAssocConstraintType
  437. {
  438. /// <summary> None Associate Constraint </summary>
  439. kNoneAssocConstraintType = 0,
  440. /// <summary> Distance Associate Constraint </summary>
  441. kDistanceAssocConstraintType,
  442. /// <summary> Horizontal Distance Associate Constraint </summary>
  443. kHorizontalDistanceAssocConstraintType,
  444. /// <summary> Vertical Distance Associate Constraint </summary>
  445. kVerticalDistanceAssocConstraintType,
  446. /// <summary> AcAngleConstraint::kParallelAntiClockwise Associate Constraint </summary>
  447. kAngle0AssocConstraintType,
  448. /// <summary> AcAngleConstraint::kAntiParallelClockwise Associate Constraint </summary>
  449. kAngle1AssocConstraintType,
  450. /// <summary> AcAngleConstraint::kParallelClockwise Associate Constraint </summary>
  451. kAngle2AssocConstraintType,
  452. /// <summary> AcAngleConstraint::kAntiParallelAntiClockwise Associate Constraint </summary>
  453. kAngle3AssocConstraintType,
  454. /// <summary> Radius Associate Constraint </summary>
  455. kRadiusAssocConstraintType,
  456. /// <summary> Diameter Associate Constraint </summary>
  457. kDiameterAssocConstraintType,
  458. };
  459. #pragma pack (pop)