[Avida-SVN] r2250 - branches/uml/source/main
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Thu Jan 3 18:13:01 PST 2008
Author: hjg
Date: 2008-01-03 21:13:01 -0500 (Thu, 03 Jan 2008)
New Revision: 2250
Modified:
branches/uml/source/main/cTaskLib.cc
branches/uml/source/main/cUMLModel.cc
Log:
Fixed the naming of working files.
Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc 2008-01-04 00:57:58 UTC (rev 2249)
+++ branches/uml/source/main/cTaskLib.cc 2008-01-04 02:13:01 UTC (rev 2250)
@@ -3368,7 +3368,10 @@
// for the tasks to run on non-class 5 machines.
double cTaskLib::Task_ExportXMI(cTaskContext& ctx) const {
cOrganism* organism = ctx.getOrganism();
- std::string temp, file_name;
+ std::string temp;
+ std::string file_name;
+ std::ostringstream strstrm;
+
double bonus = 0.0;
temp = organism->getUMLModel()->getXMI();
@@ -3377,8 +3380,14 @@
// all are non-zero?
if (organism->getUMLModel()->readyForHydra()) {
// print the file to output...
- file_name = m_world->GetStats().GetUpdate() + "." + ctx.getOrganism()->GetID();
- organism->getUMLModel()->printUMLModelToFile(file_name);
+// file_name = "file1" + m_world->GetStats().GetUpdate();
+// file_name += "." + organism->GetID();
+// Commented out to remove overhead...
+ strstrm.clear();
+ strstrm << "working." << m_world->GetStats().GetUpdate() << "." << ctx.getOrganism()->GetID();
+ strstrm << ".xml";
+// if(system(strstrm.str().c_str())!=0) return 0.0;
+ organism->getUMLModel()->printUMLModelToFile(strstrm.str());
bonus = 1.0;
}
Modified: branches/uml/source/main/cUMLModel.cc
===================================================================
--- branches/uml/source/main/cUMLModel.cc 2008-01-04 00:57:58 UTC (rev 2249)
+++ branches/uml/source/main/cUMLModel.cc 2008-01-04 02:13:01 UTC (rev 2250)
@@ -394,8 +394,8 @@
{
// open outfile.
std::ofstream outfile;
-// outfile.open(file_name.c_str());
- outfile.open("out.xmi");
+ outfile.open(file_name.c_str());
+// outfile.open("out.xmi");
assert(outfile.is_open());
More information about the Avida-cvs
mailing list