X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinaryparser.h;h=e6735f2435a71c447450ecd58aacbf46342859be;hb=6653c7d83dbe1fe81a541a125be8bb808b234eb7;hp=26fa380e4e290b67c4172449a009cc47991b5efc;hpb=d84673be1c2fe8bd32ddaa7877529855cad6daa0;p=libs%2Fdatafile.git diff --git a/source/binaryparser.h b/source/binaryparser.h index 26fa380..e6735f2 100644 --- a/source/binaryparser.h +++ b/source/binaryparser.h @@ -1,16 +1,10 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_DATAFILE_BINARYPARSER_H_ #define MSP_DATAFILE_BINARYPARSER_H_ #include #include "binarydict.h" #include "parsermode.h" +#include "type.h" namespace Msp { namespace DataFile { @@ -21,24 +15,25 @@ 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); - Statement parse(); + + virtual Statement parse(bool); private: - Statement parse_statement(); - long long parse_int(); - float parse_float(); - std::string parse_string(); - bool parse_bool(); - std::string parse_enum(); - const std::string &lookup_string(unsigned) const; + Statement parse_statement(bool); + IntType::Store parse_int(); + FloatType::Store parse_float(); + StringType::Store parse_string(); + BoolType::Store parse_bool(); + SymbolType::Store parse_symbol(); }; } // namespace DataFile