GME
13
|
00001 // MgaFilter.h : Declaration of the CMgaFilter 00002 00003 #ifndef __MGAFILTER_H_ 00004 #define __MGAFILTER_H_ 00005 00006 #include "resource.h" // main symbols 00007 #include "MgaFCO.h" 00008 00009 00010 00012 // CMgaFilter 00013 class ATL_NO_VTABLE CMgaFilter : 00014 public CComObjectRootEx<CComSingleThreadModel>, 00015 public CComCoClass<CMgaFilter, &__uuidof(MgaFilter)>, 00016 public IDispatchImpl<IMgaFilter, &__uuidof(IMgaFilter), &__uuidof(__MGALib)>, 00017 public ISupportErrorInfoImpl<&__uuidof(IMgaFilter)> 00018 { 00019 public: 00020 CMgaFilter() 00021 { 00022 levels = objtypes = 0; 00023 newlevel = newobjtype = newrole = newkind = newname = false; 00024 } 00025 00026 00027 DECLARE_PROTECT_FINAL_CONSTRUCT() 00028 00029 BEGIN_COM_MAP(CMgaFilter) 00030 COM_INTERFACE_ENTRY(IMgaFilter) 00031 COM_INTERFACE_ENTRY(IDispatch) 00032 COM_INTERFACE_ENTRY_IID(IID_ISupportErrorInfo, IMyErrorInfoBase) 00033 END_COM_MAP() 00034 00035 private: 00036 CComBSTR level, objtype, role, kind, name; 00037 bool newlevel, newobjtype, newrole, newkind, newname; 00038 unsigned long levels; 00039 unsigned long objtypes; 00040 typedef stdext::hash_set<CComBSTRNoAt, CComBSTR_hashfunc> BSTRhash; 00041 typedef stdext::hash_set<metaref_type, metaref_hashfunc> mrefhash; 00042 mrefhash rolenums, kindnums; 00043 BSTRhash rolenames, kindnames, names; 00044 CMgaProject *mgaproject; 00045 // IMgaFilter 00046 public: 00047 STDMETHOD(get_Level)(BSTR *pVal); 00048 STDMETHOD(put_Level)(BSTR newVal); 00049 STDMETHOD(get_ObjType)(BSTR *pVal); 00050 STDMETHOD(put_ObjType)(BSTR newVal); 00051 STDMETHOD(get_Role)(BSTR *pVal); 00052 STDMETHOD(put_Role)(BSTR newVal); 00053 STDMETHOD(get_Kind)(BSTR *pVal); 00054 STDMETHOD(put_Kind)(BSTR newVal); 00055 STDMETHOD(get_Name)(BSTR *pVal); 00056 STDMETHOD(put_Name)(BSTR newVal); 00057 STDMETHOD(get_Project)(IMgaProject **pVal); 00058 00059 00060 void searchFCOs(CoreObj &self, EXCOLLECTIONTYPE_FOR(MgaFCO) *retcoll, int level = 0); 00061 void init(); 00062 void setproject(CMgaProject *p ) { mgaproject = p; } 00063 }; 00064 00065 #endif //__MGAFILTER_H_