GME  13
MgaMetaRole.h
Go to the documentation of this file.
00001 
00002 #ifndef MGA_MGAMETAROLE_H
00003 #define MGA_MGAMETAROLE_H
00004 
00005 #ifndef MGA_MGAMETABASE_H
00006 #include "MgaMetaBase.h"
00007 #endif
00008 
00009 // --------------------------- CMgaMetaRole
00010 
00011 class ATL_NO_VTABLE CMgaMetaRole : 
00012         public CComObjectRootEx<CComSingleThreadModel>,
00013         public CComCoClass<CMgaMetaRole, &__uuidof(MgaMetaRole)>,
00014         public IDispatchImpl<IMgaMetaRole, &__uuidof(IMgaMetaRole), &__uuidof(__MGAMetaLib)>,
00015         public CMgaMetaBase,
00016         public ISupportErrorInfo
00017 {
00018 public:
00019         IUnknown *GetUnknown() const { return (IMgaMetaRole*)this; }
00020 
00021 DECLARE_REGISTRY_RESOURCEID(IDR_MGAMETAROLE)
00022 DECLARE_ONLY_AGGREGATABLE(CMgaMetaRole)
00023 
00024 BEGIN_COM_MAP(CMgaMetaRole)
00025         COM_INTERFACE_ENTRY(IMgaMetaRole)
00026         COM_INTERFACE_ENTRY2(IMgaMetaBase, CMgaMetaBase)
00027         COM_INTERFACE_ENTRY2(IDispatch, IMgaMetaRole)
00028         COM_INTERFACE_ENTRY(ISupportErrorInfo)
00029 END_COM_MAP()
00030 
00031 DECLARE_MGAMETABASE()
00032 
00033         STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
00034         {
00035                 return (
00036                         IsEqualGUID(riid, __uuidof(IMgaMetaRole))
00037                         || IsEqualGUID(riid, __uuidof(IMgaMetaBase))
00038                         || IsEqualGUID(riid, __uuidof(IDispatch))
00039                         ) ? S_OK : S_FALSE;
00040         }
00041 
00042 public:
00043         STDMETHOD(get_ParentModel)(IMgaMetaModel **p)
00044         { return ComGetPointerValue(GetUnknown(), ATTRID_ROLES_COLL, p); }
00045 
00046         STDMETHOD(get_Parts)(IMgaMetaParts **p)
00047         { return ComGetCollectionValue<IMgaMetaPart>(
00048                 GetUnknown(), ATTRID_PARTROLE_PTR, p); }
00049 
00050         STDMETHOD(get_Kind)(IMgaMetaFCO **p)
00051         { return ComGetPointerValue(GetUnknown(), ATTRID_KIND_PTR, p); }
00052 
00053 // ------- Edit
00054 
00055 public:
00056 
00057 };
00058 
00059 #endif//MGA_MGAMETAROLE_H