forked from schrodinger/maeparser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWriter.hpp
More file actions
34 lines (25 loc) · 694 Bytes
/
Writer.hpp
File metadata and controls
34 lines (25 loc) · 694 Bytes
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
30
31
32
33
34
#pragma once
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <cstdio>
#include <string>
#include "MaeParserConfig.hpp"
namespace schrodinger
{
namespace mae
{
class Block;
class EXPORT_MAEPARSER Writer
{
private:
std::shared_ptr<boost::iostreams::filtering_ostreambuf> m_gzip_stream;
std::shared_ptr<boost::iostreams::gzip_compressor> m_gzip_compressor;
std::shared_ptr<std::ostream> m_out;
void write_opening_block();
public:
Writer(std::shared_ptr<std::ostream> stream);
Writer(std::string fname);
void write(const std::shared_ptr<Block>& block);
};
} // namespace mae
} // namespace schrodinger