llvm::SmallPtrSet< PtrType, SmallSize > Class Template Reference

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements. More...

#include <SmallPtrSet.h>

Inheritance diagram for llvm::SmallPtrSet< PtrType, SmallSize >:
llvm::SmallPtrSetImpl

List of all members.

Public Types

typedef SmallPtrSetIterator
< PtrType > 
iterator
typedef SmallPtrSetIterator
< PtrType > 
const_iterator

Public Member Functions

 SmallPtrSet ()
 SmallPtrSet (const SmallPtrSet &that)
template<typename It >
 SmallPtrSet (It I, It E)
bool insert (PtrType Ptr)
 insert - This returns true if the pointer was new to the set, false if it was already in the set.
bool erase (PtrType Ptr)
 erase - If the set contains the specified pointer, remove it and return true, otherwise return false.
bool count (PtrType Ptr) const
 count - Return true if the specified pointer is in the set.
template<typename IterT >
void insert (IterT I, IterT E)
iterator begin () const
iterator end () const
const SmallPtrSet< PtrType,
SmallSize > & 
operator= (const SmallPtrSet< PtrType, SmallSize > &RHS)

Private Types

enum  { SmallSizePowTwo = RoundUpToPowerOfTwo<SmallSize>::Val }
typedef PointerLikeTypeTraits
< PtrType > 
PtrTraits

Private Attributes

const void * SmallStorage [SmallSizePowTwo+1]
 SmallStorage - Fixed size storage used in 'small mode'.

Detailed Description

template<class PtrType, unsigned SmallSize>
class llvm::SmallPtrSet< PtrType, SmallSize >

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

This internally rounds up SmallSize to the next power of two if it is not already a power of two. See the comments above SmallPtrSetImpl for details of the algorithm.


Member Typedef Documentation

template<class PtrType, unsigned SmallSize>
typedef SmallPtrSetIterator<PtrType> llvm::SmallPtrSet< PtrType, SmallSize >::const_iterator
template<class PtrType, unsigned SmallSize>
typedef SmallPtrSetIterator<PtrType> llvm::SmallPtrSet< PtrType, SmallSize >::iterator
template<class PtrType, unsigned SmallSize>
typedef PointerLikeTypeTraits<PtrType> llvm::SmallPtrSet< PtrType, SmallSize >::PtrTraits [private]

Member Enumeration Documentation

template<class PtrType, unsigned SmallSize>
anonymous enum [private]
Enumerator:
SmallSizePowTwo 

Constructor & Destructor Documentation

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet (  )  [inline]
template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( const SmallPtrSet< PtrType, SmallSize > &  that  )  [inline]
template<class PtrType, unsigned SmallSize>
template<typename It >
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( It  I,
It  E 
) [inline]

Member Function Documentation

template<class PtrType, unsigned SmallSize>
iterator llvm::SmallPtrSet< PtrType, SmallSize >::begin (  )  const [inline]
template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::count ( PtrType  Ptr  )  const [inline]

count - Return true if the specified pointer is in the set.

template<class PtrType, unsigned SmallSize>
iterator llvm::SmallPtrSet< PtrType, SmallSize >::end (  )  const [inline]
template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::erase ( PtrType  Ptr  )  [inline]

erase - If the set contains the specified pointer, remove it and return true, otherwise return false.

template<class PtrType, unsigned SmallSize>
template<typename IterT >
void llvm::SmallPtrSet< PtrType, SmallSize >::insert ( IterT  I,
IterT  E 
) [inline]
template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::insert ( PtrType  Ptr  )  [inline]

insert - This returns true if the pointer was new to the set, false if it was already in the set.

template<class PtrType, unsigned SmallSize>
const SmallPtrSet<PtrType, SmallSize>& llvm::SmallPtrSet< PtrType, SmallSize >::operator= ( const SmallPtrSet< PtrType, SmallSize > &  RHS  )  [inline]

Reimplemented from llvm::SmallPtrSetImpl.


Member Data Documentation

template<class PtrType, unsigned SmallSize>
const void* llvm::SmallPtrSet< PtrType, SmallSize >::SmallStorage[SmallSizePowTwo+1] [private]

SmallStorage - Fixed size storage used in 'small mode'.

The extra element ensures that the end iterator actually points to valid memory.


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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1