GME  13
MgaMetaConstraint.h
Go to the documentation of this file.
00001 
00002 #ifndef MGA_MGAMETACONSTRAINT_H
00003 #define MGA_MGAMETACONSTRAINT_H
00004 
00005 // --------------------------- CMgaMetaConstraint
00006 
00007 class ATL_NO_VTABLE CMgaMetaConstraint : 
00008         public CComObjectRootEx<CComSingleThreadModel>,
00009         public CComCoClass<CMgaMetaConstraint, &__uuidof(MgaMetaConstraint)>,
00010         public IDispatchImpl<IMgaMetaConstraint, &__uuidof(IMgaConstraint), &__uuidof(__MGAMetaLib)>
00011 {
00012 public:
00013         IUnknown *GetUnknown() const { return (IMgaMetaConstraint*)this; }
00014 
00015 DECLARE_REGISTRY_RESOURCEID(IDR_MGAMETACONSTRAINT)
00016 DECLARE_ONLY_AGGREGATABLE(CMgaMetaConstraint)
00017 
00018 BEGIN_COM_MAP(CMgaMetaConstraint)
00019         COM_INTERFACE_ENTRY(IMgaMetaConstraint)
00020         COM_INTERFACE_ENTRY2(IDispatch, IMgaMetaConstraint)
00021 END_COM_MAP()
00022 
00023 public:
00024         STDMETHOD(get_Name)(BSTR *p)
00025         { return ComGetAttrValue(GetUnknown(), ATTRID_NAME, p); }
00026 
00027         STDMETHOD(put_Name)(BSTR p)
00028         { return ComPutAttrValue(GetUnknown(), ATTRID_NAME, p); }
00029 
00030         STDMETHOD(get_DisplayedName)(BSTR *p)
00031         { return ComGetDisplayedName(GetUnknown(), ATTRID_DISPNAME, ATTRID_NAME, p); }
00032 
00033         STDMETHOD(put_DisplayedName)(BSTR p)
00034         { return ComPutAttrValue(GetUnknown(), ATTRID_DISPNAME, p); }
00035 
00036         STDMETHOD(get_Expression)(BSTR *p)
00037         { return ComGetAttrValue(GetUnknown(), ATTRID_CONSEXPR, p); }
00038 
00039         STDMETHOD(put_Expression)(BSTR p)
00040         { return ComPutAttrValue(GetUnknown(), ATTRID_CONSEXPR, p); }
00041 
00042         STDMETHOD(get_EventMask)(unsigned long *p)
00043         { return ComGetAttrValue(GetUnknown(), ATTRID_CONSMASK, (long *)p); }
00044 
00045         STDMETHOD(put_EventMask)(unsigned long p)
00046         { return ComPutAttrValue(GetUnknown(), ATTRID_CONSMASK, (long)p); }
00047 
00048         STDMETHOD(get_Depth)(constraint_depth_enum *p);
00049         STDMETHOD(put_Depth)(constraint_depth_enum p)
00050         { return ComPutAttrValue(GetUnknown(), ATTRID_CONSDEPTH, static_cast<long>(p)); }
00051 
00052         STDMETHOD(get_Priority)(long *p)
00053         { return ComGetAttrValue(GetUnknown(), ATTRID_CONSPRIORITY, p); }
00054 
00055         STDMETHOD(put_Priority)(long p)
00056         { return ComPutAttrValue(GetUnknown(), ATTRID_CONSPRIORITY, p); }
00057 
00058         STDMETHOD(get_Type)(constraint_type_enum *p);
00059         STDMETHOD(put_Type)(constraint_type_enum p)
00060         { return ComPutAttrValue(GetUnknown(), ATTRID_CONSTYPE, static_cast<long>(p)); }
00061 
00062         STDMETHOD(Remove)()
00063         { return ComDeleteObject(GetUnknown()); }
00064 
00065         STDMETHOD(SetDefinedForNamespace)( BSTR pStr);
00066         STDMETHOD(GetDefinedForNamespace)( BSTR *pStr);
00067 };
00068 
00069 #endif//MGA_MGAMETACONSTRAINT_H