24 # include <vcl_msvc_warnings.h> 88 char const*
line()
const {
return (
char const*)
line_.c_str(); }
92 char const*
line_from(
int field_number)
const;
95 explicit operator bool ()
const 96 {
return (!
done_)? true :
false; }
108 void error(std::ostream&,
char const* message,
int field = -1,
109 int char_within_field = 0);
char const * operator[](unsigned i) const
Return field i. Counting starts at 0.
int NR() const
Return the current "record number", i.e. line number.
char const * line() const
Return the entire line.
std::vector< char * > fields_
vul_awk(std::istream &s, ModeFlags mode=none)
Construct from input stream.
void error(std::ostream &, char const *message, int field=-1, int char_within_field=0)
Display error message, line number.
bool operator!() const
Return false if this line is not the last.
int NF() const
Return the number of fields on this line.
char const * line_from(int field_number) const
Return the remainder of the line, starting from field_number.
vul_awk & operator=(const vul_awk &that)
vul_awk & operator++()
Advance to the next line.