lilypond-0.1.16
[lilypond.git] / flower / datafile.hh
blob14d57369a372ac30be18dacd291499ac1799fd9c
1 /*
2 datafile.hh -- declare Data_file
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
10 #ifndef DATAFILE_HH
11 #define DATAFILE_HH
13 #include "textstream.hh"
15 /// read a data file
16 class Data_file : private Text_stream
19 public:
20 bool rawmode;
22 Text_stream::line;
23 Text_stream::eof;
24 Text_stream::get_name;
26 char data_get();
27 void data_unget(char c) {
28 unget(c);
31 /// read line, eat #\n#
32 String get_line();
34 /// read a word till next space, leave space. Also does quotes
35 String get_word();
37 /// gobble horizontal white stuff.
38 void gobble_white();
40 /// gobble empty stuff before first field.
41 void gobble_leading_white();
42 Data_file(String s) : Text_stream(s) {
43 //*mlog << "(" << s << flush;
44 rawmode= false;
47 ~Data_file() {
48 // *mlog << ")"<<flush;
51 warning(String s) {
52 message("warning: " + s);
54 error(String s){
55 message(s);
56 exit(1);
59 #endif // DATAFILE_HH