// RD.h : Declaration of the CRD #ifndef __RD_H_ #define __RD_H_ #include "resource.h" // main symbols #include // Active Server Pages Definitions class CRoutineDesinDoc; class CRow; class CColumn; ///////////////////////////////////////////////////////////////////////////// // CRD class ATL_NO_VTABLE CRD : public CComObjectRootEx, public CComCoClass, public IDispatchImpl { public: CRD() { m_bOnStartPageCalled = FALSE; } public: DECLARE_REGISTRY_RESOURCEID(IDR_RD) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CRD) COM_INTERFACE_ENTRY(IRD) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // IRD public: STDMETHOD(GetReqAttPS)(/*[in]*/ BSTR strPS,/*[out,retval]*/ BSTR * strOut); BOOL GetReqAttFromStep(CString Step); BOOL GetReqAttFromTask(CString Task); BOOL GetReqAttFromPlan(CString Plan); BOOL GetReqAttFromSpec(CString Spec); void GetReqAtt(CString PS); STDMETHOD(RestAllAttribute)(); STDMETHOD(GetAllAtt)(/*[out,retval]*/ BSTR *strOut); STDMETHOD(GetValue)(/*[in]*/ BSTR AttStr, /*[out,retval]*/ BSTR * Vals); STDMETHOD(IsInWM)(/*[in]*/ BSTR AttStr,/*[in]*/ BSTR valStr ,/*[out,retval]*/ BSTR *outStr); STDMETHOD(GetType)(/*[in]*/BSTR AttStr,/*[out,retval]*/BSTR * strType); STDMETHOD(GetLegal)(/*[in]*/ BSTR AttStr,/*[out,retval]*/ BSTR* Vals); STDMETHOD(GetOutputAtt)(/*[out,retval]*/ BSTR * strOut); STDMETHOD(SetValToAttribute)(/*[in]*/ BSTR strAtt,/*[in]*/ BSTR strVal); double CEvalExp(CString str); void RunPS(CString PS); CString SolveExp(CRow * row); BOOL StepHandler(CString Step); BOOL TaskHandler(CString Task); CString GetType(CString str); CStringList* GetAllItems(CString Plan); BOOL PlanHandler(CString Plan); BOOL EvaluateColumn(CColumn * column,CString AttributeName,CString strAgent); CStringList* GetRankingPlanList(CString Spec); BOOL SpecialistHandler(CString Spec); CString strAllOutput; CString ReqAtt; STDMETHOD(RunSinglePS)(/*[in]*/BSTR PS,/*[out,retval]*/BSTR* out); STDMETHOD(OpenRDDoc)(/*[in]*/BSTR str); CRoutineDesinDoc * pDoc; //Active Server Pages Methods STDMETHOD(OnStartPage)(IUnknown* IUnk); STDMETHOD(OnEndPage)(); private: CComPtr m_piRequest; //Request Object CComPtr m_piResponse; //Response Object CComPtr m_piSession; //Session Object CComPtr m_piServer; //Server Object CComPtr m_piApplication; //Application Object BOOL m_bOnStartPageCalled; //OnStartPage successful? }; #endif //__RD_H_