]> git.tdb.fi Git - libs/datafile.git/blob - source/input.h
Fix EOF handling
[libs/datafile.git] / source / input.h
1 /* $Id$
2
3 This file is part of libmspdatafile
4 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7 #ifndef MSP_DATAFILE_INPUT_H_
8 #define MSP_DATAFILE_INPUT_H_
9
10 #include <msp/io/base.h>
11
12 namespace Msp {
13 namespace DataFile {
14
15 class Input
16 {   
17 public:
18         Input(IO::Base &); 
19         int get();
20         int peek();
21         unsigned get_line_number() const { return line; }
22         operator bool() const;
23 private:
24         IO::Base &in;
25         unsigned line;
26         int next;
27 };  
28
29 } // namespace DataFile
30 } // namespace Msp
31
32 #endif