X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinarywriter.h;h=c3a2b4c96d082b8ef42a642bc2866352a2307750;hb=d84673be1c2fe8bd32ddaa7877529855cad6daa0;hp=cf8f9fcaa016c35bfedb9172a6c0c76c940b00d5;hpb=27630d44298cb67e075c166f4421288cc8ca117e;p=libs%2Fdatafile.git diff --git a/source/binarywriter.h b/source/binarywriter.h index cf8f9fc..c3a2b4c 100644 --- a/source/binarywriter.h +++ b/source/binarywriter.h @@ -15,19 +15,22 @@ Distributed under the LGPL namespace Msp { namespace DataFile { +/** +Writes data in binary format. +*/ class BinaryWriter: public WriterMode { private: typedef std::map Dictionary; - typedef std::map EnumMap; + typedef std::map StringMap; Dictionary dict; - unsigned next_st_id; - EnumMap enums; - unsigned next_enum_id; + unsigned next_kwd_id; + StringMap strings; + unsigned next_str_id; public: - BinaryWriter(std::ostream &o); + BinaryWriter(IO::Base &o); void write(const Statement &st); private: void write_(const Statement &st);