[GME-commit]
GMESRC/GME/Mga MgaFolder.cpp,1.22,1.23 MgaSet.cpp,1.8,1.9
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Jul 14 15:30:17 CDT 2004
- Previous message: [GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
Dumper.cpp,1.20,1.21 Dumper.h,1.6,1.7
- Next message: [GME-commit]
GMESRC/GME/MgaUtil ClosureDlg.cpp,1.2,1.3 ClosureDlg.h,1.2,1.3
MakeClosure.cpp,1.2,1.3 MgaUtil.rc,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/GME/Mga
In directory braindrain:/tmp/cvs-serv10794/Mga
Modified Files:
MgaFolder.cpp MgaSet.cpp
Log Message:
Selective Closure
-makes possible restoring connections to library elements.
-library name matching based on short filenames
-parses libraries correctly (as libraries)
Mga.dtd file modified, more distinctive closure attributes used: "closurelib*"
-----
Mga::FCO::SetCompareToBase modified, checks the number of setmembers
MgaParser::StartSet corrected to erase members originating from the derivation process if the isbound attribute is false
CVS User: zolmol
Index: MgaFolder.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Mga/MgaFolder.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** MgaFolder.cpp 30 Jun 2004 17:50:47 -0000 1.22
--- MgaFolder.cpp 14 Jul 2004 19:30:14 -0000 1.23
***************
*** 427,436 ****
}
! //The FCO::get_ObjectByPath ignores all the time the leading '/'
! // search based on name: "/@MyFolder/@MySubFolder"
! // search based on id: "/id0065-00001/id0065-00014"
! // or "/#id0065-00001/#id0065-00014"
! //
! // the project name must not be included into the path
HRESULT FCO::get_ObjectByPath(BSTR path, IMgaObject ** pVal) {
COMTRY {
--- 427,457 ----
}
!
! // returns true if the short file names are equal
! // i.e. for the following strings 'true' is given back
! // MGA=C:\Program Files\gme\paradigms\SF\tmp2.mga
! // MGA=F:\Files\gm2e\paradigms2\mySF\tMp2.mGa
! // MGA=F:tMp2.MGA
! // MGA=tMp2.MGA
! bool libraryNameEqual( CComBSTR& n1, CComBSTR& n2)
! {
! n1.ToUpper(); n2.ToUpper();
! string s1, s2;
! CopyTo( n1, s1); CopyTo( n2, s2);
!
! // return false if both are not libraries
! if ( s1.find("MGA=") == string::npos || s2.find("MGA=") == string::npos) return false;
!
! int i1 = s1.length() - 1; while ( i1 >= 0 && s1[i1] != '\\' && s1[i1] != ':' && s1[i1] != '=') --i1; //int i1 = s1.rfind( '\\' || '=');
! int i2 = s2.length() - 1; while ( i2 >= 0 && s2[i2] != '\\' && s2[i2] != ':' && s2[i2] != '=') --i2; //int i2 = s2.rfind( '\\' || '=');
!
! if ( i1 >= 0) s1 = s1.substr( i1 + 1, s1.length() - i1 - 1);
! if ( i2 >= 0) s2 = s2.substr( i2 + 1, s2.length() - i2 - 1);
!
! return s1.compare( s2) == 0;
! }
!
! // The FCO::get_ObjectByPath ignores all the time the leading '/'
! // searches based on name: "/@MyFolder/@MySubFolder" (the project name must not be included)
HRESULT FCO::get_ObjectByPath(BSTR path, IMgaObject ** pVal) {
COMTRY {
***************
*** 441,445 ****
if(*p == '/') p++;
CComPtr<IMgaObject> pp;
! if(*p == '@') {
p++;
--- 462,466 ----
if(*p == '/') p++;
CComPtr<IMgaObject> pp;
! if(*p == '@') { // implemented by ZolMol
p++;
***************
*** 456,460 ****
ITERATE_THROUGH(children) {
CComBSTR n = ITER[ATTRID_NAME];
! if(n == name_b && !found)
{
if ( *p2 != 0)
--- 477,483 ----
ITERATE_THROUGH(children) {
CComBSTR n = ITER[ATTRID_NAME];
! bool similar = n == name_b;
! similar = similar || ITER[ATTRID_PERMISSIONS] == LIBROOT_FLAG && libraryNameEqual(n, name_b);
! if( similar && !found)
{
if ( *p2 != 0)
Index: MgaSet.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Mga/MgaSet.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MgaSet.cpp 11 Mar 2002 22:19:00 -0000 1.8
--- MgaSet.cpp 14 Jul 2004 19:30:14 -0000 1.9
***************
*** 144,158 ****
CoreObj base = self[ATTRID_DERIVED];
if(!base) COMTHROW(E_MGA_NOT_DERIVED);
! // CoreObjs bmembers = base[ATTRID_SETMEMBER + ATTRID_COLLECTION];
! // long diff = bmembers.Count();
CoreObjs members = self[ATTRID_SETMEMBER + ATTRID_COLLECTION];
*status = 1;
! CoreObj ca(a);
ITERATE_THROUGH(members) {
if(!CoreObj(ITER[ATTRID_MASTEROBJ])) {
! if(!ca || COM_EQUAL(ca, CoreObj(ITER[ATTRID_XREF]))) break;
}
}
! if(!ITER_BROKEN) *status = 0;
} COMCATCH(;);
}
--- 144,157 ----
CoreObj base = self[ATTRID_DERIVED];
if(!base) COMTHROW(E_MGA_NOT_DERIVED);
! CoreObjs bmembers = base[ATTRID_SETMEMBER + ATTRID_COLLECTION];
CoreObjs members = self[ATTRID_SETMEMBER + ATTRID_COLLECTION];
*status = 1;
! //CoreObj ca(a);
ITERATE_THROUGH(members) {
if(!CoreObj(ITER[ATTRID_MASTEROBJ])) {
! /*if(!ca || COM_EQUAL(ca, CoreObj(ITER[ATTRID_XREF])))*/ break; //commented by ZolMol since always true
}
}
! if( !ITER_BROKEN && members.Count() == bmembers.Count()) *status = 0; // by ZolMol: equal if & only if the self has only master objects and the # of the members is equal in the derived and the base set
} COMCATCH(;);
}
- Previous message: [GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
Dumper.cpp,1.20,1.21 Dumper.h,1.6,1.7
- Next message: [GME-commit]
GMESRC/GME/MgaUtil ClosureDlg.cpp,1.2,1.3 ClosureDlg.h,1.2,1.3
MakeClosure.cpp,1.2,1.3 MgaUtil.rc,1.37,1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list