GME  13
MgaMetaFCO.h
Go to the documentation of this file.
00001 
00002 #ifndef MGA_MGAMETAFCO_H
00003 #define MGA_MGAMETAFCO_H
00004 
00005 #ifndef MGA_MGAMETABASE_H
00006 #include "MgaMetaBase.h"
00007 #endif
00008 
00009 // --------------------------- CMgaMetaFCO
00010 
00011 class ATL_NO_VTABLE CMgaMetaFCO :
00012         public CMgaMetaBase
00013 {
00014 public:
00015         static HRESULT get_AttributeByName(IMgaMetaFCO *me, BSTR name, IMgaMetaAttribute **p);
00016         static HRESULT get_AttributeByRef(IMgaMetaFCO *me, metaref_type mref, IMgaMetaAttribute **p);
00017 
00018         static HRESULT get_DefinedAttributeByName(IMgaMetaFCO *me, BSTR name, 
00019                 VARIANT_BOOL inscope, IMgaMetaAttribute **p);
00020 
00021         static void Traverse(CMgaMetaProject *metaproject, CCoreObjectPtr &me);
00022         static HRESULT get_AliasingEnabled(IMgaMetaFCO *me, VARIANT_BOOL *pVal);
00023         static HRESULT put_AliasingEnabled(IMgaMetaFCO *me, VARIANT_BOOL newVal);
00024 };
00025 
00026 // --------------------------- DECLARE
00027 
00028 #define DECLARE_MGAMETAFCO() \
00029 DECLARE_MGAMETABASE() \
00030 \
00031 public: \
00032         STDMETHOD(get_DefinedIn)(IMgaMetaBase **p) \
00033         { return ComGetPointerValue(GetUnknown(), ATTRID_DEFFCO_PTR, p); } \
00034 \
00035         STDMETHOD(get_DefinedAttributes)(IMgaMetaAttributes **p) \
00036         { return ComGetSortedCollValue<IMgaMetaAttribute>(GetUnknown(), ATTRID_DEFATTR_PTR, p); } \
00037 \
00038         STDMETHOD(get_DefinedAttributeByName)(BSTR name, VARIANT_BOOL inscope, IMgaMetaAttribute **p) \
00039         { return CMgaMetaFCO::get_DefinedAttributeByName(this, name, inscope, p); } \
00040 \
00041         STDMETHOD(GetDefinedAttributeByNameDisp)(BSTR name, VARIANT_BOOL inscope, IMgaMetaAttribute **p) \
00042         { return get_DefinedAttributeByName( name, inscope, p); } \
00043 \
00044         STDMETHOD(get_UsedInRoles)(IMgaMetaRoles **p) \
00045         { return ComGetCollectionValue<IMgaMetaRole>(GetUnknown(), ATTRID_KIND_PTR, p); } \
00046 \
00047         STDMETHOD(get_UsedInFolders)(IMgaMetaFolders **p) \
00048         { return ComGetLinkCollectionValue<IMgaMetaFolder>(GetUnknown(), \
00049                 ATTRID_ROOTOBJLINK_OBJECT_PTR, ATTRID_ROOTOBJLINK_FOLDER_PTR, p); } \
00050 \
00051         STDMETHOD(get_Attributes)(IMgaMetaAttributes **p) \
00052         { return ComGetSortedLinkCollValue<IMgaMetaAttribute>(GetUnknown(), \
00053                 ATTRID_ATTRLINK_USEDIN_PTR, ATTRID_ATTRLINK_ATTR_PTR, p); } \
00054 \
00055         STDMETHOD(get_AttributeByName)(BSTR name, IMgaMetaAttribute **p) \
00056         { return CMgaMetaFCO::get_AttributeByName(this, name, p); } \
00057 \
00058         STDMETHOD(GetAttributeByNameDisp)(BSTR name, IMgaMetaAttribute **p) \
00059         { return get_AttributeByName( name, p); } \
00060 \
00061         STDMETHOD(get_AttributeByRef)(metaref_type mref, IMgaMetaAttribute **p) \
00062         { return CMgaMetaFCO::get_AttributeByRef(this, mref, p); } \
00063 \
00064         STDMETHOD(GetAttributeByRefDisp)(metaref_type mref, IMgaMetaAttribute **p) \
00065         { return get_AttributeByRef( mref, p); } \
00066 \
00067         STDMETHOD(DefineAttribute)(IMgaMetaAttribute **p) \
00068         { return ComDefineBase(this, METAID_METAATTRIBUTE, ATTRID_DEFATTR_PTR, p); } \
00069 \
00070         STDMETHOD(AddAttribute)(IMgaMetaAttribute *p) \
00071         { return ComAddLink(this, METAID_METAATTRLINK, ATTRID_ATTRLINK_USEDIN_PTR, \
00072                 ATTRID_ATTRLINK_ATTR_PTR, p); } \
00073 \
00074         STDMETHOD(RemoveAttribute)(IMgaMetaAttribute *p) \
00075         { return ComRemoveLink(this, METAID_METAATTRLINK, ATTRID_ATTRLINK_USEDIN_PTR, \
00076                 ATTRID_ATTRLINK_ATTR_PTR, p); }\
00077 \
00078         STDMETHOD(get_AliasingEnabled)(VARIANT_BOOL *pVal) \
00079         { return CMgaMetaFCO::get_AliasingEnabled(this, pVal); } \
00080 \
00081         STDMETHOD(put_AliasingEnabled)(VARIANT_BOOL newVal) \
00082         { return CMgaMetaFCO::put_AliasingEnabled(this, newVal); } 
00083 
00084 #endif//MGA_MGAMETAFCO_H