LLVM API Documentation
#include <ImmutableMap.h>
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) | |
ImmutableMap & | operator= (const ImmutableMap &X) |
~ImmutableMap () | |
bool | contains (key_type_ref K) const |
bool | operator== (const ImmutableMap &RHS) const |
bool | operator!= (const ImmutableMap &RHS) const |
TreeTy * | getRoot () const |
TreeTy * | getRootWithoutRetain () 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_type * | lookup (key_type_ref K) const |
value_type * | getMaxElement () const |
unsigned | getHeight () const |
void | Profile (FoldingSetNodeID &ID) const |
Static Public Member Functions | |
static void | Profile (FoldingSetNodeID &ID, const ImmutableMap &M) |
Protected Attributes | |
TreeTy * | Root |
Definition at line 61 of file ImmutableMap.h.
typedef ValInfo::data_type llvm::ImmutableMap< KeyT, ValT, ValInfo >::data_type |
Definition at line 67 of file ImmutableMap.h.
typedef ValInfo::data_type_ref llvm::ImmutableMap< KeyT, ValT, ValInfo >::data_type_ref |
Definition at line 68 of file ImmutableMap.h.
typedef ValInfo::key_type llvm::ImmutableMap< KeyT, ValT, ValInfo >::key_type |
Definition at line 65 of file ImmutableMap.h.
typedef ValInfo::key_type_ref llvm::ImmutableMap< KeyT, ValT, ValInfo >::key_type_ref |
Definition at line 66 of file ImmutableMap.h.
typedef ImutAVLTree<ValInfo> llvm::ImmutableMap< KeyT, ValT, ValInfo >::TreeTy |
Definition at line 69 of file ImmutableMap.h.
typedef ValInfo::value_type llvm::ImmutableMap< KeyT, ValT, ValInfo >::value_type |
Definition at line 63 of file ImmutableMap.h.
typedef ValInfo::value_type_ref llvm::ImmutableMap< KeyT, ValT, ValInfo >::value_type_ref |
Definition at line 64 of file ImmutableMap.h.
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().
llvm::ImmutableMap< KeyT, ValT, ValInfo >::ImmutableMap | ( | const ImmutableMap< KeyT, ValT, ValInfo > & | X | ) | [inline] |
Definition at line 82 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::retain(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
llvm::ImmutableMap< KeyT, ValT, ValInfo >::~ImmutableMap | ( | ) | [inline] |
Definition at line 93 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::release(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
iterator llvm::ImmutableMap< KeyT, ValT, ValInfo >::begin | ( | ) | const [inline] |
Definition at line 235 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::contains | ( | key_type_ref | K | ) | const [inline] |
Definition at line 129 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::contains(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
iterator llvm::ImmutableMap< KeyT, ValT, ValInfo >::end | ( | ) | const [inline] |
Definition at line 236 of file ImmutableMap.h.
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach | ( | Callback & | C | ) | [inline] |
Definition at line 181 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::foreach(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach | ( | ) | [inline] |
Definition at line 189 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::foreach(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
unsigned llvm::ImmutableMap< KeyT, ValT, ValInfo >::getHeight | ( | ) | const [inline] |
Definition at line 258 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::getHeight(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
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.
TreeTy* llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRoot | ( | ) | const [inline] |
Definition at line 141 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::retain(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
TreeTy* llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRootWithoutRetain | ( | ) | const [inline] |
Definition at line 146 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::isEmpty | ( | ) | const [inline] |
Definition at line 158 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
data_type* llvm::ImmutableMap< KeyT, ValT, ValInfo >::lookup | ( | key_type_ref | K | ) | const [inline] |
Definition at line 238 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::find(), llvm::ImutAVLTree< ImutInfo >::getValue(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRelease | ( | ) | [inline] |
Definition at line 154 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::release(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRetain | ( | ) | [inline] |
Definition at line 150 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::retain(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator!= | ( | const ImmutableMap< KeyT, ValT, ValInfo > & | RHS | ) | const [inline] |
Definition at line 137 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::isNotEqual(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
ImmutableMap& llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator= | ( | const ImmutableMap< KeyT, ValT, ValInfo > & | X | ) | [inline] |
Definition at line 85 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::release(), llvm::ImutAVLTree< ImutInfo >::retain(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
bool llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator== | ( | const ImmutableMap< KeyT, ValT, ValInfo > & | RHS | ) | const [inline] |
Definition at line 133 of file ImmutableMap.h.
References llvm::ImutAVLTree< ImutInfo >::isEqual(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
static void llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile | ( | FoldingSetNodeID & | ID, |
const ImmutableMap< KeyT, ValT, ValInfo > & | M | ||
) | [inline, static] |
Definition at line 260 of file ImmutableMap.h.
References llvm::FoldingSetNodeID::AddPointer(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile().
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile | ( | FoldingSetNodeID & | ID | ) | const [inline] |
Definition at line 264 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile().
void llvm::ImmutableMap< KeyT, ValT, ValInfo >::verify | ( | ) | const [inline] |
Definition at line 200 of file ImmutableMap.h.
References llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root.
TreeTy* llvm::ImmutableMap< KeyT, ValT, ValInfo >::Root [protected] |
Definition at line 72 of file ImmutableMap.h.
Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo >::Factory::add(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::begin(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::contains(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::getHeight(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::getMaxElement(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRoot(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::getRootWithoutRetain(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::ImmutableMap(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::isEmpty(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::lookup(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRelease(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::manualRetain(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator!=(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator=(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::operator==(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::verify(), and llvm::ImmutableMap< KeyT, ValT, ValInfo >::~ImmutableMap().