LLVM  9.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::ImmutableSetRef< ValT, ValInfo > Class Template Reference

#include "llvm/ADT/ImmutableSet.h"

Public Types

using value_type = typename ValInfo::value_type
 
using value_type_ref = typename ValInfo::value_type_ref
 
using TreeTy = ImutAVLTree< ValInfo >
 
using FactoryTy = typename TreeTy::Factory
 
using iterator = ImutAVLValueIterator< ImmutableSetRef >
 

Public Member Functions

 ImmutableSetRef (TreeTy *R, FactoryTy *F)
 Constructs a set from a pointer to a tree root. More...
 
 ImmutableSetRef (const ImmutableSetRef &X)
 
 ~ImmutableSetRef ()
 
ImmutableSetRefoperator= (const ImmutableSetRef &X)
 
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. More...
 
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. More...
 
bool isSingleton () const
 isSingleton - Return true if the set contains exactly one element. More...
 
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 1110 of file ImmutableSet.h.

Member Typedef Documentation

◆ FactoryTy

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

Definition at line 1115 of file ImmutableSet.h.

◆ iterator

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
using llvm::ImmutableSetRef< ValT, ValInfo >::iterator = ImutAVLValueIterator<ImmutableSetRef>

Definition at line 1197 of file ImmutableSet.h.

◆ TreeTy

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

Definition at line 1114 of file ImmutableSet.h.

◆ value_type

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

Definition at line 1112 of file ImmutableSet.h.

◆ value_type_ref

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

Definition at line 1113 of file ImmutableSet.h.

Constructor & Destructor Documentation

◆ ImmutableSetRef() [1/2]

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
llvm::ImmutableSetRef< ValT, ValInfo >::ImmutableSetRef ( TreeTy R,
FactoryTy F 
)
inlineexplicit

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 1126 of file ImmutableSet.h.

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

◆ ImmutableSetRef() [2/2]

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

Definition at line 1132 of file ImmutableSet.h.

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

◆ ~ImmutableSetRef()

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

Definition at line 1138 of file ImmutableSet.h.

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

Member Function Documentation

◆ add()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
ImmutableSetRef llvm::ImmutableSetRef< ValT, ValInfo >::add ( value_type_ref  V)
inline

Definition at line 1156 of file ImmutableSet.h.

◆ asImmutableSet()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
ImmutableSet<ValT> llvm::ImmutableSetRef< ValT, ValInfo >::asImmutableSet ( bool  canonicalize = true) const
inline

Definition at line 1169 of file ImmutableSet.h.

◆ begin()

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

Definition at line 1199 of file ImmutableSet.h.

◆ contains()

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 1165 of file ImmutableSet.h.

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

◆ end()

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

Definition at line 1200 of file ImmutableSet.h.

◆ getEmptySet()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
static ImmutableSetRef llvm::ImmutableSetRef< ValT, ValInfo >::getEmptySet ( FactoryTy F)
inlinestatic

Definition at line 1152 of file ImmutableSet.h.

◆ getHeight()

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

Definition at line 1206 of file ImmutableSet.h.

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

◆ getRootWithoutRetain()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
TreeTy* llvm::ImmutableSetRef< ValT, ValInfo >::getRootWithoutRetain ( ) const
inline

Definition at line 1174 of file ImmutableSet.h.

◆ isEmpty()

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 1187 of file ImmutableSet.h.

◆ isSingleton()

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 1191 of file ImmutableSet.h.

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

◆ operator!=()

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

Definition at line 1182 of file ImmutableSet.h.

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

◆ operator=()

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

◆ operator==()

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

Definition at line 1178 of file ImmutableSet.h.

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

◆ Profile() [1/2]

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
static void llvm::ImmutableSetRef< ValT, ValInfo >::Profile ( FoldingSetNodeID ID,
const ImmutableSetRef< ValT, ValInfo > &  S 
)
inlinestatic

Definition at line 1208 of file ImmutableSet.h.

References llvm::FoldingSetNodeID::AddPointer().

◆ Profile() [2/2]

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
void llvm::ImmutableSetRef< ValT, ValInfo >::Profile ( FoldingSetNodeID ID) const
inline

◆ remove()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
ImmutableSetRef llvm::ImmutableSetRef< ValT, ValInfo >::remove ( value_type_ref  V)
inline

Definition at line 1160 of file ImmutableSet.h.

◆ validateTree()

template<typename ValT , typename ValInfo = ImutContainerInfo<ValT>>
void llvm::ImmutableSetRef< ValT, ValInfo >::validateTree ( ) const
inline

Definition at line 1218 of file ImmutableSet.h.

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


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