]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/input.hh
* flower
[lilypond.git] / lily / include / input.hh
1 /*
2   input.hh -- declare Input
3
4   source file of the LilyPond music typesetter
5
6   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef INPUT_HH
10 #define INPUT_HH
11
12 #include "flower-proto.hh"
13
14 /**
15    Base class for anything that records its poisition in the parse file.
16 */
17 class Input
18 {
19 public:
20   char const *start_;
21   char const *end_;
22   Source_file *source_file_;
23
24   void warning (String) const; // should use member func?
25   void non_fatal_error (String) const;
26   void error (String) const;
27   void message (String) const;
28   void set_spot (Input const &);
29   void step_forward ();
30   void set_location (Input const &, Input const &);
31   Input spot () const;
32   String location_string () const;
33   String line_number_string () const;
34
35   String file_string ()const;
36   int line_number ()const;
37   int column_number ()const;
38   int end_line_number ()const;
39   int end_column_number ()const;
40
41   Input (Input const &i);
42   Input ();
43 };
44
45 #endif // INPUT_HH