bpp-popgen3  3.0.0
AbstractODataSet.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include "AbstractODataSet.h"
6 
7 using namespace bpp;
8 
9 // From STL
10 #include <fstream>
11 
12 using namespace std;
13 
15 
16 void AbstractODataSet::write(const string& path, const DataSet& data_set, bool overwrite) const
17 {
18  ofstream output(path.c_str(), overwrite ? (ios::out) : (ios::out | ios::app));
19  write(output, data_set);
20  output.close();
21 }
virtual void write(std::ostream &os, const DataSet &data_set) const =0
Write a DataSet on ostream.
The DataSet class.
Definition: DataSet.h:37