2 // source-file.hh -- declare Source_file
4 // copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
11 #include "interval.hh"
16 /// class for reading and mapping a file.
20 /** Ugh! filename gets changed! The path to the opened file may
21 change, since it might be searched in multiple directories. */
22 Source_file (String filename_str_r );
23 virtual ~Source_file ();
25 char const* ch_C () const;
26 virtual String error_str (char const* pos_ch_c_l ) const;
27 istream * istream_l ();
28 bool in_b (char const* pos_ch_c_l ) const;
29 int length_i () const;
30 virtual int line_i (char const* pos_ch_c_l ) const;
31 String name_str () const;
32 String file_line_column_str (char const* ch_c_l ) const;
35 Slice line_slice (char const* pos_ch_C) const;
36 String line_str (char const* pos_ch_C) const;
37 int column_i (char const* pos_ch_C) const;
38 int position_i (char const* pos_ch_C) const;
43 File_storage * storage_p_;
46 #endif // SOURCE_FILE_HH //