- definive fix of xml serialization

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@769 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-07-15 11:29:20 +00:00
parent 1ea164cb23
commit d26ee57e3c
3 changed files with 9 additions and 31 deletions

View file

@ -96,22 +96,18 @@ main(int argc, char** argv)
os2 << ends; // null terminated string
cout << "dump hist(t2) in print format into os2" << endl;
// int cmp = strcmp((const char *)os1.str(), (const char *)os2.str());
cout << "Comparing dump of hist(t1) and hist(t2): " << (os1.str()==os2.str()?"equals":"not equals") << endl;
// cout << "strcmp Comparing dump of hist(t1) and hist(t2): " << strcmp(os1.str().c_str(), os2.str().c_str()) << endl;
ConcreteHistory hist2;
xmlser.restore_snapshot(outfile, hist2);
cout << "create ConcreteHistory hist" << endl;
cout << "read XML data from file " << outfile << " and put into hist2(t3)"<< endl;
// cout << "history2 - copy of history " << endl;
dumpEnvironment(hist2.get_last_environment(), os3);
os3 << ends; // null terminated string
cout << "dump hist2(t3) in print format into os3" << endl;
cout << "Comparing dump of hist(t1) and hist2(t3): " << (os1.str()==os3.str()?"equals":"not equals") << endl;
// cout << "strcmp Comparing dump of hist(t1) and hist2(t3): " << strcmp(os1.str().c_str(), os3.str().c_str()) << endl;
xmlser.restore_snapshot(outfile, hist);
cout << "read XML data from file " << outfile << " and put into hist(t4)"<< endl;
@ -121,29 +117,6 @@ main(int argc, char** argv)
cout << "dump hist(t3) in print format into os4" << endl;
cout << "Comparing dump of hist(t1) and hist(t4): " << (os1.str()==os4.str()?"equals":"not equals") << endl;
// cout << "strcmp Comparing dump of hist(t1) and hist(t4): " << strcmp(os1.str().c_str(), os4.str().c_str()) << endl;
/*
cout << "************ REDUMP..." << endl;
cout << os1.str() << endl << "**********" << endl;
cout << "************ REDUMP..." << endl;
cout << os2.str() << endl << "**********" << endl;
cout << "************ REDUMP..." << endl;
cout << os3.str() << endl << "**********" << endl;
cout << "************ REDUMP..." << endl;
cout << os4.str() << endl << "**********" << endl;
cout << "strcmp 1 e 1 " << strcmp(os1.str().c_str(), os1.str().c_str()) << endl;
cout << "strcmp 1 e 2 " << strcmp(os1.str().c_str(), os2.str().c_str()) << endl;
cout << "strcmp 1 e 3 " << strcmp(os1.str().c_str(), os3.str().c_str()) << endl;
cout << "strcmp 1 e 4 " << strcmp(os1.str().c_str(), os4.str().c_str()) << endl;
cout << "strcmp 2 e 3 " << strcmp(os2.str().c_str(), os3.str().c_str()) << endl;
cout << "strcmp 2 e 4 " << strcmp(os2.str().c_str(), os4.str().c_str()) << endl;
cout << "strcmp 3 e 4 " << strcmp(os3.str().c_str(), os4.str().c_str()) << endl;
// typedef std::vector<Process*> Processes;
*/
int ret = 1;
if(os1.str()!=os2.str()