[GME-commit] GMESRC/GME/Parser MgaParser.cpp,1.34,1.35
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Tue Oct 3 17:38:29 CDT 2006
Update of /project/gme-repository/GMESRC/GME/Parser
In directory escher:/tmp/cvs-serv32271
Modified Files:
MgaParser.cpp
Log Message:
Parsing projects failed if nested libraries were present. Fixed, by applying the readonly flags in proper order.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaParser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaParser.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** MgaParser.cpp 21 Jul 2006 16:50:51 -0000 1.34
--- MgaParser.cpp 3 Oct 2006 16:38:27 -0000 1.35
***************
*** 109,113 ****
COMTHROW( project->put_Preferences(project_prefs_orig) );
! for(librecords::iterator i = libstodo.begin(); i != libstodo.end(); i++) { // copied from ParseProject in order to recognize libraries (zolmol)
COMTHROW(i->f->put_LibraryName(CComBSTR(i->libname.c_str())));
COMTHROW(i->f->put_Exempt(VARIANT_FALSE));
--- 109,113 ----
COMTHROW( project->put_Preferences(project_prefs_orig) );
! for(librecords::reverse_iterator i = libstodo.rbegin(); i != libstodo.rend(); i++) { // copied from ParseProject in order to recognize libraries (zolmol)
COMTHROW(i->f->put_LibraryName(CComBSTR(i->libname.c_str())));
COMTHROW(i->f->put_Exempt(VARIANT_FALSE));
***************
*** 242,246 ****
COMTHROW( project->put_Preferences(project_prefs_orig) );
! for(librecords::iterator i = libstodo.begin(); i != libstodo.end(); i++) {
COMTHROW(i->f->put_LibraryName(CComBSTR(i->libname.c_str())));
COMTHROW(i->f->put_Exempt(VARIANT_FALSE));
--- 242,254 ----
COMTHROW( project->put_Preferences(project_prefs_orig) );
! // readonly flag and library name can't be applied if done in wrong order
! // because of the readonly flag is applied all way down the hierarchy
! // (preventing put_LibraryName for inner libs to succeed)
!
! // the order of libraries in libstodo is the sequential order as they appear
! // in the xme file (depth first traversal), thus if the vector is traversed
! // in reverse order (children libraries are always handled before their parent)
! // the libroot_flag and library_flag flags can be applied with success
! for(librecords::reverse_iterator i = libstodo.rbegin(); i != libstodo.rend(); i++) {
COMTHROW(i->f->put_LibraryName(CComBSTR(i->libname.c_str())));
COMTHROW(i->f->put_Exempt(VARIANT_FALSE));
More information about the GME-commit
mailing list