]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/binarywriter.h
Add reverse name lookup to Collection
[libs/datafile.git] / source / binarywriter.h
index cf8f9fcaa016c35bfedb9172a6c0c76c940b00d5..c3a2b4c96d082b8ef42a642bc2866352a2307750 100644 (file)
@@ -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<DictEntry, unsigned> Dictionary;
-       typedef std::map<std::string, unsigned> EnumMap;
+       typedef std::map<std::string, unsigned> 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);