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
This commit is contained in:
Scott R Charlton 2014-03-20 05:55:57 +00:00
parent 7dc26ca743
commit c29824b389

View File

@ -727,6 +727,9 @@ int IPhreeqc::RunAccumulated(void)
static const char *sz_routine = "RunAccumulated"; static const char *sz_routine = "RunAccumulated";
try try
{ {
// DON'T clear accumulated (just set
// flag to on next AccumulateLine)
// these may throw // these may throw
this->open_output_files(sz_routine); this->open_output_files(sz_routine);
this->check_database(sz_routine); this->check_database(sz_routine);
@ -770,6 +773,11 @@ int IPhreeqc::RunFile(const char* filename)
static const char *sz_routine = "RunFile"; static const char *sz_routine = "RunFile";
try try
{ {
// clear accumulated
//
this->ClearAccumulatedLines();
this->ClearAccumulated = false;
// these may throw // these may throw
this->open_output_files(sz_routine); this->open_output_files(sz_routine);
this->check_database(sz_routine); this->check_database(sz_routine);
@ -820,6 +828,11 @@ int IPhreeqc::RunString(const char* input)
static const char *sz_routine = "RunString"; static const char *sz_routine = "RunString";
try try
{ {
// clear accumulated
//
this->ClearAccumulatedLines();
this->ClearAccumulated = false;
// these may throw // these may throw
this->open_output_files(sz_routine); this->open_output_files(sz_routine);
this->check_database(sz_routine); this->check_database(sz_routine);
@ -994,6 +1007,11 @@ void IPhreeqc::UnLoadDatabase(void)
this->UpdateComponents = true; this->UpdateComponents = true;
this->Components.clear(); this->Components.clear();
// clear accumulated
//
this->ClearAccumulatedLines();
this->ClearAccumulated = false;
// clear error state // clear error state
// //
ASSERT(this->ErrorReporter); ASSERT(this->ErrorReporter);
@ -1074,6 +1092,7 @@ int IPhreeqc::EndRow(void)
void IPhreeqc::check_database(const char* sz_routine) void IPhreeqc::check_database(const char* sz_routine)
{ {
this->ErrorReporter->Clear(); this->ErrorReporter->Clear();
this->WarningReporter->Clear();
std::map< int, CSelectedOutput* >::iterator it = this->SelectedOutputMap.begin(); std::map< int, CSelectedOutput* >::iterator it = this->SelectedOutputMap.begin();
for (; it != this->SelectedOutputMap.end(); ++it) for (; it != this->SelectedOutputMap.end(); ++it)