#include "smobs.hh"
#include <iostream>
+using namespace std;
/**
class for reading and mapping a file.
public:
int print_smob (SCM, scm_print_state *) const;
SCM mark_smob () const;
- static const char type_p_name_[];
+ static const char * const type_p_name_;
virtual ~Source_file ();
private:
- std::vector<char const *> newline_locations_;
- std::istream *istream_;
- std::vector<char> characters_;
+ vector<char const *> newline_locations_;
+ istream *istream_;
+ vector<char> characters_;
SCM str_port_;
void load_stdin ();
void init ();
public:
- Source_file (const std::string &fn);
- Source_file (const std::string&, const std::string&);
+ Source_file (const string &fn);
+ Source_file (const string&, const string&);
char const *c_str () const;
- virtual std::string quote_input (char const *pos_str0) const;
- std::istream *get_istream ();
+ virtual string quote_input (char const *pos_str0) const;
+ istream *get_istream ();
bool contains (char const *pos_str0) const;
int length () const;
virtual int get_line (char const *pos_str0) const;
void set_line (char const *pos_str0, int i);
- std::string name_string () const;
- std::string file_line_column_string (char const *str0) const;
+ string name_string () const;
+ string file_line_column_string (char const *str0) const;
Slice line_slice (char const *pos_str0) const;
- std::string line_string (char const *pos_str0) const;
+ string line_string (char const *pos_str0) const;
void get_counts (char const *pos_str0, int *, int *, int *, int *) const;
SCM get_port () const;
- std::string name_;
+ string name_;
protected:
int line_offset_;
};
-std::vector<char> gulp_file (const std::string &fn, int desired);
+vector<char> gulp_file (const string &fn, int desired);
#endif /* SOURCE_FILE_HH */