LLVM API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
llvm::ImmutableMapRef< KeyT, ValT, ValInfo > Class Template Reference

#include <ImmutableMap.h>

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

List of all members.

Classes

class  iterator

Public Types

typedef ValInfo::value_type value_type
typedef ValInfo::value_type_ref value_type_ref
typedef ValInfo::key_type key_type
typedef ValInfo::key_type_ref key_type_ref
typedef ValInfo::data_type data_type
typedef ValInfo::data_type_ref data_type_ref
typedef ImutAVLTree< ValInfo > TreeTy
typedef TreeTy::Factory FactoryTy

Public Member Functions

 ImmutableMapRef (const TreeTy *R, FactoryTy *F)
 ImmutableMapRef (const ImmutableMap< KeyT, ValT > &X, typename ImmutableMap< KeyT, ValT >::Factory &F)
 ImmutableMapRef (const ImmutableMapRef &X)
ImmutableMapRefoperator= (const ImmutableMapRef &X)
 ~ImmutableMapRef ()
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
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 272 of file ImmutableMap.h.


Member Typedef Documentation

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

Definition at line 278 of file ImmutableMap.h.

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

Definition at line 279 of file ImmutableMap.h.

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

Definition at line 281 of file ImmutableMap.h.

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

Definition at line 276 of file ImmutableMap.h.

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

Definition at line 277 of file ImmutableMap.h.

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

Definition at line 280 of file ImmutableMap.h.

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

Definition at line 274 of file ImmutableMap.h.

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

Definition at line 275 of file ImmutableMap.h.


Constructor & Destructor Documentation

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

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 292 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::retain(), and llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Root.

Referenced by llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::add(), llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getEmptyMap(), and llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::remove().

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 
) [inline, explicit]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::ImmutableMapRef ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  X) [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::~ImmutableMapRef ( ) [inline]

Member Function Documentation

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]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMap<KeyT, ValT> llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::asImmutableMap ( ) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
iterator llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::begin ( ) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::contains ( key_type_ref  K) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
iterator llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::end ( ) const [inline]

Definition at line 404 of file ImmutableMap.h.

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
static ImmutableMapRef llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getEmptyMap ( FactoryTy F) [inline, static]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
unsigned llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getHeight ( ) const [inline]
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 418 of file ImmutableMap.h.

References llvm::ImutAVLTree< ImutInfo >::getMaxElement(), llvm::ImutAVLTree< ImutInfo >::getValue(), and llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Root.

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::isEmpty ( ) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
data_type* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::lookup ( key_type_ref  K) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::manualRelease ( ) [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::manualRetain ( ) [inline]
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]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMapRef& llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::operator= ( const ImmutableMapRef< KeyT, ValT, ValInfo > &  X) [inline]
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]
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 
) [inline, static]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Profile ( FoldingSetNodeID ID) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMapRef llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::remove ( key_type_ref  K) const [inline]
template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::verify ( ) const [inline]

Member Data Documentation

template<typename KeyT , typename ValT , typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
FactoryTy* llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Factory [protected]
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: