]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/binaryparser.h
Add reverse name lookup to Collection
[libs/datafile.git] / source / binaryparser.h
index 560703c66ddb337791a98b7e72d8dc1c81262169..26fa380e4e290b67c4172449a009cc47991b5efc 100644 (file)
@@ -15,14 +15,17 @@ Distributed under the LGPL
 namespace Msp {
 namespace DataFile {
 
+/**
+Parses data in binary format.
+*/
 class BinaryParser: public ParserMode
 {
 private:
        typedef std::map<unsigned, DictEntry> Dictionary;
-       typedef std::map<unsigned, std::string> EnumMap;
+       typedef std::map<unsigned, std::string> StringMap;
 
        Dictionary dict;
-       EnumMap enums;
+       StringMap strings;
        bool first;
 
 public:
@@ -35,6 +38,7 @@ private:
        std::string parse_string();
        bool parse_bool();
        std::string parse_enum();
+       const std::string &lookup_string(unsigned) const;
 };
 
 } // namespace DataFile