AcDbAssocObjectActionParam.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 March 2010
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #pragma once
  15. #include "AcDbAssocActionParam.h"
  16. #pragma pack (push, 8)
  17. /// <summary>
  18. /// Action parameter that just keeps a dependency on an AcDbObject. It does not
  19. /// add any more functionality as compared to directly using an AcDbAssocDependency,
  20. /// but it may add consistency to custom action body code that may keep all the data
  21. /// in the form of action parameters and access the data through the action parameters.
  22. /// It also allows the action body to use the action parameter name (string) to get to
  23. /// the referenced AcDbObject.
  24. /// </summary>
  25. ///
  26. class ACDB_PORT AcDbAssocObjectActionParam : public AcDbAssocActionParam
  27. {
  28. public:
  29. ACRX_DECLARE_MEMBERS(AcDbAssocObjectActionParam);
  30. /// <summary> Default constructor. </summary>
  31. /// <param name="createImpObject"> See AcDbAssocCreateImpObject explanation. </param>
  32. ///
  33. explicit AcDbAssocObjectActionParam(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
  34. /// <summary>
  35. /// Returns the AcDbObject the action parameter depends on.
  36. /// </summary>
  37. /// <param name="object"> The returned AcDbObject the action parameter depends on. </param>
  38. /// <returns> Acad::ErrorStatus. </returns>
  39. ///
  40. Acad::ErrorStatus getObject(AcDbCompoundObjectId& object) const;
  41. /// <summary>
  42. /// Makes the action parameter depend on the given AcDbObject via an AcDbAssocDependency.
  43. /// </summary>
  44. /// <param name="object"> The AcDbObject to create a dependency on. </param>
  45. /// <param name="isReadDependency"> Read-dependency on the object should be created. </param>
  46. /// <param name="isWriteDependency"> Write-dependency on the object should be created. </param>
  47. /// <param name="dependencyOrder">
  48. /// Specifies position of the created dependency in the ordered list of
  49. /// dependencies on the object. See AcDbAssocDependency::setOrder(int) method.
  50. /// </param>
  51. /// <returns> Acad::ErrorStatus. </returns>
  52. ///
  53. Acad::ErrorStatus setObject(const AcDbCompoundObjectId& object, bool isReadDependency = true, bool isWriteDependency = false, int dependencyOrder = 0);
  54. };
  55. #pragma pack (pop)