]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/input.h
Cosmetic changes
[libs/datafile.git] / source / input.h
index eeb18407ec2848927cdef93507180987c71d4cbe..6cc53e7af3674ee31fbd18bbff24e3d699830294 100644 (file)
@@ -1,29 +1,29 @@
-/* $Id$
-
-This file is part of libmspdatafile
-Copyright © 2006  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
 #ifndef MSP_DATAFILE_INPUT_H_
 #define MSP_DATAFILE_INPUT_H_
 
+#include <msp/core/noncopyable.h>
 #include <msp/io/base.h>
 
 namespace Msp {
 namespace DataFile {
 
-class Input
+class Input: private NonCopyable
 {   
+private:
+       IO::Base *in = nullptr;
+       IO::Base *compressed = nullptr;
+       unsigned line = 1;
+       int next = -1;
+
 public:
        Input(IO::Base &); 
+       ~Input();
+
+       void set_decompress();
        int get();
        int peek();
        unsigned get_line_number() const { return line; }
-       operator bool() const { return !in.eof(); }
-private:
-       IO::Base &in;
-       unsigned line;
-       int next;
+       explicit operator bool() const;
 };  
 
 } // namespace DataFile