LLVM API Documentation

Public Types | Public Member Functions | Friends
llvm::ImutAVLTree< ImutInfo > Class Template Reference

#include <ImmutableSet.h>

List of all members.

Public Types

typedef ImutInfo::key_type_ref key_type_ref
typedef ImutInfo::value_type value_type
typedef ImutInfo::value_type_ref value_type_ref
typedef ImutAVLFactory< ImutInfo > Factory
typedef
ImutAVLTreeInOrderIterator
< ImutInfo > 
iterator

Public Member Functions

ImutAVLTreegetLeft () const
ImutAVLTreegetRight () const
unsigned getHeight () const
const value_typegetValue () const
 getValue - Returns the data value associated with the tree node.
ImutAVLTreefind (key_type_ref K)
ImutAVLTreegetMaxElement ()
unsigned size () const
iterator begin () const
iterator end () const
bool isElementEqual (value_type_ref V) const
bool isElementEqual (const ImutAVLTree *RHS) const
bool isEqual (const ImutAVLTree &RHS) const
bool isNotEqual (const ImutAVLTree &RHS) const
bool contains (key_type_ref K)
template<typename Callback >
void foreach (Callback &C)
unsigned validateTree () const
void retain ()
void release ()
void destroy ()

Friends

class ImutAVLFactory< ImutInfo >
class ImutIntervalAVLFactory< ImutInfo >
class ImutAVLTreeGenericIterator< ImutInfo >

Detailed Description

template<typename ImutInfo>
class llvm::ImutAVLTree< ImutInfo >

Definition at line 38 of file ImmutableSet.h.


Member Typedef Documentation

template<typename ImutInfo >
typedef ImutAVLFactory<ImutInfo> llvm::ImutAVLTree< ImutInfo >::Factory

Definition at line 44 of file ImmutableSet.h.

template<typename ImutInfo >
typedef ImutAVLTreeInOrderIterator<ImutInfo> llvm::ImutAVLTree< ImutInfo >::iterator

Definition at line 50 of file ImmutableSet.h.

template<typename ImutInfo >
typedef ImutInfo::key_type_ref llvm::ImutAVLTree< ImutInfo >::key_type_ref

Definition at line 40 of file ImmutableSet.h.

template<typename ImutInfo >
typedef ImutInfo::value_type llvm::ImutAVLTree< ImutInfo >::value_type

Definition at line 41 of file ImmutableSet.h.

template<typename ImutInfo >
typedef ImutInfo::value_type_ref llvm::ImutAVLTree< ImutInfo >::value_type_ref

Definition at line 42 of file ImmutableSet.h.


Member Function Documentation

template<typename ImutInfo >
iterator llvm::ImutAVLTree< ImutInfo >::begin ( ) const [inline]

begin - Returns an iterator that iterates over the nodes of the tree in an inorder traversal. The returned iterator thus refers to the the tree node with the minimum data element.

Definition at line 110 of file ImmutableSet.h.

Referenced by llvm::ImutAVLFactory< ImutInfo >::compareTreeWithSection(), and llvm::ImutAVLTree< ImutInfo >::isEqual().

template<typename ImutInfo >
bool llvm::ImutAVLTree< ImutInfo >::contains ( key_type_ref  K) [inline]

contains - Returns true if this tree contains a subtree (node) that has an data element that matches the specified key. Complexity is logarithmic in the size of the tree.

Definition at line 168 of file ImmutableSet.h.

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

Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo >::contains(), llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::contains(), llvm::ImmutableSet< ValT, ValInfo >::contains(), and llvm::ImmutableSetRef< ValT, ValInfo >::contains().

template<typename ImutInfo >
void llvm::ImutAVLTree< ImutInfo >::destroy ( ) [inline]
template<typename ImutInfo >
iterator llvm::ImutAVLTree< ImutInfo >::end ( ) const [inline]

end - Returns an iterator for the tree that denotes the end of an inorder traversal.

Definition at line 114 of file ImmutableSet.h.

Referenced by llvm::ImutAVLFactory< ImutInfo >::compareTreeWithSection(), and llvm::ImutAVLTree< ImutInfo >::isEqual().

template<typename ImutInfo >
ImutAVLTree* llvm::ImutAVLTree< ImutInfo >::find ( key_type_ref  K) [inline]

find - Finds the subtree associated with the specified key value. This method returns NULL if no matching subtree is found.

