LLVM  8.0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::ImmutableMapRef< KeyT, ValT, ValInfo > Class Template Reference

#include "llvm/ADT/ImmutableMap.h"

Collaboration diagram for llvm::ImmutableMapRef< KeyT, ValT, ValInfo >:
Collaboration graph
[legend]

Classes

class  iterator
 

Public Types

using value_type = typename ValInfo::value_type
 
using value_type_ref = typename ValInfo::value_type_ref
 
using key_type = typename ValInfo::key_type
 
using key_type_ref = typename ValInfo::key_type_ref
 
using data_type = typename ValInfo::data_type
 
using data_type_ref = typename ValInfo::data_type_ref
 
using TreeTy = ImutAVLTree< ValInfo >
 
using FactoryTy = typename TreeTy::Factory
 

Public Member Functions

 ImmutableMapRef (const TreeTy *R, FactoryTy *F)
 Constructs a map from a pointer to a tree root. More...
 
 ImmutableMapRef (const ImmutableMap< KeyT, ValT > &X, typename ImmutableMap< KeyT, ValT >::Factory &F)
 
 ImmutableMapRef (const ImmutableMapRef &X)
 
 ~ImmutableMapRef ()
 
ImmutableMapRefoperator= (const ImmutableMapRef &X)
 
void manualRetain ()
 
void manualRelease ()
 
ImmutableMapRef add (key_type_ref K, data_type_ref D) const
 
ImmutableMapRef remove (key_type_ref K) const
 
bool contains (key_type_ref K) const
 
ImmutableMap< KeyT, ValTasImmutableMap () const
 
bool operator== (const ImmutableMapRef &RHS) const
 
bool operator!= (const ImmutableMapRef &RHS) const
 
bool isEmpty () const
 
void verify () const
 
iterator begin () const
 
iterator end () const
 
data_typelookup (key_type_ref K) const
 
value_typegetMaxElement () const
 getMaxElement - Returns the <key,value> pair in the ImmutableMap for which key is the highest in the ordering of keys in the map. More...
 
unsigned getHeight () const
 
void Profile (FoldingSetNodeID &ID) const
 

Static Public Member Functions

static ImmutableMapRef getEmptyMap (FactoryTy *F)
 
static void Profile (FoldingSetNodeID &ID, const ImmutableMapRef &M)
 

Protected Attributes

TreeTyRoot
 
FactoryTyFactory
 

Detailed Description

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
class llvm::ImmutableMapRef< KeyT, ValT, ValInfo >

Definition at line 258 of file ImmutableMap.h.

Member Typedef Documentation

◆ data_type

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::data_type = typename ValInfo::data_type

Definition at line 264 of file ImmutableMap.h.

◆ data_type_ref

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::data_type_ref = typename ValInfo::data_type_ref

Definition at line 265 of file ImmutableMap.h.

◆ FactoryTy

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::FactoryTy = typename TreeTy::Factory

Definition at line 267 of file ImmutableMap.h.

◆ key_type

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::key_type = typename ValInfo::key_type

Definition at line 262 of file ImmutableMap.h.

◆ key_type_ref

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::key_type_ref = typename ValInfo::key_type_ref

Definition at line 263 of file ImmutableMap.h.

◆ TreeTy

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::TreeTy = ImutAVLTree<ValInfo>

Definition at line 266 of file ImmutableMap.h.

◆ value_type

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::value_type = typename ValInfo::value_type

Definition at line 260 of file ImmutableMap.h.

◆ value_type_ref

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
using llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::value_type_ref = typename ValInfo::value_type_ref

Definition at line 261 of file ImmutableMap.h.

Constructor & Destructor Documentation

◆ ImmutableMapRef() [1/3]

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::ImmutableMapRef ( const TreeTy R,
FactoryTy F 
)
inlineexplicit

Constructs a map from a pointer to a tree root.

In general one should use a Factory object to create maps instead of directly invoking the constructor, but there are cases where make this constructor public is useful.

Definition at line 278 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::retain().

◆ ImmutableMapRef() [2/3]

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::ImmutableMapRef ( const ImmutableMap< KeyT, ValT > &  X,
typename ImmutableMap< KeyT, ValT >::Factory F 
)
inlineexplicit

Definition at line 285 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::retain().

◆ ImmutableMapRef() [3/3]

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::ImmutableMapRef ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  X)
inline

Definition at line 292 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::retain().

◆ ~ImmutableMapRef()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::~ImmutableMapRef ( )
inline

Definition at line 298 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::release().

Member Function Documentation

◆ add()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMapRef llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::add ( key_type_ref  K,
data_type_ref  D 
) const
inline

Definition at line 329 of file ImmutableMap.h.

◆ asImmutableMap()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMap<KeyT, ValT> llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::asImmutableMap ( ) const
inline

Definition at line 343 of file ImmutableMap.h.

◆ begin()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
iterator llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::begin ( ) const
inline

Definition at line 381 of file ImmutableMap.h.

◆ contains()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::contains ( key_type_ref  K) const
inline

Definition at line 339 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::contains().

◆ end()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
iterator llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::end ( ) const
inline

Definition at line 382 of file ImmutableMap.h.

◆ getEmptyMap()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
static ImmutableMapRef llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getEmptyMap ( FactoryTy F)
inlinestatic

Definition at line 317 of file ImmutableMap.h.

◆ getHeight()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
unsigned llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getHeight ( ) const
inline

Definition at line 404 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::getHeight().

◆ getMaxElement()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
value_type* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getMaxElement ( ) const
inline

getMaxElement - Returns the <key,value> pair in the ImmutableMap for which key is the highest in the ordering of keys in the map.

This method returns NULL if the map is empty.

Definition at line 396 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::getMaxElement(), and llvm::ImutAVLTree< ImutInfo >::getValue().

◆ isEmpty()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::isEmpty ( ) const
inline

Definition at line 355 of file ImmutableMap.h.

◆ lookup()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
data_type* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::lookup ( key_type_ref  K) const
inline

◆ manualRelease()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::manualRelease ( )
inline

Definition at line 325 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::release().

◆ manualRetain()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::manualRetain ( )
inline

Definition at line 321 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::retain().

◆ operator!=()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::operator!= ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  RHS) const
inline

◆ operator=()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMapRef& llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::operator= ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  X)
inline

◆ operator==()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::operator== ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  RHS) const
inline

◆ Profile() [1/2]

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
static void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Profile ( FoldingSetNodeID ID,
const ImmutableMapRef< KeyT, ValT, ValInfo > &  M 
)
inlinestatic

◆ Profile() [2/2]

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Profile ( FoldingSetNodeID ID) const
inline

◆ remove()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMapRef llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::remove ( key_type_ref  K) const
inline

Definition at line 334 of file ImmutableMap.h.

◆ verify()

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::verify ( ) const
inline

Definition at line 361 of file ImmutableMap.h.

Member Data Documentation

◆ Factory

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
FactoryTy* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Factory
protected

◆ Root

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
TreeTy* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Root
protected

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