[commit] r1451 - trunk/Paradigms/MetaGME/BONExtender/Rep

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jul 28 11:51:10 CDT 2011


Author: ksmyth
Date: Thu Jul 28 11:51:10 2011
New Revision: 1451

Log:
Remove dead code

Modified:
   trunk/Paradigms/MetaGME/BONExtender/Rep/Dumper.cpp

Modified: trunk/Paradigms/MetaGME/BONExtender/Rep/Dumper.cpp
==============================================================================
--- trunk/Paradigms/MetaGME/BONExtender/Rep/Dumper.cpp	Thu Jul 28 11:50:51 2011	(r1450)
+++ trunk/Paradigms/MetaGME/BONExtender/Rep/Dumper.cpp	Thu Jul 28 11:51:10 2011	(r1451)
@@ -508,137 +508,6 @@
 	finiOutFiles( sorted);
 }
 
-#if(0)
-bool Dumper::checkAll()
-{
-	bool res = true;
-
-	bool res1 = checkAllFCOs();
-	bool res2 = checkOrphanAttributes();
-	res = res && res1 && res2;
-	return res;
-}
-
-
-bool Dumper::checkOrphanAttributes()
-{
-	bool res = true;
-	AttributeRep_Iterator it = m_attributeList.begin();
-	for( ; it != m_attributeList.end(); ++it)
-	{
-		if ((*it)->hasAnyOwner() < 1 && !(*it)->isGlobal())
-		{
-			res = false;
-			global_vars.err << "CHECK: \"" << (*it)->getName() << "\" local scope attribute not owned by any FCO.\n";
-		}
-	}
-	return res;
-}
-
-
-//checks those elements which don't have parents
-bool Dumper::checkAllFCOs()
-{
-	bool res = true;
-	{FcoRep_Iterator it0( m_fcoRepList.begin());
-	for( ; it0 != m_fcoRepList.end(); ++it0 )
-	{
-		/*if (!(*it0)->checkInheritance()) these kinds always have different descendants
-			res = false;*/
-		if (!(*it0)->isAbstract()) 
-		{ 
-			global_vars.err << "CHECK: FCO \"" << (*it0)->getName() << "\" should be abstract.\n";
-			res = false; 
-		}
-		if (!(*it0)->isAbstract() && !(*it0)->checkIsPartOfFinal()) 
-		{ 
-			global_vars.err << "CHECK: FCO \"" << (*it0)->getName() << "\" is not part of any model, so it doesn't have any role.\n"; 
-			res = false; 
-		}
-	}}
-
-	{AtomRep_Iterator it1 = m_atomList.begin();
-	for( ; it1 != m_atomList.end(); ++it1 )
-	{
-		if (!(*it1)->checkInheritance())
-			res = false;
-		if (!(*it1)->isAbstract() && !(*it1)->checkIsPartOfFinal()) 
-		{ 
-			global_vars.err << "CHECK: Atom \"" << (*it1)->getName() << "\" is not part of any model, so it doesn't have any role.\n"; 
-			res = false; 
-		}
-	}}
-
-	{ModelRep_Iterator it2 = m_modelList.begin();
-	for( ; it2 != m_modelList.end(); ++it2 )
-	{
-		if (!(*it2)->checkInheritance())
-			res = false;
-		res = res && (*it2)->check();
-		if (!(*it2)->isAbstract() && !(*it2)->checkIsPartOfFinal() && !m_rootFolder.isInRoot( *it2) && !findInFolders(*it2)) 
-		{ 
-			global_vars.err << "CHECK: Model \"" << (*it2)->getName() << "\" is not part of any model neither in the root folder nor any other folder, so it doesn't have any role.\n";
-			res = false;
-			//res = res; // this is an exception
-		}
-	}}
-
-	{ConnectionRep_Iterator it3 = m_connList.begin();
-	for( ; it3 != m_connList.end(); ++it3 )
-	{
-		if (!(*it3)->checkInheritance())
-			res = false;
-		res = res && (*it3)->checkConnectionTargets();
-		if (!(*it3)->isAbstract() && !(*it3)->checkIsPartOfFinal()) 
-		{ 
-			global_vars.err << "CHECK: Connection \"" << (*it3)->getName() << "\" is not part of any model, so it doesn't have any role.\n";
-			res = false;
-		}
-	}}
-
-	{SetRep_Iterator it4 = m_setList.begin();
-	for( ; it4 != m_setList.end(); ++it4 )
-	{
-		if (!(*it4)->checkInheritance())
-			res = false;
-		res = res && (*it4)->checkSetElements();
-		if (!(*it4)->isAbstract() && !(*it4)->checkIsPartOfFinal()) 
-		{ 
-			global_vars.err << "CHECK: Set \"" << (*it4)->getName() << "\" is not part of any model, so it doesn't have any role.\n"; 
-			res = false; 
-		}
-	}}
-
-	{ReferenceRep_Iterator it5 = m_refList.begin();
-	for( ; it5 != m_refList.end(); ++it5 )
-	{
-		if (!(*it5)->checkInheritance())
-			res = false;
-		if (!(*it5)->checkNotEmpty())
-		{
-			global_vars.err << "CHECK: Reference \"" << (*it5)->getName() << "\" is not referring to any fco.\n";
-			res = false;
-		}
-		else
-		{
-			if (!(*it5)->checkAllTheSameKind())
-			{
-				// removed on 2/25/2004
-				/*global_vars.err << "CHECK: Reference \"" << (*it5)->getName() << "\" is referring to more than one kind of fcos.\n"; 
-				res = false;*/
-			}
-			if (!(*it5)->isAbstract() && !(*it5)->checkIsPartOfFinal()) 
-			{ 
-				global_vars.err << "CHECK: Reference \"" << (*it5)->getName() << "\" is not part of any model, so it doesn't have any role.\n"; 
-				res = false; 
-			}
-		}
-	}}
-
-  return res;
-}
-#endif
-
 
 void Dumper::showMultipleInheritance()
 {


More information about the gme-commit mailing list