GME  13
MgaMetaConnection.h
Go to the documentation of this file.
00001 
00002 #ifndef MGA_MGAMETACONNECTION_H
00003 #define MGA_MGAMETACONNECTION_H
00004 
00005 #ifndef MGA_MGAMETAFCO_H
00006 #include "MgaMetaFCO.h"
00007 #endif
00008 
00009 // --------------------------- CMgaMetaConnection
00010 
00011 class ATL_NO_VTABLE CMgaMetaConnection : 
00012         public CComCoClass<CMgaMetaConnection, &__uuidof(MgaMetaConnection)>,
00013         public CComObjectRootEx<CComSingleThreadModel>,
00014         public IDispatchImpl<IMgaMetaConnection, &__uuidof(IMgaMetaConnection), &__uuidof(__MGAMetaLib)>,
00015         public CMgaMetaFCO
00016 {
00017 public:
00018         IUnknown *GetUnknown() const { return (IMgaMetaConnection*)this; }
00019 
00020 DECLARE_REGISTRY_RESOURCEID(IDR_MGAMETACONNECTION)
00021 DECLARE_ONLY_AGGREGATABLE(CMgaMetaConnection)
00022 
00023 BEGIN_COM_MAP(CMgaMetaConnection)
00024         COM_INTERFACE_ENTRY(IMgaMetaConnection)
00025         COM_INTERFACE_ENTRY(IMgaMetaFCO)
00026         COM_INTERFACE_ENTRY2(IMgaMetaBase, CMgaMetaBase)
00027         COM_INTERFACE_ENTRY2(IDispatch, IMgaMetaConnection)
00028 END_COM_MAP()
00029 
00030 DECLARE_MGAMETAFCO()
00031 
00032 public:
00033         STDMETHOD(get_Joints)(IMgaMetaConnJoints **p)
00034         { return ComGetCollectionValue<IMgaMetaConnJoint>(GetUnknown(), ATTRID_CONNJOINTS_COLL, p); }
00035 
00036         STDMETHOD(CheckPaths)(BSTR paths, VARIANT_BOOL *p);
00037 
00038         STDMETHOD(get_IsSimple)(VARIANT_BOOL *p)
00039         {
00040                 CHECK_OUT(p);
00041 
00042                 *p = VARIANT_TRUE;
00043                 return S_OK;
00044         }
00045 
00046 // ------- Edit
00047 
00048 public:
00049         STDMETHOD(CreateJoint)(IMgaMetaConnJoint **p);
00050 
00051 // ------- Methods
00052 
00053 public:
00054         static void Traverse(CMgaMetaProject *metaproject, CCoreObjectPtr &me);
00055         static bool CheckPaths(CCoreObjectPtr &self, jointpaths_type jointpaths);
00056 
00057 };
00058 
00059 #endif//MGA_MGAMETACONNECTION_H