]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/data-file.hh
5440064923d2ce59927105528bd3ab92700929c8
[lilypond.git] / flower / include / data-file.hh
1 /*
2   data-file.hh -- declare Data_file
3
4   source file of the LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef DATAFILE_HH
11 #define DATAFILE_HH
12
13 #include "text-stream.hh"
14
15 /// read a data file
16 class Data_file : private Text_stream
17 {
18     
19 public:
20   bool rawmode;
21
22   Text_stream::line;    
23   Text_stream::eof_b;
24   Text_stream::get_name;    
25
26   char data_get();    
27   void data_unget (char c) {
28     unget (c);
29   }
30
31   /// read line, eat #\n#
32   String get_line();
33     
34   /// read a word till next space, leave space. Also does quotes
35   String get_word();
36
37   /// gobble horizontal white stuff.
38   void gobble_white();
39
40   /// gobble empty stuff before first field.
41   void gobble_leading_white();
42   Data_file (String);
43   ~Data_file();
44   /**
45      eat complete file
46      @post
47      eof () is true
48   */
49   String gulp ();
50   void warning (String s);
51   void error (String s);
52 };
53 #endif // DATAFILE_HH