]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/input.h
Add files
[libs/datafile.git] / source / input.h
diff --git a/source/input.h b/source/input.h
new file mode 100644 (file)
index 0000000..12d3eff
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+This file is part of libmspparser
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+#ifndef MSP_PARSER_INPUT_H_
+#define MSP_PARSER_INPUT_H_
+
+#include <istream>
+
+namespace Msp {
+namespace Parser {
+
+class Input
+{   
+public:
+       Input(std::istream &); 
+       int get();
+       int peek();
+       unsigned get_line_number() const { return line; }
+       operator bool() const { return (bool)in; }
+private:
+       std::istream &in;
+       unsigned line;
+       int next;
+};  
+
+} // namespace Parser
+} // namespace Msp
+
+#endif