LLVM 20.0.0git
Public Member Functions | List of all members
llvm::IntervalMapOverlaps< MapA, MapB > Class Template Reference

IntervalMapOverlaps - Iterate over the overlaps of mapped intervals in two IntervalMaps. More...

#include "llvm/ADT/IntervalMap.h"

Public Member Functions

 IntervalMapOverlaps (const MapA &a, const MapB &b)
 IntervalMapOverlaps - Create an iterator for the overlaps of a and b.
 
bool valid () const
 valid - Return true if iterator is at an overlap.
 
const MapA::const_iterator & a () const
 a - access the left hand side in the overlap.
 
const MapB::const_iterator & b () const
 b - access the right hand side in the overlap.
 
KeyType start () const
 start - Beginning of the overlapping interval.
 
KeyType stop () const
 stop - End of the overlapping interval.
 
void skipA ()
 skipA - Move to the next overlap that doesn't involve a().
 
void skipB ()
 skipB - Move to the next overlap that doesn't involve b().
 
IntervalMapOverlapsoperator++ ()
 Preincrement - Move to the next overlap.
 
void advanceTo (KeyType x)
 advanceTo - Move to the first overlapping interval with stopLess(x, stop()).
 

Detailed Description

template<typename MapA, typename MapB>
class llvm::IntervalMapOverlaps< MapA, MapB >

IntervalMapOverlaps - Iterate over the overlaps of mapped intervals in two IntervalMaps.

The maps may be different, but the KeyT and Traits types should be the same.

Typical uses:

  1. Test for overlap: bool overlap = IntervalMapOverlaps(a, b).valid();
  2. Enumerate overlaps: for (IntervalMapOverlaps I(a, b); I.valid() ; ++I) { ... }

Definition at line 2110 of file IntervalMap.h.

Constructor & Destructor Documentation

◆ IntervalMapOverlaps()

template<typename MapA , typename MapB >
llvm::IntervalMapOverlaps< MapA, MapB >::IntervalMapOverlaps ( const MapA &  a,
const MapB &  b 
)
inline

IntervalMapOverlaps - Create an iterator for the overlaps of a and b.

Definition at line 2152 of file IntervalMap.h.

Member Function Documentation

◆ a()

template<typename MapA , typename MapB >
const MapA::const_iterator & llvm::IntervalMapOverlaps< MapA, MapB >::a ( ) const
inline

a - access the left hand side in the overlap.

Definition at line 2162 of file IntervalMap.h.

Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::start(), and llvm::IntervalMapOverlaps< MapA, MapB >::stop().

◆ advanceTo()

template<typename MapA , typename MapB >
void llvm::IntervalMapOverlaps< MapA, MapB >::advanceTo ( KeyType  x)
inline

advanceTo - Move to the first overlapping interval with stopLess(x, stop()).

Definition at line 2205 of file IntervalMap.h.

References llvm::IntervalMapOverlaps< MapA, MapB >::valid().

◆ b()

template<typename MapA , typename MapB >
const MapB::const_iterator & llvm::IntervalMapOverlaps< MapA, MapB >::b ( ) const
inline

b - access the right hand side in the overlap.

Definition at line 2165 of file IntervalMap.h.

Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::start(), and llvm::IntervalMapOverlaps< MapA, MapB >::stop().

◆ operator++()

template<typename MapA , typename MapB >
IntervalMapOverlaps & llvm::IntervalMapOverlaps< MapA, MapB >::operator++ ( )
inline

Preincrement - Move to the next overlap.

Definition at line 2194 of file IntervalMap.h.

References llvm::IntervalMapOverlaps< MapA, MapB >::skipA(), and llvm::IntervalMapOverlaps< MapA, MapB >::skipB().

◆ skipA()

template<typename MapA , typename MapB >
void llvm::IntervalMapOverlaps< MapA, MapB >::skipA ( )
inline

skipA - Move to the next overlap that doesn't involve a().

Definition at line 2182 of file IntervalMap.h.

Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::operator++().

◆ skipB()

template<typename MapA , typename MapB >
void llvm::IntervalMapOverlaps< MapA, MapB >::skipB ( )
inline

skipB - Move to the next overlap that doesn't involve b().

Definition at line 2188 of file IntervalMap.h.

Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::operator++().

◆ start()

template<typename MapA , typename MapB >
KeyType llvm::IntervalMapOverlaps< MapA, MapB >::start ( ) const
inline

start - Beginning of the overlapping interval.

Definition at line 2168 of file IntervalMap.h.

References llvm::IntervalMapOverlaps< MapA, MapB >::a(), and llvm::IntervalMapOverlaps< MapA, MapB >::b().

◆ stop()

template<typename MapA , typename MapB >
KeyType llvm::IntervalMapOverlaps< MapA, MapB >::stop ( ) const
inline

stop - End of the overlapping interval.

Definition at line 2175 of file IntervalMap.h.

References llvm::IntervalMapOverlaps< MapA, MapB >::a(), and llvm::IntervalMapOverlaps< MapA, MapB >::b().

◆ valid()

template<typename MapA , typename MapB >
bool llvm::IntervalMapOverlaps< MapA, MapB >::valid ( ) const
inline

valid - Return true if iterator is at an overlap.

Definition at line 2157 of file IntervalMap.h.

Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::advanceTo().


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