]> git.tdb.fi Git - libs/datafile.git/blob - source/input.h
e03dea1e839714e23416b8fed7fea7cb68f8ed97
[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 <istream>
11
12 namespace Msp {
13 namespace DataFile {
14
15 class Input
16 {   
17 public:
18         Input(std::istream &); 
19         int get();
20         int peek();
21         unsigned get_line_number() const { return line; }
22         operator bool() const { return in; }
23 private:
24         std::istream &in;
25         unsigned line;
26         int next;
27 };  
28
29 } // namespace DataFile
30 } // namespace Msp
31
32 #endif