X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinaryparser.h;h=b4fec6b4c9e681f6f635a7e348868d65097eddeb;hb=8955db30f9cd1c1566b349da29e669f065f84e36;hp=2cdfbbeaba296e919ff68abb92015eb2647fbf38;hpb=35d0da96bad97214376f18d15078e6d731e6f219;p=libs%2Fdatafile.git diff --git a/source/binaryparser.h b/source/binaryparser.h index 2cdfbbe..b4fec6b 100644 --- a/source/binaryparser.h +++ b/source/binaryparser.h @@ -4,6 +4,7 @@ #include #include "binarydict.h" #include "parsermode.h" +#include "type.h" namespace Msp { namespace DataFile { @@ -14,12 +15,13 @@ Parses data in binary format. class BinaryParser: public ParserMode { private: - typedef std::map Dictionary; + typedef std::map Dictionary; typedef std::map StringMap; Dictionary dict; StringMap strings; bool first; + unsigned float_precision; public: BinaryParser(Input &i, const std::string &s); @@ -27,11 +29,11 @@ public: virtual Statement parse(); private: Statement parse_statement(); - long long parse_int(); - float parse_float(); - std::string parse_string(); - bool parse_bool(); - std::string parse_enum(); + IntType::Store parse_int(); + FloatType::Store parse_float(); + StringType::Store parse_string(); + BoolType::Store parse_bool(); + SymbolType::Store parse_symbol(); }; } // namespace DataFile