#define MSP_DATAFILE_BINARYWRITER_H_
#include <map>
-#include "binarydict.h"
+#include "statement.h"
#include "type.h"
#include "writermode.h"
class BinaryWriter: public WriterMode
{
private:
- typedef std::map<DictEntry, unsigned> Dictionary;
+ typedef std::map<StatementKey, int> Dictionary;
typedef std::map<std::string, unsigned> StringMap;
Dictionary dict;
- unsigned next_kwd_id;
+ unsigned next_kwd_id = 1;
StringMap strings;
- unsigned next_str_id;
+ unsigned next_str_id = 1;
+ unsigned float_precision = 32;
public:
- BinaryWriter(IO::Base &o);
+ BinaryWriter(Output &o);
- virtual void write(const Statement &st);
+ void set_float_precision(unsigned) override;
+ void write(const Statement &st) override;
private:
void write_(const Statement &st);
void collect_keywords(const Statement &st);