A position in a piece of multi-line text. More...
#include <CodeSpan.hpp>
Public Member Functions | |
CodePosition () | |
Create a null code position (line and colunn equal to 0). More... | |
CodePosition (unsigned int line_, unsigned int column_) | |
Create a code position with the supplied line and colunn values. More... | |
CodePosition (const CodePosition ©)=default | |
Create a code position by copying the supplied code position. More... | |
bool | operator< (const CodePosition &rhs) const |
Does this code position come before the supplied code position? More... | |
CodePosition & | operator= (const CodePosition ©)=default |
Assign the code position by copying the supplied code position line and column values. More... | |
bool | operator== (const CodePosition &rhs) const |
Is this code position equal to the supplied code position? More... | |
bool | operator> (const CodePosition &rhs) const |
Does this code position come after the supplied code position? More... | |
Public Attributes | |
unsigned int | column |
The column of the code position (1-indexed). More... | |
unsigned int | line |
The line of the code position (1-indexed). More... | |
A position in a piece of multi-line text.
The values are 1-indexed.
|
inline |
Create a null code position (line and colunn equal to 0).
|
inline |
Create a code position with the supplied line and colunn values.
|
default |
Create a code position by copying the supplied code position.
|
inline |
Does this code position come before the supplied code position?
|
default |
Assign the code position by copying the supplied code position line and column values.
|
inline |
Is this code position equal to the supplied code position?
|
inline |
Does this code position come after the supplied code position?
unsigned int column |
The column of the code position (1-indexed).
unsigned int line |
The line of the code position (1-indexed).