Reference » Service classes » MLocus

Elgrint::MLocus class

Declared in elStructs.h


Describes a two-dimensional unsigned location (row and column pair).

Data members:

Name Type Init value Description
row MLocusElem 0

Vertical coordinate element. Valid range is from MinLocus.row through MaxLocus.row (0 to 2,000,000,000).

col MLocusElem 0

Horizontal coordinate element. Valid range is from MinLocus.col through MaxLocus.col (0 to 2,000,000,000).


Name Description
MLocus() Default constructor. Sets the data members (elements) to their initial values.
MLocus(aRow,aCol) Init constructor. Sets the data members (elements) to the specified values.

Global functions:

Name Description
operator!=(l1,l2) Logical opposite of operator==.
operator<(l1,l2) Returns true if l1 is less than l2.
operator<<(l1,l2) Validates l1 using l2 and returns the result.
operator<<(str,locus) Appends locus to str in a "row,col" form.
operator<<=(l1,l2) Validates l1 using values in l2.
operator<=(l1,l2) Returns true iff l1 is less than or equal to l2 (see operator< and operator==).
operator==(l1,l2) Returns true iff l1 and l2 are equal.
operator>(l1,l2) Returns true if l1 is greater than l2.
operator>=(l1,l2) Returns true iff l1 is greater than or equal to l2 (see operator> and operator==).


MLocus defines a 2D coordinate type, suitable for specifying table or matrix cell coordinates, among other things. The units depend on the context. For example, when MLocus is used by MEditBox, row is the row index from the top of the text, and col is the character index from the beginning of the row.

'MLocus' is an ordered type (i.e. defines a sorting order and operator<). Locuses are sorted by rows and then by columns.

Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.