]> git.tdb.fi Git - libs/datafile.git/blob - source/input.h
Implement proper copy semantics
[libs/datafile.git] / source / input.h
1 #ifndef MSP_DATAFILE_INPUT_H_
2 #define MSP_DATAFILE_INPUT_H_
3
4 #include <msp/core/noncopyable.h>
5 #include <msp/io/base.h>
6
7 namespace Msp {
8 namespace DataFile {
9
10 class Input: private NonCopyable
11 {   
12 private:
13         IO::Base *in;
14         IO::Base *compressed;
15         unsigned line;
16         int next;
17
18 public:
19         Input(IO::Base &); 
20         ~Input();
21
22         void set_decompress();
23         int get();
24         int peek();
25         unsigned get_line_number() const { return line; }
26         operator bool() const;
27 };  
28
29 } // namespace DataFile
30 } // namespace Msp
31
32 #endif