[GME-commit] GMESRC/GME/Mga MgaLibRefr.cpp,1.6,1.7
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Feb 21 16:17:43 CST 2007
Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv29219
Modified Files:
MgaLibRefr.cpp
Log Message:
>From now on Derived ConnRoles will be attached to base ConnRoles during Refresh operation.
(As they were tied together by the traditional gme connection inheritance mechanism.)
In the XML dump more than 2 connroles should never show up anymore, furthermore in case of derived connections connroles should not be dumped in the first place (based on ConnCompareToBase's result.)
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaLibRefr.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibRefr.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MgaLibRefr.cpp 12 Feb 2007 18:24:30 -0000 1.6
--- MgaLibRefr.cpp 21 Feb 2007 22:17:41 -0000 1.7
***************
*** 2674,2677 ****
--- 2674,2698 ----
//else if( ai == ATTRID_REGNOWNER) { } // attachment provides the propagation
//else if( ai == ATTRID_CONSTROWNER) { } // automatically
+ if(ai == ATTRID_CONNROLE) {
+ // ConnRoles also depend on their base with ATTRID_MASTEROBJ
+ // that's how a derived connections will be compared by
+ // ConnCompareToBase to its base.
+ // Thus the connroles will not be dumped into XML for derived conns
+ CoreObjs roles = p_derdObj[ai + ATTRID_COLLECTION];
+ ITERATE_THROUGH( roles) {
+ CComBSTR n = ITER[ATTRID_NAME];
+ CoreObj outer_ITER = ITER;
+ ITERATE_THROUGH( p_baseObj[ai + ATTRID_COLLECTION]) {
+ CComBSTR in = ITER[ATTRID_NAME];
+ if( n == in)
+ {
+ // almost similar to calling AttachDerObjs( ITER, outer_ITER, ...)
+ // but simpler
+ outer_ITER[ATTRID_MASTEROBJ] = ITER;
+ break;
+ }
+ }
+ }
+ }
if(ai == ATTRID_FCOPARENT) {
More information about the GME-commit
mailing list