[GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep Sheet.cpp,1.8,1.9

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Sep 22 18:08:21 CDT 2004


Update of /var/lib/gme/GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
In directory braindrain:/tmp/cvs-serv17751/Rep

Modified Files:
	Sheet.cpp 
Log Message:
Checking the generated paradigm's name for validity (should not contain spaces).


CVS User: zolmol

Index: Sheet.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep/Sheet.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Sheet.cpp	30 Jul 2004 00:10:23 -0000	1.8
--- Sheet.cpp	22 Sep 2004 22:08:18 -0000	1.9
***************
*** 154,157 ****
--- 154,169 ----
  	m_projAuthor = project->getAuthor();
  	m_projComment = project->getComment();
+ 
+ 	// check the paradigm's name
+ 	int pos = m_projName.find(' ');
+ 	if( pos != std::string::npos)
+ 	{
+ 		global_vars.err << MSG_ERROR << "Error: Incorrect paradigm name: \"" << m_projName << "\". Please remove the spaces.\n";
+ 		while( pos != std::string::npos)
+ 		{
+ 			m_projName[ pos] = '_';
+ 			pos = m_projName.find(' ', pos); // search for the next space starting from the last one
+ 		}
+ 	}
  }
  



More information about the GME-commit mailing list