AcDbAssocSingleEdgePersSubentId.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 2007
  12. //
  13. // DESCRIPTION:
  14. //
  15. // AcDbAssocSingleEdgePersSubentId concrete derived class.
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18. #pragma once
  19. #include "acarray.h"
  20. #include "dbsubeid.h"
  21. #include "AcDbAssocPersSubentId.h"
  22. #pragma pack (push, 8)
  23. /// <summary>
  24. /// The concrete derived AcDbAssocPersSubentId class that identifies an edge
  25. /// subentity if the entity has only a single edge subentity (such as in the
  26. /// case of curve entities).
  27. /// </summary>
  28. ///
  29. class ACDB_PORT AcDbAssocSingleEdgePersSubentId : public AcDbAssocPersSubentId
  30. {
  31. public:
  32. ACRX_DECLARE_MEMBERS(AcDbAssocSingleEdgePersSubentId);
  33. /// <summary>
  34. /// Always returns number 1.
  35. /// </summary>
  36. /// <param name="pEntity"> Not used. </param>
  37. /// <param name="pDatabase"> Not used. </param>
  38. /// <returns> Always returns count 1. </returns>
  39. ///
  40. virtual int transientSubentCount(const AcDbEntity* pEntity, AcDbDatabase* pDatabase) const {
  41. UNREFERENCED_PARAMETER(pEntity);
  42. UNREFERENCED_PARAMETER(pDatabase);
  43. return 1;
  44. }
  45. /// <summary> Always returns AcDb::kEdgeSubentType. </summary>
  46. /// <param name="pEntity"> Not used. </param>
  47. /// <param name="pDatabase"> Not used. </param>
  48. /// <returns> AcDb::kEdgeSubentType. </returns>
  49. ///
  50. virtual AcDb::SubentType subentType(const AcDbEntity* pEntity, AcDbDatabase* pDatabase) const {
  51. UNREFERENCED_PARAMETER(pEntity);
  52. UNREFERENCED_PARAMETER(pDatabase);
  53. return AcDb::kEdgeSubentType;
  54. }
  55. /// <summary>
  56. /// Always returns false because AcDbAssocSingleEdgePersSubentId always
  57. /// identities the single edge of an entity.
  58. /// </summary>
  59. /// <returns> Always returns false. </returns>
  60. ///
  61. virtual bool isNull() const { return false; }
  62. /// <summary>
  63. /// Returns true iff this and the other AcDbAssocSingleEdgePersSubentId
  64. /// reference exactly the same subentity of the same entity. It returns true
  65. /// if both are of AcDbAssocSingleEdgePersSubentId type.
  66. /// </summary>
  67. /// <param name="pEntity"> Not used. </param>
  68. /// <param name="pDatabase"> Not used. </param>
  69. /// <param name="pOther"> The other AcDbAssocSingleEdgePersSubentId. </param>
  70. /// <returns> True iff this and the other AcDbAssocSingleEdgePersSubentId are equal. </returns>
  71. ///
  72. virtual bool isEqualTo(const AcDbEntity* pEntity, AcDbDatabase* pDatabase, const AcDbAssocPersSubentId* pOther) const;
  73. }; // class AcDbAssocSingleEdgePersSubentId
  74. #pragma pack (pop)