ECF 1.5
FileDataWriter.cpp
1#include "FileDataWriter.h"
2#include <string>
3
4
5FileDataWriter::FileDataWriter(std::string &fileName)
6{
7 file.open(fileName.c_str());
8}
9
10
11FileDataWriter::~FileDataWriter()
12{
13 close();
14}
15
16
17void FileDataWriter::writeData(std::string &data)
18{
19 file << data;
20}
21
22
23void FileDataWriter::writeData(char data)
24{
25 file << data;
26}
27
28
29void FileDataWriter::writeData(double data)
30{
31 file << data;
32}
33
34
35void FileDataWriter::close()
36{
37 file.close();
38}