3 This file is part of libmspdatafile
4 Copyright © 2007-2008, 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_DATAFILE_BINARYWRITER_H_
9 #define MSP_DATAFILE_BINARYWRITER_H_
12 #include "binarydict.h"
13 #include "writermode.h"
19 Writes data in binary format.
21 class BinaryWriter: public WriterMode
24 typedef std::map<DictEntry, unsigned> Dictionary;
25 typedef std::map<std::string, unsigned> StringMap;
33 BinaryWriter(IO::Base &o);
34 void write(const Statement &st);
36 void write_(const Statement &st);
37 void collect_keywords(const Statement &st);
38 void write_int(long long n);
39 void write_string(const std::string &s);
40 void write_float(float f);
41 void write_enum(const std::string &e);
44 } // namespace DataFile