GME
13
|
00001 // MgaConstraint.cpp : Implementation of CMgaConstraint 00002 00003 #include "StdAfx.h" 00004 #include "MgaFCO.h" 00005 #include "MgaConstraint.h" 00006 00008 // CMgaConstraint 00009 00010 00011 HRESULT FCO::DefineConstraint(BSTR name, long eventmask, BSTR expression, IMgaConstraint **pp) { 00012 COMTRY { 00013 CheckWrite(); 00014 // CoreObj cp(p); 00015 // cp[ATTRID_CONSTROWNER] = self; 00016 } COMCATCH(;); 00017 } 00018 00019 00020 HRESULT FCO::AddConstraint(struct IMgaConstraint *p) { 00021 COMTRY { 00022 CheckWrite(); 00023 #pragma message ( "TODO: Object-based constraints are not implemented!" ) 00024 // CoreObj cp(p); 00025 // cp[ATTRID_CONSTROWNER] = self; 00026 } COMCATCH(;); 00027 } 00028 00029 00030 HRESULT FCO::get_Constraints(VARIANT_BOOL includemeta, IMgaConstraints **pVal) { 00031 COMTRY { 00032 CheckRead(); 00033 CHECK_OUTPTRPAR(pVal); 00034 CoreObjs children = self[ATTRID_CONSTROWNER + ATTRID_COLLECTION]; 00035 CREATECOLLECTION_FOR(IMgaConstraint,q); 00036 00037 ITERATE_THROUGH(children) { 00038 CComPtr<IMgaConstraint> ff; 00039 #pragma message ( "TODO: Object-based constraints are not implemented!" ) 00040 // ITER->QueryInterface(&ff); 00041 q->Add(ff); 00042 } 00043 *pVal = q.Detach(); 00044 } COMCATCH(;); 00045 }; 00046 00047 00048 HRESULT FCO::CheckConstraints(long,int *,unsigned short ** ) { return E_MGA_NOT_IMPLEMENTED; };