AcDbAssocAsmBodyActionParam.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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: Pei Zhan July 2009
  12. //
  13. // DESCRIPTION:
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #include "AcDbAssocEdgeActionParam.h"
  18. #include "AcDbAssocCompoundActionParam.h"
  19. #pragma pack (push, 8)
  20. /// <summary>
  21. /// Action parameter that keeps reference to an AcDbEntity that uses an ASM (Autodesk
  22. /// Shape Manager) body to represent the entity geometry. Alternatively, it may
  23. /// keep the ASM body directly inside the action parameter, instead of referencing
  24. /// some other AcDbEntity. Currently AcDbSurface and derived classes, AcDb3dSolid,
  25. /// AcDbRegion and AcDbBody entities use ASM to represent the geometry.
  26. /// </summary>
  27. ///
  28. class ACDB_PORT AcDbAssocAsmBodyActionParam : public AcDbAssocActionParam
  29. {
  30. public:
  31. ACRX_DECLARE_MEMBERS(AcDbAssocAsmBodyActionParam);
  32. /// <summary> Default constructor. </summary>
  33. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  34. ///
  35. explicit AcDbAssocAsmBodyActionParam(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  36. /// <summary>
  37. /// For Autodesk Internal Use only.
  38. /// If the given pAsmEntity is database-resident, it creates an AcDbAssocDependency
  39. /// and attaches it to pAsmEntity. Otherwise it copies the ASM body kept in
  40. /// pAsmEntity and stores the ASM body directly inside this action parameter.
  41. /// </summary>
  42. /// <param name="pAsmEntity"> Entity that keeps an ASM body. </param>
  43. /// <param name="isReadDependency"> Read-dependency on the entity should be created. </param>
  44. /// <param name="isWriteDependency"> Write-dependency on the entity should be created. </param>
  45. /// <param name="dependencyOrder">
  46. /// Specifies position of the created dependency in the ordered list of
  47. /// dependencies on the entity. See AcDbAssocDependency::setOrder(int) method.
  48. /// </param>
  49. /// <returns> Acad::ErrorStatus. </returns>
  50. ///
  51. virtual Acad::ErrorStatus setBody(const AcDbEntity* pAsmEntity, bool isReadDependency = true, bool isWriteDependency = false, int dependencyOrder = 0);
  52. /// <summary>
  53. /// For Autodesk Internal Use only.
  54. /// Creates an AcDbAssocDependency and attaches it to asmEntityId.
  55. /// </summary>
  56. /// <param name="asmEntityId"> Referenced entity that keeps an ASM body. </param>
  57. /// <param name="isReadDependency"> Read-dependency on the entity should be created. </param>
  58. /// <param name="isWriteDependency"> Write-dependency on the entity should be created. </param>
  59. /// <param name="dependencyOrder">
  60. /// Specifies position of the created dependency in the ordered list of
  61. /// dependencies on the entity. See AcDbAssocDependency::setOrder(int) method.
  62. /// </param>
  63. /// <returns> Acad::ErrorStatus. </returns>
  64. ///
  65. virtual Acad::ErrorStatus setBody(AcDbObjectId asmEntityId, bool isReadDependency = true, bool isWriteDependency = false, int dependencyOrder = 0);
  66. /// <summary>
  67. /// For Autodesk Internal Use only.
  68. /// Sets the given ASM body to the AcDbAssocAsmBodyActionParam, optionally
  69. /// making a copy. No dependency on any entity is created, the ASM body is
  70. /// directly owned by this action parameter.
  71. /// </summary>
  72. /// <param name="pAsmBody"> The ASM body to set to the action parameter. </param>
  73. /// <param name="makeCopy">
  74. /// If true, makes copy of the ASM body and keeps it, otherwise it keeps the
  75. /// provided ASM body directly.
  76. /// </param>
  77. /// <returns> Acad::ErrorStatus. </returns>
  78. ///
  79. virtual Acad::ErrorStatus setBody(void* pAsmBody, bool makeCopy);
  80. /// <summary>
  81. /// For Autodesk Internal Use only.
  82. /// Returns pointer to the ASM body that is either owned by an AcDbEntity
  83. /// referenced via an AcDbAssocDependency, or directly owned by this action
  84. /// parameter.
  85. /// </summary>
  86. /// <param name="makeCopy">
  87. /// If true, returns a copy of the ASM body, otherwise returns pointer to the
  88. /// ASM body owned by an AcDbEntity or in this action parameter. In the latter
  89. /// case the ASM body must not be modified bt the client code.
  90. /// </param>
  91. /// <returns> Void pointer that actually points to an ASM body object. </returns>
  92. ///
  93. virtual void* body(bool makeCopy) const;
  94. /// <summary>
  95. /// If this action parameter depends on an AcDbEntity via an AcDbAssocDependency,
  96. /// it returns AcDbCompoundObjectId of the entity this dependency depends on.
  97. /// </summary>
  98. /// <param name="compoundId">
  99. /// The AcDbCompoundObjectId of the entity this action parameter depends on,
  100. /// or an empty compound object id if the action parameter does not depend
  101. /// on any entity.
  102. /// </param>
  103. /// <returns> Acad::ErrorStatus. </returns>
  104. ///
  105. Acad::ErrorStatus getDependentOnCompoundObject(AcDbCompoundObjectId& compoundId) const;
  106. };
  107. #pragma pack (pop)