]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/input.h
Use libmspio instead of C++ iostreams
[libs/datafile.git] / source / input.h
index e03dea1e839714e23416b8fed7fea7cb68f8ed97..eeb18407ec2848927cdef93507180987c71d4cbe 100644 (file)
@@ -7,7 +7,7 @@ Distributed under the LGPL
 #ifndef MSP_DATAFILE_INPUT_H_
 #define MSP_DATAFILE_INPUT_H_
 
-#include <istream>
+#include <msp/io/base.h>
 
 namespace Msp {
 namespace DataFile {
@@ -15,13 +15,13 @@ namespace DataFile {
 class Input
 {   
 public:
-       Input(std::istream &); 
+       Input(IO::Base &); 
        int get();
        int peek();
        unsigned get_line_number() const { return line; }
-       operator bool() const { return in; }
+       operator bool() const { return !in.eof(); }
 private:
-       std::istream &in;
+       IO::Base &in;
        unsigned line;
        int next;
 };