Mutable bidirectional iterator over coalesced intervals in an IntervalMap.

Synopsis

Declared in <llvm/ADT/IntervalMap.h>

class iterator
    : public const_iterator

Base Classes

Name

Description

const_iterator

Read‐only bidirectional iterator over coalesced intervals in an IntervalMap.

Type Aliases

Name

Description

difference_type

Distance type for iterator arithmetic.

iterator_category

Bidirectional traversal category.

pointer

Pointer to the mapped value type (not used for dereference).

reference

Reference to the mapped value at the current interval.

value_type

Mapped value type yielded by the iterator.

Member Functions

Name

Description

iterator [constructor]

iterator ‐ Create null iterator.

advanceTo

Move to the first interval with stop >= x, or end().

atBegin

atBegin ‐ Return true if the current position is the first map entry.

erase

erase ‐ Erase the current interval.

find

find ‐ Move to the first interval with stop >= x, or end(). This is a full search from the root, the current position is ignored.

goToBegin

goToBegin ‐ Move to the first interval in map.

goToEnd

goToEnd ‐ Move beyond the last interval in map.

insert

Insert mapping [a;b]‐> y before the current position.

operator*

Dereference to the mapped value of the current interval.

operator++

Increment operators

operator‐‐

Decrement operators

setMap

setMap ‐ Change the map iterated over. This call must be followed by a call to goToBegin(), goToEnd(), or find()

setStart

setStart ‐ Move the start of the current interval. This may cause coalescing with the previous interval.

setStartUnchecked

Move the start of the current interval without coalescing checks.

setStop

setStop ‐ Move the end of the current interval. This may cause coalescing with the following interval.

setStopUnchecked

Move the end of the current interval without coalescing checks.

setValue

setValue ‐ Change the mapped value of the current interval. This may cause coalescing with the previous and following intervals.

setValueUnchecked

setValueUnchecked ‐ Change the mapped value of the current interval without checking for coalescing.

start

start ‐ Return the beginning of the current interval.

stop

stop ‐ Return the end of the current interval.

valid

valid ‐ Return true if the current position is valid, false for end().

value

value ‐ Return the mapped value at the current interval.

operator==

Return true if both iterators refer to the same map position.

operator!=

Return true if the iterators refer to different positions.

Protected Member Functions

Name

Description

branched

Return true if the map uses a branched (non‐inline) root.

pathFillFind

Complete the path by searching downward for x.

setRoot

Initialize the path root entry at slot Offset.

treeAdvanceTo

Advance to x from the current branched‐tree position.

treeFind

Find x in a branched tree from the root.

unsafeStart

unsafeStart ‐ Writable access to start() for iterator.

unsafeStop

unsafeStop ‐ Writable access to stop() for iterator.

unsafeValue

unsafeValue ‐ Writable access to value() for iterator.

Protected Data Members

Name

Description

map

Interval map this iterator walks; null for a singular iterator.

path

Root‐to‐leaf path to the current interval; may be partial between calls.

Friends

Name

Description

llvm::IntervalMap

Coalescing map from key intervals to values, stored as a compact B+‐tree.

Created with MrDocs