1 #ifndef MSP_DATAFILE_BINARYWRITER_H_
2 #define MSP_DATAFILE_BINARYWRITER_H_
7 #include "writermode.h"
13 Writes data in binary format.
15 class BinaryWriter: public WriterMode
18 typedef std::map<StatementKey, int> Dictionary;
19 typedef std::map<std::string, unsigned> StringMap;
25 unsigned float_precision;
28 BinaryWriter(Output &o);
30 virtual void set_float_precision(unsigned);
31 virtual void write(const Statement &st);
33 void write_(const Statement &st);
34 void collect_keywords(const Statement &st);
35 void write_int(IntType::Store n);
36 void write_string(const StringType::Store &s);
37 void write_float(FloatType::Store f);
38 void write_symbol(const SymbolType::Store &s);
41 } // namespace DataFile