Rogue Wave Views |
Rogue Wave Views Documentation Home |
The position of a logical character in the text managed by an IlvCodeEditor
.
More...
#include <ilviews/gadgets/codeedit.h>
Public Member Functions | |
Location (IlInt line=-1, IlInt column=-1) | |
Constructor. More... | |
IlInt | getColumn () const |
Returns the value of the column of this location. More... | |
IlInt | getLine () const |
Returns the value of the line of this location. More... | |
IlBoolean | isDefault () const |
Tells if the location is set to default values. More... | |
IlBoolean | operator!= (const Location &source) const |
Are the two locations different. More... | |
IlBoolean | operator< (const Location &other) const |
Checks if this location is strictly before another one. More... | |
IlBoolean | operator<= (const Location &other) const |
Checks if this location is before another one. More... | |
IlBoolean | operator== (const Location &source) const |
Are the two locations identical. More... | |
IlBoolean | operator> (const Location &other) const |
Checks if this location is strictly after another one. More... | |
IlBoolean | operator>= (const Location &other) const |
Checks if this location is after another one. More... | |
void | set (IlInt line, IlInt column) |
Assigns the line and column values. More... | |
void | set (const Location &source) |
Copies a location. More... | |
void | setColumn (IlInt col) |
Sets the value of the column for this location. More... | |
void | setLine (IlInt line) |
Sets the value of the line for this location. More... | |
The position of a logical character in the text managed by an IlvCodeEditor
.
Library: ilvadvgagt This class allows locating characters in a text that can contain up to MAX_INT * MAX_INT characters. The line and column values are signed; the negative -1 values are used to note incorrect line, column, or location altogether.
The valid numbering of lines and columns in locations starts from (0, 0).
Constructor.
By default, when no values are given for line and column, the location is invalid. That is a call to isDefault()
will return IlTrue
.
IlInt IlvCodeEditor::Location::getColumn | ( | ) | const |
Returns the value of the column of this location.
IlInt IlvCodeEditor::Location::getLine | ( | ) | const |
Returns the value of the line of this location.
IlBoolean IlvCodeEditor::Location::isDefault | ( | ) | const |
Tells if the location is set to default values.
IlTrue
if both the line and the column numbers are set to -1
; IlFalse
otherwise. Are the two locations different.
Locations are different if they are not identical.
IlTrue
if the locations are different, IlFalse
otherwise. Checks if this location is strictly before another one.
IlTrue
if this location is strictly smaller than other; IlFalse
otherwise.other | the location to compare to. |
A location is strictly smaller than another if it is not greater.
Checks if this location is before another one.
other | the location to compare to. |
IlTrue
if this location is smaller than other; IlFalse
otherwise.A location is smaller than another if its line is smaller than the other one, or the lines are the same but its column is smaller.
Are the two locations identical.
Locations are identical if the line and column values are identical.
IlTrue
if the locations are identical; IlFalse
otherwise. Checks if this location is strictly after another one.
A location is strictly greater than another if it is not smaller.
other | the location to compare to. |
IlTrue
if this location is strictly greater than other; IlFalse
otherwise. Checks if this location is after another one.
other | the location to compare to. |
IlTrue
if this location is greater than other; IlFalse
otherwise.A location is greater to another if its line is greater than the other one, or the lines are the same but its column is greater.
Assigns the line and column values.
line | The new line number. |
column | The new column number. |
If line or column is strictly negative, the set value is -1, making the location at least partially invalid.
void IlvCodeEditor::Location::set | ( | const Location & | source | ) |
Copies a location.
No check is made to verify the validity of the argument.
source | The location to copy. |
void IlvCodeEditor::Location::setColumn | ( | IlInt | col | ) |
Sets the value of the column for this location.
If the given value is negative, the column number will be changed to -1.
col | The new column number for this location. |
void IlvCodeEditor::Location::setLine | ( | IlInt | line | ) |
Sets the value of the line for this location.
If the given value is negative, the line number will be changed to -1.
line | The new line number for this location. |
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.