#include <sourcepos.h>
Inheritance diagram for _InternalSourcePosition:
Public Member Functions | |
~_InternalSourcePosition () | |
Destructor [overriding virtual]. | |
SourceFileNode | file () const |
Get the associated file node or a NULL ref:. | |
int | line () const |
Get line number. | |
int | lpos () const |
Get lpos (curser position in line). | |
TLString | path () const |
Get path to file. | |
void | SetLine (int l) |
Explicitly set the line. Normally not used. | |
void | SetLPos (int l) |
Explicitly set the lpos. Normally not used. | |
TLString | PosString (bool with_file=1) const |
Get string representation of this position without include hierarchy. | |
TLString | PosRangeString (const SourcePosition &end, bool with_file=1) const |
String representation of position range. | |
TLString | PosStringRelative (const SourcePosition &rpos) const |
Write position relative to rpos. | |
TLString | IncludeHierarchyStr () const |
Return string representation of include hierarchy. | |
Static Public Member Functions | |
SourcePosition | CreateSinglePosition (const SourceFileNode &sfn, int line, int lpos) |
Private Member Functions | |
bool | test_equal (const _InternalSourcePosition &b) const |
Test if two source positions are equal; used by operator== and !=. | |
_InternalSourcePosition (const _InternalSourcePosition &) | |
NOT "C++-safe"; do not call these. | |
void | operator= (const _InternalSourcePosition &) |
_InternalSourcePosition (const SourceFileNode &fnode, int line, int lpos) | |
Construct an internal source position; internally used. | |
Private Attributes | |
SourceFileNode | _file |
File and all the include hierarchy. | |
int | _line |
Line number. | |
int | _lpos |
Position on the line. | |
Friends | |
class | SourcePositionArchive |
class | RefNode< _InternalSourcePosition > |
bool | operator== (const SourcePosition &a, const SourcePosition &b) |
operator==() returns true for same position in same file. |
The SourcePosition class lets you access the public methods of this one via the operator->().
Definition at line 92 of file sourcepos.h.
|
NOT "C++-safe"; do not call these.
Referenced by CreateSinglePosition(). |
|
Construct an internal source position; internally used.
Definition at line 155 of file sourcepos.cc. References _line, _lpos, and SourceFileNode. |
|
Destructor [overriding virtual].
Definition at line 164 of file sourcepos.cc. References _file. |
|
Can be used to create a single SourcePosition. Definition at line 147 of file sourcepos.cc. References _InternalSourcePosition(), SourceFileNode, and SourcePosition. Referenced by SCLocation::SCLocation(). |
|
Get the associated file node or a NULL ref:.
Definition at line 122 of file sourcepos.h. References _file, and SourceFileNode. Referenced by PosRangeString(). |
|
Return string representation of include hierarchy. This is suitable to be prepended before e.g. a PosString(). Each include statement gets written into a line of its own; (the character is a newline unless hierarchy is empty). Definition at line 22 of file sourcepos.cc. References _file. |
|
Get line number.
Definition at line 126 of file sourcepos.h. References _line. |
|
Get lpos (curser position in line).
Definition at line 128 of file sourcepos.h. References _lpos. |
|
|
|
Get path to file.
Definition at line 130 of file sourcepos.h. References _file. Referenced by PosString(). |
|
String representation of position range.
Uses simple position if the positions equal.
Definition at line 59 of file sourcepos.cc. References _line, _lpos, file(), PosString(), SourceFileNode, SourcePosition, and TLString::sprintf(). |
|
Get string representation of this position without include hierarchy.
String looks like "file" or "file:line" or "file:line:lpos". Definition at line 30 of file sourcepos.cc. References _line, _lpos, path(), and TLString::sprintf(). Referenced by PosRangeString(), and PosStringRelative(). |
|
Write position relative to rpos. That means: leave away file if it is the same file. Definition at line 116 of file sourcepos.cc. References _file, _line, _lpos, PosString(), SourcePosition, and TLString::sprintf(). |
|
Explicitly set the line. Normally not used.
Definition at line 134 of file sourcepos.h. References _line. |
|
Explicitly set the lpos. Normally not used.
Definition at line 136 of file sourcepos.h. References _lpos. |
|
Test if two source positions are equal; used by operator== and !=.
Definition at line 132 of file sourcepos.cc. |
|
operator==() returns true for same position in same file.
Definition at line 178 of file sourcepos.h. |
|
Definition at line 95 of file sourcepos.h. |
|
Definition at line 94 of file sourcepos.h. |
|
File and all the include hierarchy.
Definition at line 104 of file sourcepos.h. Referenced by file(), IncludeHierarchyStr(), path(), PosStringRelative(), and ~_InternalSourcePosition(). |
|
Line number.
Definition at line 105 of file sourcepos.h. Referenced by _InternalSourcePosition(), line(), PosRangeString(), PosString(), PosStringRelative(), and SetLine(). |
|
Position on the line.
Definition at line 106 of file sourcepos.h. Referenced by _InternalSourcePosition(), lpos(), PosRangeString(), PosString(), PosStringRelative(), and SetLPos(). |