Ajout d'une méthode fileExport à moVectorMonitor. Encore un bout.

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1798 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2010-05-07 09:23:52 +00:00
commit 6d55b78321
3 changed files with 39 additions and 1 deletions

View file

@ -157,6 +157,27 @@ public:
return eotVec.size();
}
/**
* to export the vector of values into one file
* @param _filename file name
*/
void fileExport(std::string _filename) {
// create file
ofstream os(_filename.c_str());
if (!os) {
string str = "moVectorMonitor: Could not open " + _filename;
throw runtime_error(str);
}
for(unsigned int i = 0; i < size(); i++) {
os << getValue(i);
os << std::endl ;
}
}
/**
* @return name of the class
*/