KHolidays Library
Go to the documentation of this file.
39 #ifndef BISON_POSITION_HH
40 # define BISON_POSITION_HH
48 #line 1 "[Bison:b4_percent_define_default]"
53 #line 54 "position.hh"
78 inline void lines (
int count = 1)
102 operator+= (
position& res,
const int width)
109 inline const position
110 operator+ (
const position& begin,
const int width)
112 position res = begin;
117 inline const position&
118 operator-= (position& res,
const int width)
120 return res += -width;
124 inline const position
125 operator- (
const position& begin,
const int width)
127 return begin + -width;
132 operator== (
const position& pos1,
const position& pos2)
135 (pos1.filename == pos2.filename
136 || pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
137 && pos1.line == pos2.line && pos1.column == pos2.column;
142 operator!= (
const position& pos1,
const position& pos2)
144 return !(pos1 == pos2);
152 operator<< (std::ostream& ostr,
const position& pos)
155 ostr << *pos.filename <<
':';
156 return ostr << pos.line <<
'.' << pos.column;
161 #line 1 "[Bison:b4_percent_define_default]"
166 #line 167 "position.hh"
167 #endif // not BISON_POSITION_HH
position()
Construct a position.
unsigned int column
Current column number.
void columns(int count=1)
(column related) Advance to the COUNT next columns.
unsigned int line
Current line number.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
void initialize(std::string *fn)
Initialization.
std::string * filename
File name to which this position refers.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:00 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.