![]() |
Ark Server API (ASA) - Wiki
|
#include <RangeSet.h>
Collaboration diagram for TRangeSet< ElementType >:Public Member Functions | |
| TRangeSet () | |
| ~TRangeSet () | |
| void | Add (RangeType Range) |
| void | Merge (const TRangeSet &Other) |
| void | Empty () |
| bool | Contains (ElementValueOrConstRef Element) const |
| bool | Contains (const RangeType &Range) const |
| BoundsType | GetMinBound () const |
| ElementType | GetMinBoundValue () const |
| BoundsType | GetMaxBound () const |
| ElementType | GetMaxBoundValue () const |
| template<typename Allocator > | |
| const void | GetRanges (TArray< RangeType, Allocator > &OutRanges) const |
| bool | HasMinBound () const |
| bool | HasMaxBound () const |
| bool | IsEmpty () const |
| bool | Overlaps (const RangeType &Range) const |
| bool | Overlaps (const TRangeSet &Other) const |
Private Types | |
| typedef TRangeBound< ElementType > | BoundsType |
| typedef TRange< ElementType > | RangeType |
| typedef TCallTraits< ElementType >::ParamType | ElementValueOrConstRef |
Private Attributes | |
| TArray< RangeType > | Ranges |
Friends | |
| class FArchive & | operator<< (class FArchive &Ar, TRangeSet &RangeSet) |
Template for range sets.
Definition at line 16 of file RangeSet.h.
|
private |
Definition at line 18 of file RangeSet.h.
|
private |
Definition at line 22 of file RangeSet.h.
|
private |
Definition at line 19 of file RangeSet.h.
|
inline |
Default constructor.
Definition at line 27 of file RangeSet.h.
Destructor.
Definition at line 30 of file RangeSet.h.
Adds a range to the set.
This method merges overlapping ranges into a single range (i.e. {[1, 5], [4, 6]} becomes [1, 6]). Adjacent ranges (i.e. {[1, 4), [4, 6)} are also merged.
| Range | The range to add. |
Definition at line 42 of file RangeSet.h.
|
inline |
Checks whether this set contains the specified range.
| Range | The range to check. |
Definition at line 138 of file RangeSet.h.
|
inline |
Checks whether this set contains the specified element.
| Element | The element to check. |
Definition at line 119 of file RangeSet.h.
Removes a range from the set.
Ranges that overlap with the removed range will be split.
| Range | The range to remove. Removes all ranges from the set. |
Definition at line 106 of file RangeSet.h.
|
inline |
Gets the range set's uppermost bound.
Definition at line 192 of file RangeSet.h.
|
inline |
Gets the value of the uppermost bound.
Use HasMaxBound() to ensure that this range actually has an upper bound.
Definition at line 216 of file RangeSet.h.
|
inline |
Gets the range set's lowest bound.
Definition at line 157 of file RangeSet.h.
|
inline |
Gets the value of the lowest bound.
Use HasMinBound() to ensure that this range set actually has a lowest bound.
Definition at line 181 of file RangeSet.h.
|
inline |
Returns a read-only collection of the ranges contained in this set.
| Allocator | The array allocator to use. |
| OutRanges | Will contain the collection of ranges. |
Definition at line 229 of file RangeSet.h.
Checks whether the range has an uppermost bound.
Definition at line 251 of file RangeSet.h.
Checks whether the range has a lowest bound.
Definition at line 240 of file RangeSet.h.
Checks whether this range set is empty.
Definition at line 261 of file RangeSet.h.
|
inline |
Merges another range set into this set.
| Other | The range set to merge. |
Definition at line 67 of file RangeSet.h.
|
inline |
Checks whether this range set overlaps with the specified range.
| Range | The range to check. |
Definition at line 272 of file RangeSet.h.
|
inline |
Checks whether this range set overlaps with another.
| Other | The other range set. |
Definition at line 293 of file RangeSet.h.
|
friend |
Serializes the given range set from or into the specified archive.
| Ar | The archive to serialize from or into. |
| RangeSet | The range set to serialize. |
Definition at line 315 of file RangeSet.h.
Holds the set of ranges.
Definition at line 323 of file RangeSet.h.