3 This file is part of libmspdatafile
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_DATAFILE_PARSER_H_
9 #define MSP_DATAFILE_PARSER_H_
22 Frontend for loading datafiles. Handles switching between text and binary
23 formats. A Parser evaluates into a boolean value indicating whether more
24 statements may be read.
35 Parser(IO::Base &i, const std::string &s);
39 Reads a statement from the input. If the end of input was reached, an empty
40 invalid statement will be returned. If an error occurs, the parser will be
41 marked as bad and no more statements may be read, even if the exception was
46 operator bool() const { return good && in; }
49 } // namespace DataFile