LLVM 20.0.0git
Public Member Functions | Friends | List of all members
llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator Class Reference

#include "llvm/ADT/IntervalMap.h"

Inheritance diagram for llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator:
Inheritance graph
[legend]

Public Member Functions

 iterator ()=default
 iterator - Create null iterator.
 
void setStart (KeyT a)
 setStart - Move the start of the current interval.
 
void setStop (KeyT b)
 setStop - Move the end of the current interval.
 
void setValue (ValT x)
 setValue - Change the mapped value of the current interval.
 
void setStartUnchecked (KeyT a)
 setStartUnchecked - Move the start of the current interval without checking for coalescing or overlaps.
 
void setStopUnchecked (KeyT b)
 setStopUnchecked - Move the end of the current interval without checking for coalescing or overlaps.
 
void setValueUnchecked (ValT x)
 setValueUnchecked - Change the mapped value of the current interval without checking for coalescing.
 
void insert (KeyT a, KeyT b, ValT y)
 insert - Insert mapping [a;b] -> y before the current position.
 
void erase ()
 erase - Erase the current interval.
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
- Public Member Functions inherited from llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator
 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 KeyTstart () const
 start - Return the beginning of the current interval.
 
const KeyTstop () const
 stop - Return the end of the current interval.
 
const ValTvalue () const
 value - Return the mapped value at the current interval.
 
const ValToperator* () 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_iteratoroperator++ ()
 preincrement - Move to the next interval.
 
const_iterator operator++ (int)
 postincrement - Don't do that!
 
const_iteratoroperator-- ()
 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().
 

Friends

class IntervalMap
 

Additional Inherited Members

- Public Types inherited from llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator
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 &
 
- Protected Member Functions inherited from llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator
 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.
 
KeyTunsafeStart () const
 unsafeStart - Writable access to start() for iterator.
 
KeyTunsafeStop () const
 unsafeStop - Writable access to stop() for iterator.
 
ValTunsafeValue () const
 unsafeValue - Writable access to value() for iterator.
 
- Protected Attributes inherited from llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator
IntervalMapmap = nullptr
 
IntervalMapImpl::Path path
 

Detailed Description

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
class llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator

Definition at line 1572 of file IntervalMap.h.

Constructor & Destructor Documentation

◆ iterator()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::iterator ( )
default

iterator - Create null iterator.

Member Function Documentation

◆ erase()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase

erase - Erase the current interval.

erase - erase the current interval and move to the next position.

Definition at line 1921 of file IntervalMap.h.

References assert(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase(), and P.

◆ insert()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::insert ( KeyT  a,
KeyT  b,
ValT  y 
)

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

Definition at line 1832 of file IntervalMap.h.

References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::insertFrom(), llvm::Offset, P, and Size.

◆ operator++() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator & llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator++ ( )
inline

◆ operator++() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator++ ( int  )
inline

Definition at line 1640 of file IntervalMap.h.

◆ operator--() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator & llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator-- ( )
inline

◆ operator--() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::operator-- ( int  )
inline

Definition at line 1651 of file IntervalMap.h.

◆ setStart()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setStart ( KeyT  a)

setStart - Move the start of the current interval.

This may cause coalescing with the previous interval.

Parameters
aNew start key, must not overlap the previous interval.

Definition at line 1733 of file IntervalMap.h.

References assert(), llvm::erase(), and value.

◆ setStartUnchecked()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setStartUnchecked ( KeyT  a)
inline

setStartUnchecked - Move the start of the current interval without checking for coalescing or overlaps.

This should only be used when it is known that coalescing is not required.

Parameters
aNew start key.

Definition at line 1611 of file IntervalMap.h.

◆ setStop()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setStop ( KeyT  b)

setStop - Move the end of the current interval.

This may cause coalescing with the following interval.

Parameters
bNew stop key, must not overlap the following interval.

Definition at line 1749 of file IntervalMap.h.

References assert(), llvm::erase(), and value.

◆ setStopUnchecked()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setStopUnchecked ( KeyT  b)
inline

setStopUnchecked - Move the end of the current interval without checking for coalescing or overlaps.

This should only be used when it is known that coalescing is not required.

Parameters
bNew stop key.

Definition at line 1617 of file IntervalMap.h.

◆ setValue()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setValue ( ValT  x)

setValue - Change the mapped value of the current interval.

This may cause coalescing with the previous and following intervals.

Parameters
xNew value.

Definition at line 1764 of file IntervalMap.h.

References llvm::erase().

◆ setValueUnchecked()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::setValueUnchecked ( ValT  x)
inline

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

Parameters
xNew value.

Definition at line 1627 of file IntervalMap.h.

Friends And Related Function Documentation

◆ IntervalMap

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class IntervalMap
friend

Definition at line 1573 of file IntervalMap.h.


The documentation for this class was generated from the following file: