QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
A template based class for storing ranges (lower to upper values). More...
#include <qgsrange.h>
Public Member Functions | |
QgsRange (T lower, T upper, bool includeLower=true, bool includeUpper=true) | |
Constructor for QgsRange. More... | |
bool | contains (const QgsRange< T > &other) const |
Returns true if this range contains another range. More... | |
bool | contains (T element) const |
Returns true if this range contains a specified element. More... | |
bool | includeLower () const |
Returns true if the lower bound is inclusive, or false if the lower bound is exclusive. More... | |
bool | includeUpper () const |
Returns true if the upper bound is inclusive, or false if the upper bound is exclusive. More... | |
bool | isEmpty () const |
Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive. More... | |
bool | isSingleton () const |
Returns true if the range consists only of a single value or instant. More... | |
T | lower () const |
Returns the lower bound of the range. More... | |
bool | overlaps (const QgsRange< T > &other) const |
Returns true if this range overlaps another range. More... | |
T | upper () const |
Returns the upper bound of the range. More... | |
A template based class for storing ranges (lower to upper values).
QgsRange classes represent a range of values of some element type. For instance, ranges of int might be used to represent integer ranges.
Ranges can indicate whether the upper and lower values are inclusive or exclusive. The inclusivity or exclusivity of bounds is considered when determining things like whether ranges overlap or during calculation of range intersections.
Definition at line 45 of file qgsrange.h.
|
inline |
Constructor for QgsRange.
The lower and upper bounds are specified, and optionally whether or not these bounds are included in the range.
Definition at line 53 of file qgsrange.h.
Returns true
if this range contains another range.
Definition at line 107 of file qgsrange.h.
|
inline |
Returns true
if this range contains a specified element.
Definition at line 127 of file qgsrange.h.
|
inline |
Returns true
if the lower bound is inclusive, or false
if the lower bound is exclusive.
Definition at line 80 of file qgsrange.h.
|
inline |
Returns true
if the upper bound is inclusive, or false
if the upper bound is exclusive.
Definition at line 88 of file qgsrange.h.
|
inline |
Returns true
if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive.
Definition at line 95 of file qgsrange.h.
|
inline |
Returns true
if the range consists only of a single value or instant.
Definition at line 101 of file qgsrange.h.
|
inline |
Returns the lower bound of the range.
Definition at line 65 of file qgsrange.h.
Returns true
if this range overlaps another range.
Definition at line 146 of file qgsrange.h.
|
inline |
Returns the upper bound of the range.
Definition at line 72 of file qgsrange.h.