m8
/
src
/
m8
/
writer.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef M8_WRITER_HH
#define M8_WRITER_HH
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
class Writer
{
public:
Writer();
~Writer();
void open(std::string const& file_name);
void write(std::string const& str);
void close();
void flush();
private:
std::string file_ext_ {".swp.m8"};
std::string file_name_;
std::string file_tmp_;
std::ofstream file_;
}; // class Writer
#endif // M8_WRITER_HH