GME  13
MgaSet.h
Go to the documentation of this file.
00001 // MgaSet.h : Declaration of the CMgaSet
00002 
00003 #ifndef __MGASET_H_
00004 #define __MGASET_H_
00005 
00006 #include "resource.h"       // main symbols
00007 #include "MgaFCO.h"
00008 
00010 // CMgaSet
00011 class ATL_NO_VTABLE CMgaSet : 
00012         public CComCoClass<CMgaSet, &__uuidof(MgaSet)>,
00013         public IMgaFCOImpl< 
00014                 CComObjectRootEx<CComSingleThreadModel>,
00015              IDispatchImpl<IMgaSet, &__uuidof(IMgaSet), &__uuidof(__MGALib)> >,
00016         public ISupportErrorInfoImpl<&__uuidof(IMgaSet)>
00017 {
00018 public:
00019         CMgaSet()
00020         {
00021         }
00022 
00023 
00024 DECLARE_PROTECT_FINAL_CONSTRUCT()
00025 
00026 BEGIN_COM_MAP(CMgaSet)
00027         COM_INTERFACE_ENTRY(IMgaSet)
00028         COM_INTERFACE_ENTRY_IID(__uuidof(IMgaFCO),IMgaSet)              
00029         COM_INTERFACE_ENTRY_IID(__uuidof(IMgaObject),IMgaSet)
00030         COM_INTERFACE_ENTRY_IID(IID_ISupportErrorInfo, IMyErrorInfoBase)
00031         COM_INTERFACE_ENTRY(IDispatch)
00032 END_COM_MAP()
00033 
00034 // IMgaSet
00035 public:
00036         STDMETHOD(RemoveMember)(IMgaFCO *member) { return inFCO->RemoveMember(member); };
00037         STDMETHOD(RemoveAll)()                   { return inFCO->SetRemoveAll(); };
00038         STDMETHOD(AddMember)(IMgaFCO *member) { return inFCO->AddMember(member); };
00039         STDMETHOD(get_Members)(IMgaFCOs * *pVal) { return inFCO->get_Members(pVal); };
00040         STDMETHOD(get_IsMember)(IMgaFCO *obj, VARIANT_BOOL *pVal) { return inFCO->get_IsMember(obj, pVal); };
00041         STDMETHOD(GetIsMemberDisp)(IMgaFCO *obj, VARIANT_BOOL *pVal) { return inFCO->get_IsMember(obj, pVal); };
00042         STDMETHOD(CompareToBase)(short *status)         { return inFCO->SetCompareToBase(NULL,status); }
00043     STDMETHOD(RevertToBase)()                                           { return inFCO->SetRevertToBase(NULL); }
00044 };
00045 
00046 
00047 
00048 class addmember : public DeriveTreeTask {
00049         bool Do(CoreObj self, std::vector<CoreObj> *peers = NULL);
00050 public:
00051         addmember(bool isext) { endreserve = isext ? 2:1; };
00052 };
00053 
00054 class removemember : public DeriveTreeTask {
00055         bool Do(CoreObj self, std::vector<CoreObj> *peers = NULL);
00056 };
00057 
00058 #endif //__MGASET_H_