Add a param in fileExport method in moVectorMonitor to be able to write at the end of the file
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1940 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
e91516ba50
commit
c8898b5c1d
1 changed files with 158 additions and 150 deletions
|
|
@ -169,10 +169,18 @@ public:
|
||||||
/**
|
/**
|
||||||
* to export the vector of values into one file
|
* to export the vector of values into one file
|
||||||
* @param _filename file name
|
* @param _filename file name
|
||||||
|
* @param _openFile to specify if it writes at the following of the file
|
||||||
*/
|
*/
|
||||||
void fileExport(std::string _filename) {
|
void fileExport(std::string _filename, bool _openFile=false) {
|
||||||
// create file
|
// create file
|
||||||
std::ofstream os(_filename.c_str());
|
std::ofstream os;
|
||||||
|
|
||||||
|
if(! _openFile)
|
||||||
|
os.open(_filename.c_str());
|
||||||
|
|
||||||
|
else
|
||||||
|
os.open(_filename.c_str(),std::ios::app);
|
||||||
|
|
||||||
|
|
||||||
if (!os) {
|
if (!os) {
|
||||||
std::string str = "moVectorMonitor: Could not open " + _filename;
|
std::string str = "moVectorMonitor: Could not open " + _filename;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue