LLVM API Documentation

llvm::ImmutableSet< ValT, ValInfo > Class Template Reference

#include <ImmutableSet.h>

Collaboration diagram for llvm::ImmutableSet< ValT, ValInfo >:
[legend]

List of all members.

Public Types

typedef ValInfo::value_type value_type
typedef ValInfo::value_type_ref value_type_ref
typedef ImutAVLTree< ValInfo > TreeTy

Public Member Functions

 ImmutableSet (TreeTy *R)
bool contains (value_type_ref V) const
 contains - Returns true if the set contains the specified value.
bool operator== (ImmutableSet RHS) const
bool operator!= (ImmutableSet RHS) const
TreeTy * getRoot () const
bool isEmpty () const
 isEmpty - Return true if the set contains no elements.
bool isSingleton () const
template<typename Callback>
void foreach (Callback &C)
template<typename Callback>
void foreach ()
iterator begin () const
iterator end () const
unsigned getHeight () const
void Profile (FoldingSetNodeID &ID) const
void verify () const

Static Public Member Functions

static void Profile (FoldingSetNodeID &ID, const ImmutableSet &S)

Friends

class Factory

Classes

class  Factory
class  iterator


Detailed Description

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
class llvm::ImmutableSet< ValT, ValInfo >

Definition at line 935 of file ImmutableSet.h.


Member Typedef Documentation

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
typedef ValInfo::value_type llvm::ImmutableSet< ValT, ValInfo >::value_type

Definition at line 937 of file ImmutableSet.h.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
typedef ValInfo::value_type_ref llvm::ImmutableSet< ValT, ValInfo >::value_type_ref

Definition at line 938 of file ImmutableSet.h.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
typedef ImutAVLTree<ValInfo> llvm::ImmutableSet< ValT, ValInfo >::TreeTy

Definition at line 939 of file ImmutableSet.h.


Constructor & Destructor Documentation

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
llvm::ImmutableSet< ValT, ValInfo >::ImmutableSet ( TreeTy *  R  )  [inline, explicit]

Constructs a set from a pointer to a tree root. In general one should use a Factory object to create sets instead of directly invoking the constructor, but there are cases where make this constructor public is useful.

Definition at line 949 of file ImmutableSet.h.

Referenced by llvm::ImmutableSet< ValT, ValInfo >::Factory::Add(), llvm::ImmutableSet< ValT, ValInfo >::Factory::GetEmptySet(), and llvm::ImmutableSet< ValT, ValInfo >::Factory::Remove().


Member Function Documentation

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
bool llvm::ImmutableSet< ValT, ValInfo >::contains ( value_type_ref  V  )  const [inline]

contains - Returns true if the set contains the specified value.

Definition at line 995 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
bool llvm::ImmutableSet< ValT, ValInfo >::operator== ( ImmutableSet< ValT, ValInfo >  RHS  )  const [inline]

Definition at line 999 of file ImmutableSet.h.

References llvm::ImmutableSet< ValT, ValInfo >::Root, and Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
bool llvm::ImmutableSet< ValT, ValInfo >::operator!= ( ImmutableSet< ValT, ValInfo >  RHS  )  const [inline]

Definition at line 1003 of file ImmutableSet.h.

References llvm::ImmutableSet< ValT, ValInfo >::Root, and Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
TreeTy* llvm::ImmutableSet< ValT, ValInfo >::getRoot (  )  const [inline]

Definition at line 1007 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
bool llvm::ImmutableSet< ValT, ValInfo >::isEmpty (  )  const [inline]

isEmpty - Return true if the set contains no elements.

Definition at line 1010 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
bool llvm::ImmutableSet< ValT, ValInfo >::isSingleton (  )  const [inline]

isSingleton - Return true if the set contains exactly one element. This method runs in constant time.

Definition at line 1014 of file ImmutableSet.h.

References llvm::ImmutableSet< ValT, ValInfo >::getHeight().

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
template<typename Callback>
void llvm::ImmutableSet< ValT, ValInfo >::foreach ( Callback &  C  )  [inline]

Definition at line 1017 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
template<typename Callback>
void llvm::ImmutableSet< ValT, ValInfo >::foreach (  )  [inline]

Definition at line 1020 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
iterator llvm::ImmutableSet< ValT, ValInfo >::begin (  )  const [inline]

Definition at line 1042 of file ImmutableSet.h.

References Root.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
iterator llvm::ImmutableSet< ValT, ValInfo >::end (  )  const [inline]

Definition at line 1043 of file ImmutableSet.h.

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
unsigned llvm::ImmutableSet< ValT, ValInfo >::getHeight (  )  const [inline]

Definition at line 1049 of file ImmutableSet.h.

References Root.

Referenced by llvm::ImmutableSet< ValT, ValInfo >::isSingleton().

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
static void llvm::ImmutableSet< ValT, ValInfo >::Profile ( FoldingSetNodeID &  ID,
const ImmutableSet< ValT, ValInfo > &  S 
) [inline, static]

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
void llvm::ImmutableSet< ValT, ValInfo >::Profile ( FoldingSetNodeID &  ID  )  const [inline]

Definition at line 1055 of file ImmutableSet.h.

References llvm::ImmutableSet< ValT, ValInfo >::Profile().

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
void llvm::ImmutableSet< ValT, ValInfo >::verify (  )  const [inline]

Definition at line 1063 of file ImmutableSet.h.

References Root.


Friends And Related Function Documentation

template<typename ValT, typename ValInfo = ImutContainerInfo<ValT>>
friend class Factory [friend]

Definition at line 992 of file ImmutableSet.h.


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