]> git.donarmstrong.com Git - lilypond.git/blob - lib/include/source-file.hh
release: 0.1.11
[lilypond.git] / lib / include / source-file.hh
1 //
2 //  source-file.hh -- declare Source_file
3 //
4 //  copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
5
6 #ifndef SOURCE_FILE_HH
7 #define SOURCE_FILE_HH
8
9 #include "proto.hh"
10 #include "string.hh"
11
12 class istream;
13
14
15 /// class for reading and mapping a file. 
16 class Source_file
17 {
18 public:
19     /** Ugh! filename gets changed! The path to the opened file may
20        change, since it might be searched in multiple directories.  */
21     Source_file( String filename_str_r );
22     virtual ~Source_file();
23
24     char const* ch_C() const;
25     virtual String error_str( char const* pos_ch_c_l ) const;
26     istream * istream_l();
27     bool in_b( char const* pos_ch_c_l ) const;
28     int length_i() const;
29     virtual int line_i( char const* pos_ch_c_l ) const;
30     String name_str() const;
31     String file_line_no_str( char const* ch_c_l ) const;
32
33 private:
34     String name_str_;
35     istream* istream_p_;
36     File_storage * storage_p_;
37 };
38
39 #endif // SOURCE_FILE_HH //