123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 2015 Autodesk, Inc. All rights reserved.
- //
- // Use of this software is subject to the terms of the Autodesk license
- // agreement provided at the time of installation or download, or which
- // otherwise accompanies this software in either electronic or hard copy form.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // CREATED BY: Sharad Jaiswal May 2010
- //
- // DESCRIPTION:
- //
- //////////////////////////////////////////////////////////////////////////////
- #pragma once
- #include "AcDbAssocArrayActionBody.h"
- class AcDbVertexRef;
- /// <summary><para>
- /// AcDbAssocArrayModifyActionBody class is an associative action which modify
- /// or override items of an associative array. This class and its derived class
- /// in general manage item specific modification on an associative array. This
- /// class inparticular is responsible for replacing some items with a set of
- /// source objects.
- /// </para><para>
- /// This class may be derived to support any modification action specific to
- /// array items.
- /// </para></summary>
- /// <remarks> Deriving from this class is not supported. </remarks>
- ///
- class ACDB_PORT AcDbAssocArrayModifyActionBody : public AcDbAssocArrayActionBody
- {
- public:
- ACDB_DECLARE_MEMBERS(AcDbAssocArrayModifyActionBody);
- /// <summary> Default constructor. </summary>
- /// <param name="createImpObject"> See AcDbAssocCreateImpObject. </param>
- ///
- explicit AcDbAssocArrayModifyActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
- /// <summary> Destructor. </summary>
- ///
- ~AcDbAssocArrayModifyActionBody(void);
- /// <summary> Obtains list of items which are being overriden by this
- /// action. </summary>
- /// <param name="indices"> The output list of spatial indices. </param>
- /// <returns> Acad::ErrorStatus. </returns>
- ///
- Acad::ErrorStatus getOverridenItems(AcArray<AcDbItemLocator>& indices) const;
- /// <summary> Sets the list of items which are to be overriden by this
- /// action. </summary>
- /// <param name="indices"> The input list of spatial indices. </param>
- /// <returns> Acad::ErrorStatus. </returns>
- ///
- Acad::ErrorStatus setOverridenItems(const AcArray<AcDbItemLocator>& indices);
- /// <summary> Checks whether an item at given index is controlled by this
- /// action. This method returns true if this item is being overridden by
- /// this action.</summary>
- /// <param name="item"> The input reference of array item. </param>
- /// <returns> true, if the item is controlled by this action. </returns>
- ///
- virtual bool controlsItem(const AcDbAssocArrayItem& item) const ADESK_OVERRIDE;
- /// <summary><para> Creates associative array modification action body to
- /// override given set of items from the array. This method is also
- /// responsible for creating action and attaching appropriate dependencies.
- /// </para><para> The item indices can be obtained from subent ids using
- /// static method AcDbAssocArrayActionBody::getArrayItemLocators(). </para>
- /// </summary>
- /// <param name="arrayId"> The input array object id. </param>
- /// <param name="indices"> The input list of item locators. </param>
- /// <param name="substEntities"> The input list of entities to be used as source for replacement. </param>
- /// <param name="basePoint"> The input vertex ref to define base point.
- /// </param>
- /// <param name="actionBodyId"> The returned array action body id. </param>
- /// <returns> Acad::ErrorStatus </returns>
- ///
- static Acad::ErrorStatus createInstance(AcDbObjectId arrayId,
- const AcArray<AcDbItemLocator>& indices,
- const AcDbObjectIdArray& substEntities,
- AcDbVertexRef& basePoint,
- AcDbObjectId& actionBodyId);
- };
|