1 #pragma once
2 
3 #include <cstdio>
4 #include <memory>
5 #include <string>
6 
7 #include "MaeParserConfig.hpp"
8 
9 namespace schrodinger
10 {
11 namespace mae
12 {
13 
14 class Block;
15 
16 class EXPORT_MAEPARSER Writer
17 {
18   private:
19     std::shared_ptr<std::ostream> m_out = nullptr;
20 
21     void write_opening_block();
22 
23   public:
24     Writer() = delete;
25     explicit Writer(const std::string& fname);
26     Writer(std::shared_ptr<std::ostream> stream);
27 
28     void write(const std::shared_ptr<Block>& block);
29 };
30 
31 } // namespace mae
32 } // namespace schrodinger
33