LLVM 22.0.0git
|
#include "llvm/ADT/IntervalMap.h"
Public Types | |
using | iterator_category = std::bidirectional_iterator_tag |
using | value_type = ValT |
using | difference_type = std::ptrdiff_t |
using | pointer = value_type * |
using | reference = value_type & |
Public Member Functions | |
const_iterator ()=default | |
const_iterator - Create an iterator that isn't pointing anywhere. | |
void | setMap (const IntervalMap &m) |
setMap - Change the map iterated over. | |
bool | valid () const |
valid - Return true if the current position is valid, false for end(). | |
bool | atBegin () const |
atBegin - Return true if the current position is the first map entry. | |
const KeyT & | start () const |
start - Return the beginning of the current interval. | |
const KeyT & | stop () const |
stop - Return the end of the current interval. | |
const ValT & | value () const |
value - Return the mapped value at the current interval. | |
const ValT & | operator* () const |
bool | operator== (const const_iterator &RHS) const |
bool | operator!= (const const_iterator &RHS) const |
void | goToBegin () |
goToBegin - Move to the first interval in map. | |
void | goToEnd () |
goToEnd - Move beyond the last interval in map. | |
const_iterator & | operator++ () |
preincrement - Move to the next interval. | |
const_iterator | operator++ (int) |
postincrement - Don't do that! | |
const_iterator & | operator-- () |
predecrement - Move to the previous interval. | |
const_iterator | operator-- (int) |
postdecrement - Don't do that! | |
void | find (KeyT x) |
find - Move to the first interval with stop >= x, or end(). | |
void | advanceTo (KeyT x) |
advanceTo - Move to the first interval with stop >= x, or end(). | |
Protected Member Functions | |
const_iterator (const IntervalMap &map) | |
bool | branched () const |
void | setRoot (unsigned Offset) |
void | pathFillFind (KeyT x) |
pathFillFind - Complete path by searching for x. | |
void | treeFind (KeyT x) |
treeFind - Find in a branched tree. | |
void | treeAdvanceTo (KeyT x) |
treeAdvanceTo - Find position after the current one. | |
KeyT & | unsafeStart () const |
unsafeStart - Writable access to start() for iterator. | |
KeyT & | unsafeStop () const |
unsafeStop - Writable access to stop() for iterator. | |
ValT & | unsafeValue () const |
unsafeValue - Writable access to value() for iterator. | |
Protected Attributes | |
IntervalMap * | map = nullptr |
IntervalMapImpl::Path | path |
Friends | |
class | IntervalMap |
Definition at line 1344 of file IntervalMap.h.
using llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::difference_type = std::ptrdiff_t |
Definition at line 1350 of file IntervalMap.h.
using llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::iterator_category = std::bidirectional_iterator_tag |
Definition at line 1348 of file IntervalMap.h.
using llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::pointer = value_type * |
Definition at line 1351 of file IntervalMap.h.
using llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::reference = value_type & |
Definition at line 1352 of file IntervalMap.h.
using llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::value_type = ValT |
Definition at line 1349 of file IntervalMap.h.
|
inlineexplicitprotected |
Definition at line 1362 of file IntervalMap.h.
|
default |
const_iterator - Create an iterator that isn't pointing anywhere.
|
inline |
advanceTo - Move to the first interval with stop >= x, or end().
The search is started from the current position, and no earlier positions can be found. This is much faster than find() for small moves.
Definition at line 1495 of file IntervalMap.h.
References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::findFrom(), and llvm::IntervalMapImpl::Path::leafOffset().
|
inline |
atBegin - Return true if the current position is the first map entry.
Definition at line 1414 of file IntervalMap.h.
References llvm::IntervalMapImpl::Path::atBegin().
|
inlineprotected |
Definition at line 1365 of file IntervalMap.h.
References assert().
|
inline |
find - Move to the first interval with stop >= x, or end().
This is a full search from the root, the current position is ignored.
Definition at line 1485 of file IntervalMap.h.
References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::findFrom().
|
inline |
goToBegin - Move to the first interval in map.
Definition at line 1441 of file IntervalMap.h.
References llvm::IntervalMapImpl::Path::fillLeft().
|
inline |
goToEnd - Move beyond the last interval in map.
Definition at line 1448 of file IntervalMap.h.
|
inline |
Definition at line 1436 of file IntervalMap.h.
References llvm::operator==(), and RHS.
|
inline |
Definition at line 1425 of file IntervalMap.h.
References value.
|
inline |
preincrement - Move to the next interval.
Definition at line 1453 of file IntervalMap.h.
References assert(), llvm::IntervalMapImpl::Path::leafOffset(), llvm::IntervalMapImpl::Path::leafSize(), and llvm::IntervalMapImpl::Path::moveRight().
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator++().
|
inline |
postincrement - Don't do that!
Definition at line 1461 of file IntervalMap.h.
|
inline |
predecrement - Move to the previous interval.
Definition at line 1468 of file IntervalMap.h.
References llvm::IntervalMapImpl::Path::leafOffset(), and llvm::IntervalMapImpl::Path::moveLeft().
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator--().
|
inline |
postdecrement - Don't do that!
Definition at line 1477 of file IntervalMap.h.
|
inline |
Definition at line 1427 of file IntervalMap.h.
References assert(), llvm::IntervalMapImpl::Path::leafOffset(), and RHS.
|
protected |
pathFillFind - Complete path by searching for x.
x | Key to search for. |
Definition at line 1509 of file IntervalMap.h.
References llvm::IntervalMapImpl::NodeRef::get(), llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::safeFind(), and llvm::IntervalMapImpl::NodeRef::subtree().
|
inline |
setMap - Change the map iterated over.
This call must be followed by a call to goToBegin(), goToEnd(), or find()
Definition at line 1408 of file IntervalMap.h.
|
inlineprotected |
Definition at line 1370 of file IntervalMap.h.
References llvm::Offset, and llvm::IntervalMapImpl::Path::setRoot().
|
inline |
start - Return the beginning of the current interval.
Definition at line 1417 of file IntervalMap.h.
|
inline |
stop - Return the end of the current interval.
Definition at line 1420 of file IntervalMap.h.
|
protected |
treeAdvanceTo - Find position after the current one.
x | Key to search for. |
Definition at line 1533 of file IntervalMap.h.
References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::stop(), and llvm::IntervalMapImpl::BranchNode< KeyT, ValT, N, Traits >::stop().
|
protected |
treeFind - Find in a branched tree.
x | Key to search for. |
Definition at line 1523 of file IntervalMap.h.
|
inlineprotected |
unsafeStart - Writable access to start() for iterator.
Definition at line 1382 of file IntervalMap.h.
References assert(), llvm::IntervalMapImpl::Path::leaf(), llvm::IntervalMapImpl::Path::leafOffset(), llvm::IntervalMap< KeyT, ValT, N, Traits >::start(), and llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::start().
|
inlineprotected |
unsafeStop - Writable access to stop() for iterator.
Definition at line 1389 of file IntervalMap.h.
References assert(), llvm::IntervalMapImpl::Path::leaf(), llvm::IntervalMapImpl::Path::leafOffset(), llvm::IntervalMap< KeyT, ValT, N, Traits >::stop(), and llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::stop().
|
inlineprotected |
unsafeValue - Writable access to value() for iterator.
Definition at line 1396 of file IntervalMap.h.
References assert(), llvm::IntervalMapImpl::Path::leaf(), llvm::IntervalMapImpl::Path::leafOffset(), llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::value(), and value.
|
inline |
valid - Return true if the current position is valid, false for end().
Definition at line 1411 of file IntervalMap.h.
References llvm::IntervalMapImpl::Path::valid().
|
inline |
value - Return the mapped value at the current interval.
Definition at line 1423 of file IntervalMap.h.
|
friend |
Definition at line 1345 of file IntervalMap.h.
|
protected |
Definition at line 1356 of file IntervalMap.h.
|
protected |
Definition at line 1360 of file IntervalMap.h.