LLVM API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions
llvm::ImmutableSetRef< ValT, ValInfo > Class Template Reference

#include <ImmutableSet.h>

List of all members.

Classes

class  iterator

Public Types

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

Public Member Functions

 ImmutableSetRef (TreeTy *R, FactoryTy *F)
 ImmutableSetRef (const ImmutableSetRef &X)
ImmutableSetRefoperator= (const ImmutableSetRef &X)
 ~ImmutableSetRef ()
ImmutableSetRef add (value_type_ref V)
ImmutableSetRef remove (value_type_ref V)
bool contains (value_type_ref V) const
 Returns true if the set contains the specified value.
ImmutableSet< ValTasImmutableSet (bool canonicalize=true) const
TreeTygetRootWithoutRetain () const
bool operator== (const ImmutableSetRef &RHS) const
bool operator!= (const ImmutableSetRef &RHS) const
bool isEmpty () const
 isEmpty - Return true if the set contains no elements.
bool isSingleton () const
iterator begin () const
iterator end () const
unsigned getHeight () const
void Profile (FoldingSetNodeID &ID) const
void validateTree () const

Static Public Member Functions

static ImmutableSetRef getEmptySet (FactoryTy *F)
static void Profile (FoldingSetNodeID &ID, const ImmutableSetRef &S)

Detailed Description

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

Definition at line 1114 of file ImmutableSet.h.


Member Typedef Documentation

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
typedef TreeTy::Factory llvm::ImmutableSetRef< ValT, ValInfo >::FactoryTy

Definition at line 1119 of file ImmutableSet.h.

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

Definition at line 1118 of file ImmutableSet.h.

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

Definition at line 1116 of file ImmutableSet.h.

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

Definition at line 1117 of file ImmutableSet.h.


Constructor & Destructor Documentation

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
llvm::ImmutableSetRef< ValT, ValInfo >::ImmutableSetRef ( TreeTy R,
FactoryTy F 
) [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 1130 of file ImmutableSet.h.

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

Referenced by llvm::ImmutableSetRef< ValT, ValInfo >::add(), llvm::ImmutableSetRef< ValT, ValInfo >::getEmptySet(), and llvm::ImmutableSetRef< ValT, ValInfo >::remove().

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
llvm::ImmutableSetRef< ValT, ValInfo >::ImmutableSetRef ( const ImmutableSetRef< ValT, ValInfo > &  X) [inline]

Definition at line 1135 of file ImmutableSet.h.

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

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
llvm::ImmutableSetRef< ValT, ValInfo >::~ImmutableSetRef ( ) [inline]

Definition at line 1149 of file ImmutableSet.h.

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


Member Function Documentation

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
ImmutableSetRef llvm::ImmutableSetRef< ValT, ValInfo >::add ( value_type_ref  V) [inline]
template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
ImmutableSet<ValT> llvm::ImmutableSetRef< ValT, ValInfo >::asImmutableSet ( bool  canonicalize = true) const [inline]
template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
iterator llvm::ImmutableSetRef< ValT, ValInfo >::begin ( ) const [inline]

Definition at line 1214 of file ImmutableSet.h.

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

Returns true if the set contains the specified value.

Definition at line 1166 of file ImmutableSet.h.

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

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

Definition at line 1215 of file ImmutableSet.h.

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
static ImmutableSetRef llvm::ImmutableSetRef< ValT, ValInfo >::getEmptySet ( FactoryTy F) [inline, static]
template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
unsigned llvm::ImmutableSetRef< ValT, ValInfo >::getHeight ( ) const [inline]
template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
TreeTy* llvm::ImmutableSetRef< ValT, ValInfo >::getRootWithoutRetain ( ) const [inline]

Definition at line 1175 of file ImmutableSet.h.

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

isEmpty - Return true if the set contains no elements.

Definition at line 1188 of file ImmutableSet.h.

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

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

Definition at line 1192 of file ImmutableSet.h.

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

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

Definition at line 1183 of file ImmutableSet.h.

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

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

Definition at line 1179 of file ImmutableSet.h.

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

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

Definition at line 1235 of file ImmutableSet.h.

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


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