[GME-commit]
GMESRC/Paradigms/MetaGME/MetaMAid RawComponent.cpp, 1.3, 1.4
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Aug 15 11:53:13 CDT 2007
Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/MetaMAid
In directory escher:/tmp/cvs-serv4247
Modified Files:
RawComponent.cpp
Log Message:
Another take on it. Prevent doing inheritance related modifications too in case of library objects.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: RawComponent.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/MetaMAid/RawComponent.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** RawComponent.cpp 15 Aug 2007 16:44:36 -0000 1.3
--- RawComponent.cpp 15 Aug 2007 16:53:11 -0000 1.4
***************
*** 174,177 ****
--- 174,184 ----
if( fco)
{
+ // library contained objects can't be modified !
+ // ( during library attach they may seem as newly created
+ // that's why they end up here, in the EVENT_CREATED branch )
+ VARIANT_BOOL libobj;
+ COMTHROW( fco->get_IsLibObject( &libobj));
+ if( libobj == VARIANT_TRUE) return S_OK;
+
CComPtr<IMgaMetaFCO> mmfco;
COMTHROW( fco->get_Meta( &mmfco));
***************
*** 182,189 ****
if( kind == L"FCO")
{
! VARIANT_BOOL var, lib;
COMTHROW( fco->get_BoolAttrByName( CComBSTR( L"IsAbstract"), &var));
! COMTHROW( fco->get_IsLibObject( &lib));
! if( var != VARIANT_TRUE && lib != VARIANT_TRUE) // not abstract yet AND not a lib object (readonly)
COMTHROW( fco->put_BoolAttrByName( CComBSTR( L"IsAbstract"), VARIANT_TRUE));
}
--- 189,195 ----
if( kind == L"FCO")
{
! VARIANT_BOOL var;
COMTHROW( fco->get_BoolAttrByName( CComBSTR( L"IsAbstract"), &var));
! if( var != VARIANT_TRUE) // not abstract yet
COMTHROW( fco->put_BoolAttrByName( CComBSTR( L"IsAbstract"), VARIANT_TRUE));
}
More information about the GME-commit
mailing list