Definition at line 73 of file ImmutableSet.h.

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

Referenced by llvm::ImutAVLTree< ImutInfo >::contains(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::lookup(), and llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::lookup().

template<typename ImutInfo >
template<typename Callback >
void llvm::ImutAVLTree< ImutInfo >::foreach ( Callback &  C) [inline]

foreach - A member template the accepts invokes operator() on a functor object (specifed by Callback) for every node/subtree in the tree. Nodes are visited using an inorder traversal.

Definition at line 174 of file ImmutableSet.h.

References llvm::CallingConv::C, llvm::ImutAVLTree< ImutInfo >::getLeft(), and llvm::ImutAVLTree< ImutInfo >::getRight().

Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo >::foreach(), and llvm::ImmutableSet< ValT, ValInfo >::foreach().

template<typename ImutInfo >
unsigned llvm::ImutAVLTree< ImutInfo >::getHeight ( ) const [inline]
template<typename ImutInfo >
ImutAVLTree* llvm::ImutAVLTree< ImutInfo >::getLeft ( ) const [inline]
template<typename ImutInfo >
ImutAVLTree* llvm::ImutAVLTree< ImutInfo >::getMaxElement ( ) [inline]

getMaxElement - Find the subtree associated with the highest ranged key value.

Definition at line 89 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getRight(), and T.

Referenced by llvm::ImmutableMap< KeyT, ValT, ValInfo >::getMaxElement(), and llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getMaxElement().

template<typename ImutInfo >
ImutAVLTree* llvm::ImutAVLTree< ImutInfo >::getRight ( ) const [inline]
template<typename ImutInfo >
const value_type& llvm::ImutAVLTree< ImutInfo >::getValue ( ) const [inline]
template<typename ImutInfo >
bool llvm::ImutAVLTree< ImutInfo >::isElementEqual ( value_type_ref  V) const [inline]
template<typename ImutInfo >
bool llvm::ImutAVLTree< ImutInfo >::isElementEqual ( const ImutAVLTree< ImutInfo > *  RHS) const [inline]
template<typename ImutInfo >
bool llvm::ImutAVLTree< ImutInfo >::isEqual ( const ImutAVLTree< ImutInfo > &  RHS) const [inline]
template<typename ImutInfo >
bool llvm::ImutAVLTree< ImutInfo >::isNotEqual ( const ImutAVLTree< ImutInfo > &  RHS) const [inline]
template<typename ImutInfo >
void llvm::ImutAVLTree< ImutInfo >::release ( ) [inline]
template<typename ImutInfo >
void llvm::ImutAVLTree< ImutInfo >::retain ( ) [inline]
template<typename ImutInfo >
unsigned llvm::ImutAVLTree< ImutInfo >::size ( ) const [inline]

size - Returns the number of nodes in the tree, which includes both leaves and non-leaf nodes.

Definition at line 98 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getLeft(), and llvm::ImutAVLTree< ImutInfo >::getRight().

template<typename ImutInfo >
unsigned llvm::ImutAVLTree< ImutInfo >::validateTree ( ) const [inline]

validateTree - A utility method that checks that the balancing and ordering invariants of the tree are satisifed. It is a recursive method that returns the height of the tree, which is then consumed by the enclosing validateTree call. External callers should ignore the return value. An invalid tree will cause an assertion to fire in a debug build.

Definition at line 190 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getHeight(), llvm::ImutAVLTree< ImutInfo >::getLeft(), llvm::ImutAVLTree< ImutInfo >::getRight(), llvm::ImutAVLTree< ImutInfo >::getValue(), and llvm::ImutAVLTree< ImutInfo >::validateTree().

Referenced by llvm::ImutAVLTree< ImutInfo >::validateTree(), llvm::ImmutableSet< ValT, ValInfo >::validateTree(), and llvm::ImmutableSetRef< ValT, ValInfo >::validateTree().


Friends And Related Function Documentation

template<typename ImutInfo >
friend class ImutAVLFactory< ImutInfo > [friend]

Definition at line 45 of file ImmutableSet.h.

template<typename ImutInfo >
friend class ImutAVLTreeGenericIterator< ImutInfo > [friend]

Definition at line 48 of file ImmutableSet.h.

template<typename ImutInfo >
friend class ImutIntervalAVLFactory< ImutInfo > [friend]

Definition at line 46 of file ImmutableSet.h.


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