From c29824b389c6c530cb41eb71380b3c1c7af2cb99 Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Thu, 20 Mar 2014 05:55:57 +0000 Subject: [PATCH] AccumulatedLines are now cleared after LoadDatabase/LoadDatabaseString/RunFile/RunString. git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8583 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- IPhreeqc.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/IPhreeqc.cpp b/IPhreeqc.cpp index 8143592f..daefd925 100644 --- a/IPhreeqc.cpp +++ b/IPhreeqc.cpp @@ -727,6 +727,9 @@ int IPhreeqc::RunAccumulated(void) static const char *sz_routine = "RunAccumulated"; try { + // DON'T clear accumulated (just set + // flag to on next AccumulateLine) + // these may throw this->open_output_files(sz_routine); this->check_database(sz_routine); @@ -770,6 +773,11 @@ int IPhreeqc::RunFile(const char* filename) static const char *sz_routine = "RunFile"; try { + // clear accumulated + // + this->ClearAccumulatedLines(); + this->ClearAccumulated = false; + // these may throw this->open_output_files(sz_routine); this->check_database(sz_routine); @@ -820,6 +828,11 @@ int IPhreeqc::RunString(const char* input) static const char *sz_routine = "RunString"; try { + // clear accumulated + // + this->ClearAccumulatedLines(); + this->ClearAccumulated = false; + // these may throw this->open_output_files(sz_routine); this->check_database(sz_routine); @@ -994,6 +1007,11 @@ void IPhreeqc::UnLoadDatabase(void) this->UpdateComponents = true; this->Components.clear(); + // clear accumulated + // + this->ClearAccumulatedLines(); + this->ClearAccumulated = false; + // clear error state // ASSERT(this->ErrorReporter); @@ -1074,6 +1092,7 @@ int IPhreeqc::EndRow(void) void IPhreeqc::check_database(const char* sz_routine) { this->ErrorReporter->Clear(); + this->WarningReporter->Clear(); std::map< int, CSelectedOutput* >::iterator it = this->SelectedOutputMap.begin(); for (; it != this->SelectedOutputMap.end(); ++it)