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

#include "llvm/ADT/ImmutableSet.h"

Classes

class  Factory
 

Public Types

using value_type = typename ValInfo::value_type
 
using value_type_ref = typename ValInfo::value_type_ref
 
using TreeTy = ImutAVLTree< ValInfo >
 
using iterator = ImutAVLValueIterator< ImmutableSet >
 

Public Member Functions

 ImmutableSet (TreeTy *R)
 Constructs a set from a pointer to a tree root. More...
 
 ImmutableSet (const ImmutableSet &X)
 
 ~ImmutableSet ()
 
ImmutableSetoperator= (const ImmutableSet &X)
 
bool contains (value_type_ref V) const
 Returns true if the set contains the specified value. More...
 
bool operator== (const ImmutableSet &RHS) const
 
bool operator!= (const ImmutableSet &RHS) const
 
TreeTygetRoot ()
 
TreeTygetRootWithoutRetain () 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...
 
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 validateTree () const
 

Static Public Member Functions

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

Friends

class Factory
 

Detailed Description

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

Definition at line 958 of file ImmutableSet.h.

Member Typedef Documentation

◆ iterator

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

Definition at line 1084 of file ImmutableSet.h.

◆ TreeTy

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

Definition at line 962 of file ImmutableSet.h.

◆ value_type

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

Definition at line 960 of file ImmutableSet.h.

◆ value_type_ref

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

Definition at line 961 of file ImmutableSet.h.

Constructor & Destructor Documentation

◆ ImmutableSet() [1/2]

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

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

◆ ImmutableSet() [2/2]

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

Definition at line 976 of file ImmutableSet.h.

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

◆ ~ImmutableSet()

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

Definition at line 980 of file ImmutableSet.h.

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

Member Function Documentation

◆ begin()

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

Definition at line 1086 of file ImmutableSet.h.

◆ contains()

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

Returns true if the set contains the specified value.

Definition at line 1046 of file ImmutableSet.h.

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

◆ end()

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

Definition at line 1087 of file ImmutableSet.h.

◆ foreach() [1/2]

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

Definition at line 1075 of file ImmutableSet.h.

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

◆ foreach() [2/2]

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

Definition at line 1078 of file ImmutableSet.h.

References C, and llvm::ImutAVLTree< ImutInfo >::foreach().

◆ getHeight()

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

Definition at line 1093 of file ImmutableSet.h.

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

◆ getRoot()

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

Definition at line 1058 of file ImmutableSet.h.

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

◆ getRootWithoutRetain()

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

Definition at line 1063 of file ImmutableSet.h.

◆ isEmpty()

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

◆ isSingleton()

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

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

◆ operator!=()

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

Definition at line 1054 of file ImmutableSet.h.

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

◆ operator=()

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

◆ operator==()

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

Definition at line 1050 of file ImmutableSet.h.

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

◆ Profile() [1/2]

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

Definition at line 1095 of file ImmutableSet.h.

References llvm::FoldingSetNodeID::AddPointer().

◆ Profile() [2/2]

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

◆ validateTree()

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

Definition at line 1105 of file ImmutableSet.h.

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

Friends And Related Function Documentation

◆ Factory

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

Definition at line 1043 of file ImmutableSet.h.


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