GME
13
|
00001 // MgaReference.h : Declaration of the CMgaReference 00002 00003 #ifndef __MGAREFERENCE_H_ 00004 #define __MGAREFERENCE_H_ 00005 00006 #include "resource.h" // main symbols 00007 #include "MgaFCO.h" 00008 00010 // CMgaReference 00011 class ATL_NO_VTABLE CMgaReference : 00012 public CComCoClass<CMgaReference, &__uuidof(MgaReference)>, 00013 public IMgaFCOImpl< 00014 CComObjectRootEx<CComSingleThreadModel>, 00015 IDispatchImpl<IMgaReference, &__uuidof(IMgaReference), &__uuidof(__MGALib)> >, 00016 public ISupportErrorInfoImpl<&__uuidof(IMgaReference)> { 00017 public: 00018 CMgaReference() 00019 { 00020 } 00021 00022 00023 DECLARE_PROTECT_FINAL_CONSTRUCT() 00024 00025 BEGIN_COM_MAP(CMgaReference) 00026 COM_INTERFACE_ENTRY(IMgaReference) 00027 COM_INTERFACE_ENTRY_IID(__uuidof(IMgaObject),IMgaReference) 00028 COM_INTERFACE_ENTRY_IID(__uuidof(IMgaFCO),IMgaReference) 00029 COM_INTERFACE_ENTRY(IDispatch) 00030 COM_INTERFACE_ENTRY_IID(IID_ISupportErrorInfo, IMyErrorInfoBase) 00031 END_COM_MAP() 00032 00033 // IMgaReference 00034 public: 00035 STDMETHOD(get_Referred)(IMgaFCO * *pVal) { return inFCO->get_Referred(pVal); } 00036 STDMETHOD(put_Referred)(IMgaFCO * newVal) { return inFCO->put_Referred(newVal); } 00037 STDMETHOD(get_RefAspect)(IMgaMetaAspect **pVal) { return inFCO->get_RefAspect(pVal); } 00038 STDMETHOD(put_RefAspect)(IMgaMetaAspect * newVal) { return inFCO->put_RefAspect(newVal); } 00039 STDMETHOD(get_UsedByConns)(IMgaConnPoints **pVal) { return inFCO->get_UsedByConns(pVal); } 00040 STDMETHOD(CompareToBase)(short *status) { return inFCO->RefCompareToBase(status); } 00041 STDMETHOD(RevertToBase)() { return inFCO->RefRevertToBase(); } 00042 STDMETHOD(ClearRef)() { return inFCO->put_Referred( 0); } 00043 }; 00044 00045 class putreftask : public DeriveTreeTask { 00046 bool Do(CoreObj self, std::vector<CoreObj> *peers = NULL); 00047 public: 00048 // isext is true if the relation is sure to be external, false if not known 00049 putreftask(bool isext) { 00050 masterattr = ATTRID_MASTEROBJ; 00051 if (isext) { 00052 endreserve = 1; 00053 } 00054 }; 00055 }; 00056 00057 #endif //__MGAREFERENCE_H_