2 // binary-source-file.hh -- declare Binary_source_file
4 // copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
6 #ifndef BINARY_SOURCE_FILE_HH
7 #define BINARY_SOURCE_FILE_HH
9 #include "source-file.hh"
11 class Binary_source_file : public Source_file
14 Binary_source_file (String& filename_str );
15 virtual ~Binary_source_file ();
17 U8 get_U8 () { return *(U8*)forward_ch_C (1); }
18 U16 get_U16 () { return *(U16*)forward_ch_C (2); }
19 U32 get_U32 () { return *(U32*)forward_ch_C (4); }
20 Byte get_Byte () {return get_U8 (); }
21 int get_int () { return get_U32 (); }
23 virtual String error_str (char const* pos_ch_C ) const;
24 virtual int line_i (char const* pos_ch_C ) const;
27 #endif // BINARY_SOURCE_FILE_HH