// KSRKB.h : Declaration of the CKSRKB #ifndef __KSRKB_H_ #define __KSRKB_H_ #include "resource.h" // main symbols class CKBEditorsDoc; class CConcept; class CRule; ///////////////////////////////////////////////////////////////////////////// // CKSRKB class ATL_NO_VTABLE CKSRKB : public CComObjectRootEx, public CComCoClass, public IDispatchImpl { public: CKBEditorsDoc* pDoc; void ExpandRule(CRule * Rule, CString strWMKeyList,CString strCptReplaced); void Order(CStringArray & List); void Order(CStringArray & List, CString Prop); BOOL CheckSatisfy(CStringArray & List); BOOL CheckSatisfy(CStringArray & List, CString Prop); void adjust(CString Obj1,CString Obj2,int i,int j,CStringArray& List); void AddTime(CString Obj, int dif); void Propagate(CString Obj,int dif, int j,CStringArray& List); BOOL Satisfy3days(CString Obj1, CString Obj2); BOOL LessThanDate(CString D1,CString Min); void SortList(CStringArray& List); DECLARE_REGISTRY_RESOURCEID(IDR_KSRKB) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CKSRKB) COM_INTERFACE_ENTRY(IKSRKB) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // IKSRKB public: STDMETHOD(GetInitObs)(/*[out,retval]*/BSTR*InitObs); STDMETHOD(SetDBAssoListToWM)(); STDMETHOD(AssertCptPropValToWM)(/*[in]*/ BSTR Cpt,/*[in]*/ BSTR Prop, /*[in]*/ BSTR Val); STDMETHOD(GetPromptL)(/*[in]*/BSTR Cpt,/*[in]*/BSTR Prop,/*[out,retval]*/BSTR*Prompt); STDMETHOD(GetAllProps)(/*[in]*/BSTR strCpt, /*[out,retval]*/ BSTR *outStr); STDMETHOD(GetAllCpt)(/*[out, retval]*/ BSTR *AllCpt); STDMETHOD(OrderObligatoryList)(/*[in]*/BSTR strProp, /*[out,retval]*/ BSTR* ChildList); STDMETHOD(ResetAllPropertyOfCptFromWM)(/*[in]*/BSTR Cpt); STDMETHOD(DeleteExpandedRule)(/*[in]*/ BSTR ssCluster); STDMETHOD(ExpandRules)(/*[in]*/BSTR ssCluster,/*[in]*/BSTR ssWMKEY,/*[in]*/BSTR ssCptReplaced); STDMETHOD(DifferenceTwoDate)(/*[in]*/ long D, /*[in]*/ long M, /*[in]*/ long Y,/*[in]*/ long D1, /*[in]*/ long M1, /*[in]*/ long Y1,/*[out,retval]*/ BSTR* Dif); STDMETHOD(GetConceptsByPropName)(/*[in]*/BSTR Prop, /*[out,retval]*/BSTR *List); STDMETHOD(OrderOpList)(/*[in]*/ BSTR strCpt, /*[out,retval]*/ BSTR * ChildList); STDMETHOD(GetLegalAr)(/*[in]*/BSTR Cpt,/*[in]*/ BSTR Prop, /*[in]*/ BSTR ArVal,/*[out,retval]*/ BSTR *Legal); STDMETHOD(GetLegalE)(/*[in]*/BSTR Cpt,/*[in]*/ BSTR Prop,/*[in]*/ BSTR ArVal,/*[out,retval]*/ BSTR *Legal); STDMETHOD(GetLegalA)(/*[in]*/BSTR Cpt,/*[in]*/ BSTR Prop, /*[out,retval]*/ BSTR *Legal); STDMETHOD(GetPromptA)(/*[in]*/BSTR Cpt,/*[in]*/BSTR Prop,/*[out,retval]*/BSTR*Prompt); STDMETHOD(GetChildListLevel1)(/*[in]*/ BSTR strCpt, /*[out,retval]*/ BSTR * ChildListXML); STDMETHOD(GetType)(/*[in]*/BSTR Cpt, /*[in]*/BSTR Prop, /*[out,retval]*/BSTR *Type); STDMETHOD(GetCptFromWM)(/*[in]*/ BSTR Prop, /*[in]*/ BSTR Val, /*[out, retval]*/ BSTR* CptList); STDMETHOD(PrinWM)(); STDMETHOD(GetEnglishProp)(/*[in]*/BSTR Cpt, /*[in]*/BSTR Prop,/*[out,retval]*/ BSTR *PropA); STDMETHOD(GetArabicProp)(/*[in]*/ BSTR Cpt,/*[in]*/ BSTR Prop,/*[out,retval]*/ BSTR *PropA); STDMETHOD(GetPropList)(/*[in]*/ BSTR Cpt, /*[out,retval]*/ BSTR *PropList); STDMETHOD(GetEnglishCpt)(/*[in]*/BSTR inStr, /*[out,retval]*/ BSTR *outStr); STDMETHOD(GetArabicCpt)(/*[in]*/BSTR inStr, /*[out,retval]*/ BSTR *outStr); STDMETHOD(GetLegal)(/*[in]*/BSTR Cpt,/*[in]*/ BSTR Prop, /*[out,retval]*/ BSTR *Legal); STDMETHOD(InstallArabicCptList)(); void AddChild(CString &strOut, CConcept * CptObj); STDMETHOD(GetChildList)(/*[in]*/ BSTR strCpt, /*[in,out,retval]*/ BSTR * ChildListXML); STDMETHOD(ReverseProperName)(/*[in]*/BSTR inStr, /*[out retval]*/ BSTR *outStr); STDMETHOD(DelCptPropValFromWM)(/*[in]*/BSTR Cpt, /*[in]*/BSTR Prop, /*[in]*/BSTR Val); STDMETHOD(GetLikelyConfirmedDis)(/*[in]*/ BSTR inStr,/*[out,retval]*/ BSTR *outStr); STDMETHOD(GetMostLikelyConfirmedDis)(/*[in]*/ BSTR inStr,/*[out,retval]*/ BSTR *outStr); STDMETHOD(GetProperName)(/*[in]*/ BSTR inStr,/*[out,retval]*/ BSTR * outStr); STDMETHOD(GetDisImage)(/*[in]*/ BSTR DisStr, /*[out,retval]*/ BSTR * ImageStr); STDMETHOD(Trim)(/*[in]*/ BSTR inSTr,/*[out,retval]*/ BSTR * outStr); STDMETHOD(IsInWM)(/*[in]*/BSTR strCpt,/*[in]*/BSTR strProp,/*[in]*/BSTR strVal,/*[out,retval]*/ BSTR* Ret); STDMETHOD(RemoveCptPropFromWM)(/*[in]*/BSTR Cpt,/*[in]*/ BSTR Prop); STDMETHOD(GetConfirmedDis)(/*[in]*/BSTR inStr,/*[out,retval]*/BSTR* outStr); STDMETHOD(GetAllWM)(/*[out, retval]*/ BSTR *str); STDMETHOD(GetSuspectedDisorders)(/*[in]*/BSTR inStr,/*[out,retval]*/BSTR* outStr); STDMETHOD(ResetWM)(); CString ConstructAdditionalCpt(); STDMETHOD(Abduct)(/*[in]*/BSTR strCpt, /*[in]*/BSTR strInf, /*[in]*/BSTR strProp, /*[out,retval]*/BSTR *List); STDMETHOD(SetToWM)(/*[in]*/BSTR Cpt, /*[in]*/BSTR Prop, /*[in]*/BSTR Val); STDMETHOD(PlayInference)(/*[in]*/BSTR strInf); STDMETHOD(GetInitConcept)(/*[out,retval]*/BSTR *InitCpt); STDMETHOD(GetFromWM)(/*[in]*/BSTR Cpt, /*[in]*/BSTR Prop, /*[out,retval]*/BSTR *Val); STDMETHOD(CloseKB)(); STDMETHOD(GetBasicData)(/*[out,retval]*/BSTR *DB); STDMETHOD(OpenKBDoc)(/*[in]*/ BSTR str); STDMETHOD(TestKB)(/*[out,retval]*/ BSTR *str); }; #endif //__KSRKB_H_