LLVM API Documentation

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

#include <ImmutableMap.h>

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

List of all members.

Classes

struct  CBWrapper
struct  CBWrapperRef
class  Factory
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

Public Member Functions

 ImmutableMap (const TreeTy *R)
 ImmutableMap (const ImmutableMap &X)
ImmutableMapoperator= (const ImmutableMap &X)
 ~ImmutableMap ()
bool contains (key_type_ref K) const
bool operator== (const ImmutableMap &RHS) const
bool operator!= (const ImmutableMap &RHS) const
TreeTygetRoot () const
TreeTygetRootWithoutRetain () const
void manualRetain ()
void manualRelease ()
bool isEmpty () const
template<typename Callback >
void foreach (Callback &C)
template<typename Callback >
void foreach ()
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 void Profile (FoldingSetNodeID &ID, const ImmutableMap &M)

Protected Attributes

TreeTyRoot

Detailed Description

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

Definition at line 61 of file ImmutableMap.h.


Member Typedef Documentation

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

Definition at line 67 of file ImmutableMap.h.

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

Definition at line 68 of file ImmutableMap.h.

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

Definition at line 65 of file ImmutableMap.h.

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

Definition at line 66 of file ImmutableMap.h.

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

Definition at line 69 of file ImmutableMap.h.

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

Definition at line 63 of file ImmutableMap.h.

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

Definition at line 64 of file ImmutableMap.h.


Constructor & Destructor Documentation

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMap< KeyT, ValT, ValInfo >::ImmutableMap ( const TreeTy R) [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 79 of file ImmutableMap.h.

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

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

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMap< KeyT, ValT, ValInfo >::ImmutableMap ( const ImmutableMap< KeyT, ValT, ValInfo > &  X) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
llvm::ImmutableMap< KeyT, ValT, ValInfo >::~ImmutableMap ( ) [inline]

Member Function Documentation

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

Definition at line 235 of file ImmutableMap.h.

References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::contains ( key_type_ref  K) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
iterator llvm::ImmutableMap< KeyT, ValT, ValInfo >::end ( ) const [inline]

Definition at line 236 of file ImmutableMap.h.

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
template<typename Callback >
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach ( Callback &  C) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
template<typename Callback >
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach ( ) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
unsigned llvm::ImmutableMap< KeyT, ValT, ValInfo >::getHeight ( ) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
value_type* llvm::ImmutableMap< 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 250 of file ImmutableMap.h.

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

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
TreeTy* llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRoot ( ) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
TreeTy* llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRootWithoutRetain ( ) const [inline]

Definition at line 146 of file ImmutableMap.h.

References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.

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

Definition at line 158 of file ImmutableMap.h.

References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.

template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
data_type* llvm::ImmutableMap< KeyT, ValT, ValInfo >::lookup ( key_type_ref  K) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRelease ( ) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRetain ( ) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator!= ( const ImmutableMap< KeyT, ValT, ValInfo > &  RHS) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
ImmutableMap& llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator= ( const ImmutableMap< KeyT, ValT, ValInfo > &  X) [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator== ( const ImmutableMap< KeyT, ValT, ValInfo > &  RHS) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
static void llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile ( FoldingSetNodeID ID,
const ImmutableMap< KeyT, ValT, ValInfo > &  M 
) [inline, static]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile ( FoldingSetNodeID ID) const [inline]
template<typename KeyT, typename ValT, typename ValInfo = ImutKeyValueInfo<KeyT,ValT>>
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::verify ( ) const [inline]

Definition at line 200 of file ImmutableMap.h.

References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.


Member Data Documentation

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

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