clang  6.0.0svn
Classes | Public Types | Public Member Functions | Friends | List of all members
clang::ContinuousRangeMap< Int, V, InitialCapacity > Class Template Reference

A map from continuous integer ranges to some value, with a very specialized interface. More...

#include "clang/Serialization/ContinuousRangeMap.h"

Inheritance diagram for clang::ContinuousRangeMap< Int, V, InitialCapacity >:
Inheritance graph
[legend]

Classes

class  Builder
 An object that helps properly build a continuous range map from a set of values. More...
 

Public Types

using value_type = std::pair< Int, V >
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using iterator = typename Representation::iterator
 
using const_iterator = typename Representation::const_iterator
 

Public Member Functions

void insert (const value_type &Val)
 
void insertOrReplace (const value_type &Val)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator find (Int K)
 
const_iterator find (Int K) const
 
reference back ()
 
const_reference back () const
 

Friends

class Builder
 

Detailed Description

template<typename Int, typename V, unsigned InitialCapacity>
class clang::ContinuousRangeMap< Int, V, InitialCapacity >

A map from continuous integer ranges to some value, with a very specialized interface.

CRM maps from integer ranges to values. The ranges are continuous, i.e. where one ends, the next one begins. So if the map contains the stops I0-3, the first range is from I0 to I1, the second from I1 to I2, the third from I2 to I3 and the last from I3 to infinity.

Ranges must be inserted in order. Inserting a new stop I4 into the map will shrink the fourth range to I3 to I4 and add the new range I4 to inf.

Definition at line 37 of file ContinuousRangeMap.h.

Member Typedef Documentation

◆ const_iterator

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::const_iterator = typename Representation::const_iterator

Definition at line 86 of file ContinuousRangeMap.h.

◆ const_pointer

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::const_pointer = const value_type *

Definition at line 43 of file ContinuousRangeMap.h.

◆ const_reference

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::const_reference = const value_type &

Definition at line 41 of file ContinuousRangeMap.h.

◆ iterator

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::iterator = typename Representation::iterator

Definition at line 85 of file ContinuousRangeMap.h.

◆ pointer

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::pointer = value_type *

Definition at line 42 of file ContinuousRangeMap.h.

◆ reference

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::reference = value_type &

Definition at line 40 of file ContinuousRangeMap.h.

◆ value_type

template<typename Int, typename V, unsigned InitialCapacity>
using clang::ContinuousRangeMap< Int, V, InitialCapacity >::value_type = std::pair<Int, V>

Definition at line 39 of file ContinuousRangeMap.h.

Member Function Documentation

◆ back() [1/2]

template<typename Int, typename V, unsigned InitialCapacity>
reference clang::ContinuousRangeMap< Int, V, InitialCapacity >::back ( )
inline

Definition at line 106 of file ContinuousRangeMap.h.

◆ back() [2/2]

template<typename Int, typename V, unsigned InitialCapacity>
const_reference clang::ContinuousRangeMap< Int, V, InitialCapacity >::back ( ) const
inline

Definition at line 107 of file ContinuousRangeMap.h.

◆ begin() [1/2]

template<typename Int, typename V, unsigned InitialCapacity>
iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::begin ( )
inline

Definition at line 88 of file ContinuousRangeMap.h.

◆ begin() [2/2]

template<typename Int, typename V, unsigned InitialCapacity>
const_iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::begin ( ) const
inline

Definition at line 90 of file ContinuousRangeMap.h.

◆ end() [1/2]

template<typename Int, typename V, unsigned InitialCapacity>
iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::end ( )
inline

Definition at line 89 of file ContinuousRangeMap.h.

Referenced by clang::ASTReader::TranslateSourceLocation().

◆ end() [2/2]

template<typename Int, typename V, unsigned InitialCapacity>
const_iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::end ( ) const
inline

Definition at line 91 of file ContinuousRangeMap.h.

◆ find() [1/2]

template<typename Int, typename V, unsigned InitialCapacity>
iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::find ( Int  K)
inline

◆ find() [2/2]

template<typename Int, typename V, unsigned InitialCapacity>
const_iterator clang::ContinuousRangeMap< Int, V, InitialCapacity >::find ( Int  K) const
inline

Definition at line 102 of file ContinuousRangeMap.h.

◆ insert()

template<typename Int, typename V, unsigned InitialCapacity>
void clang::ContinuousRangeMap< Int, V, InitialCapacity >::insert ( const value_type Val)
inline

Definition at line 66 of file ContinuousRangeMap.h.

◆ insertOrReplace()

template<typename Int, typename V, unsigned InitialCapacity>
void clang::ContinuousRangeMap< Int, V, InitialCapacity >::insertOrReplace ( const value_type Val)
inline

Definition at line 75 of file ContinuousRangeMap.h.

Friends And Related Function Documentation

◆ Builder

template<typename Int, typename V, unsigned InitialCapacity>
friend class Builder
friend

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