]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/data-file.hh
lpb and l2d fixes
[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--2000 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   /**
27    Get a char.
28    Only class member who uses text_file::get
29    */
30   char data_get ();    
31   void data_unget (char c) {
32     unget (c);
33   }
34
35   /// read line, eat #\n#
36   String get_line ();
37     
38   /// read a word till next space, leave space. Also does quotes
39   String get_word ();
40
41   /// gobble horizontal white stuff.
42   void gobble_white ();
43
44   /// gobble empty stuff before first field.
45   void gobble_leading_white ();
46   Data_file (String);
47   ~Data_file ();
48   /**
49      eat complete file
50      @post
51      eof () is true
52   */
53   String gulp ();
54   void warning (String s);
55   void error (String s);
56 };
57 #endif // DATAFILE_HH