123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // 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.
- //
- //////////////////////////////////////////////////////////////////////////////
- #pragma once
- #include "acbasedefs.h"
- #include "adesk.h"
- #include "acadstrc.h"
- #include "rxmember.h"
- class AcRxValue;
- class AcRxMethodImp;
- class AcRxMethodIteratorImp;
- //*************************************************************************
- // AcRxMemberQueryEngine
- //*************************************************************************
- /// <summary>
- /// This class defines a method.
- /// </summary>
- ///
- class AcRxMethod : public AcRxMember
- {
- public:
- ACRX_DECLARE_MEMBERS_EXPIMP(AcRxMethod, ACBASE_PORT);
- /// <summary>
- /// This method is called to execute a method.
- ///
- /// </summary>
- ///
- /// <param name="pO">
- /// Input object that the method is applicable.
- /// </param>
- ///
- /// <param name="param">
- /// Reference to AcRxValue object that the method can set.
- /// </param>
- ///
- /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
- ///
- ACBASE_PORT Acad::ErrorStatus invoke(AcRxObject* pO, AcRxValue& param) const;
- /// <summary>
- /// This method is called to check if the method can be executed.
- ///
- /// </summary>
- ///
- /// <param name="pO">
- /// Input object that the method is applicable.
- /// </param>
- ///
- /// <param name="param">
- /// Input reference to AcRxValue object that the method can use.
- /// </param>
- ///
- /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
- ///
- ACBASE_PORT Acad::ErrorStatus isExecutable(const AcRxObject* pO, const AcRxValue& param) const;
- protected:
- /// <summary>
- /// Destructor
- /// </summary>
- ///
- ACBASE_PORT ~AcRxMethod();
- /// <summary>
- /// Constructor
- /// </summary>
- ///
- /// <param name="name">
- /// Input name of the method.
- /// </param>
- ///
- /// <param name="type">
- /// Input reference to type of the member.
- /// </param>
- ///
- ACBASE_PORT AcRxMethod(const ACHAR* name, const AcRxValueType& type);
- /// <summary>
- /// Derived classes can override this method to execute the method.
- /// </summary>
- ///
- /// <param name="pO">
- /// Input object that the method is applicable.
- /// </param>
- ///
- /// <param name="param">
- /// Reference to AcRxValue object that the method can set.
- /// </param>
- ///
- /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
- ///
- virtual Acad::ErrorStatus subInvoke(AcRxObject* pO, AcRxValue& param) const;
- /// <summary>
- /// Derived classes can override this method to return a status, if the method can executed
- /// in its current state.
- /// </summary>
- ///
- /// <param name="pO">
- /// Input object that the method is applicable.
- /// </param>
- ///
- /// <param name="param">
- /// Input reference to AcRxValue object that the method can use.
- /// </param>
- ///
- /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
- ///
- virtual Acad::ErrorStatus subIsExecutable(const AcRxObject* pO, const AcRxValue& param) const;
- protected:
- friend class AcRxMethodImp;
- ACBASE_PORT AcRxMethod(AcRxMethodImp*);
- };
|