1
2
3
4
5
6 #ifndef CMAJOR_SYMBOLS_SYMBOL_WRITER_INCLUDED
7 #define CMAJOR_SYMBOLS_SYMBOL_WRITER_INCLUDED
8 #include <cmajor/symbols/SymbolsApi.hpp>
9 #include <sngcm/ast/AstWriter.hpp>
10
11 namespace cmajor { namespace symbols {
12
13 using namespace sngcm::ast;
14
15 class Symbol;
16
17 class SymbolWriter
18 {
19 public:
20 SymbolWriter(const std::string& fileName_);
21 AstWriter& GetAstWriter() { return astWriter; }
22 BinaryWriter& GetBinaryWriter() { return astWriter.GetBinaryWriter(); }
23 void Write(Symbol* symbol);
24 void SetLexers(std::std::vector<soulng::lexer::Lexer*>*lexers_);
25 void SetSpanConversionModuleId(const boost::uuids::uuid& spanConversionModuleId_);
26 private:
27 AstWriter astWriter;
28 boost::uuids::uuid spanConversionModuleId;
29 std::std::vector<soulng::lexer::Lexer*>*lexers;
30 };
31
32 } }
33
34 #endif // CMAJOR_SYMBOLS_SYMBOL_WRITER_INCLUDED