[GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension/Rep Sheet.cpp,1.11,1.12
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Feb 15 17:58:37 CST 2006
Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory escher:/tmp/cvs-serv923
Modified Files:
Sheet.cpp
Log Message:
JIRA bug (GME-124) fixed.
Order verifying was buggy.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: Sheet.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Sheet.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Sheet.cpp 3 Nov 2005 19:35:59 -0000 1.11
--- Sheet.cpp 15 Feb 2006 17:58:34 -0000 1.12
***************
*** 840,845 ****
bool Sheet::check( FCO::INHERITANCE_TYPE type, std::vector<FCO*>& res)
{
! int prev_level = -1;
! int prev_clique = -1;
std::vector<FCO*>::iterator it = res.begin();
--- 840,846 ----
bool Sheet::check( FCO::INHERITANCE_TYPE type, std::vector<FCO*>& res)
{
! // it will store the currently reached maximum level (the lowest level in
! // the inheritance tree) per each clique
! std::map< int, int> m_maxLevelPerClique;
std::vector<FCO*>::iterator it = res.begin();
***************
*** 849,859 ****
int curr_clique = (*it)->getCliqueId( type);
! if (curr_level < prev_level && prev_clique == curr_clique)
{
! // the order is bad if two elements from the same clique are not in good order
! return false;
}
- prev_level = curr_level;
- prev_clique = curr_clique;
}
return true;
--- 850,860 ----
int curr_clique = (*it)->getCliqueId( type);
! if( m_maxLevelPerClique.find( curr_clique) == m_maxLevelPerClique.end()) // not existing yet
! m_maxLevelPerClique[ curr_clique ] = curr_level;
! else // check if the current max level is less then the level found at *it
{
! if( curr_level < m_maxLevelPerClique[ curr_clique]) // an ancestor is after a descendant in the ordering
! return false; // not a good ordering from 'type' point of view
}
}
return true;
More information about the GME-commit
mailing list