[Avida-SVN] r3197 - development/source/analyze

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Fri Mar 27 14:32:18 PDT 2009


Author: brysonda
Date: 2009-03-27 17:32:17 -0400 (Fri, 27 Mar 2009)
New Revision: 3197

Modified:
   development/source/analyze/cAnalyze.cc
   development/source/analyze/cAnalyze.h
Log:
Add CLOSE_FILE command to analyze mode that should allow for open files in the data file manager to be closed.  This should be useful for instances where scripts are creating lots of unique files using commands that support reentrant usage, such as DETAIL_AVERAGE for example.  

Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc	2009-03-27 01:26:11 UTC (rev 3196)
+++ development/source/analyze/cAnalyze.cc	2009-03-27 21:32:17 UTC (rev 3197)
@@ -8474,6 +8474,12 @@
   }
 }
 
+void cAnalyze::CloseFile(cString cur_string)
+{
+  m_world->GetDataFileManager().Remove(cur_string.PopWord());
+}
+
+
 void cAnalyze::PrintStatus(cString cur_string)
 {
   // No Args needed...
@@ -9296,6 +9302,7 @@
   AddLibraryDef("RECALCULATE", &cAnalyze::BatchRecalculate);
   AddLibraryDef("RECALC", &cAnalyze::BatchRecalculateWithArgs);
   AddLibraryDef("RENAME", &cAnalyze::BatchRename);
+  AddLibraryDef("CLOSE_FILE", &cAnalyze::CloseFile);
   AddLibraryDef("STATUS", &cAnalyze::PrintStatus);
   AddLibraryDef("ECHO", &cAnalyze::PrintDebug);
   AddLibraryDef("DEBUG", &cAnalyze::PrintDebug);

Modified: development/source/analyze/cAnalyze.h
===================================================================
--- development/source/analyze/cAnalyze.h	2009-03-27 01:26:11 UTC (rev 3196)
+++ development/source/analyze/cAnalyze.h	2009-03-27 21:32:17 UTC (rev 3197)
@@ -316,6 +316,7 @@
   void BatchRecalculate(cString cur_string);
   void BatchRecalculateWithArgs(cString cur_string);
   void BatchRename(cString cur_string);
+  void CloseFile(cString cur_string);
   void PrintStatus(cString cur_string);
   void PrintDebug(cString cur_string);
   void PrintTestInfo(cString cur_string);




More information about the Avida-cvs mailing list