LLVM  4.0.0
Classes | Public Types | Public Member Functions | List of all members
llvm::AllocatorList< T, AllocatorT > Class Template Reference

A linked-list with a custom, local allocator. More...

#include <AllocatorList.h>

Inheritance diagram for llvm::AllocatorList< T, AllocatorT >:
[legend]
Collaboration diagram for llvm::AllocatorList< T, AllocatorT >:
[legend]

Public Types

typedef T value_type
 
typedef Tpointer
 
typedef Treference
 
typedef const Tconst_pointer
 
typedef const Tconst_reference
 
typedef list_type::size_type size_type
 
typedef list_type::difference_type difference_type
 
typedef IteratorImpl< T,
typename list_type::iterator
iterator
 
typedef IteratorImpl< T,
typename
list_type::reverse_iterator
reverse_iterator
 
typedef IteratorImpl< const T,
typename
list_type::const_iterator
const_iterator
 
typedef IteratorImpl< const T,
typename
list_type::const_reverse_iterator
const_reverse_iterator
 

Public Member Functions

 AllocatorList ()=default
 
 AllocatorList (AllocatorList &&X)
 
 AllocatorList (const AllocatorList &X)
 
AllocatorListoperator= (AllocatorList &&X)
 
AllocatorListoperator= (const AllocatorList &X)
 
 ~AllocatorList ()
 
void swap (AllocatorList &RHS)
 
bool empty ()
 
size_t size ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
Tback ()
 
Tfront ()
 
const Tback () const
 
const Tfront () const
 
template<class... Ts>
iterator emplace (iterator I, Ts &&...Vs)
 
iterator insert (iterator I, T &&V)
 
iterator insert (iterator I, const T &V)
 
template<class Iterator >
void insert (iterator I, Iterator First, Iterator Last)
 
iterator erase (iterator I)
 
iterator erase (iterator First, iterator Last)
 
void clear ()
 
void pop_back ()
 
void pop_front ()
 
void push_back (T &&V)
 
void push_front (T &&V)
 
void push_back (const T &V)
 
void push_front (const T &V)
 
template<class... Ts>
void emplace_back (Ts &&...Vs)
 
template<class... Ts>
void emplace_front (Ts &&...Vs)
 
void resetAlloc ()
 Reset the underlying allocator. More...
 

Detailed Description

template<class T, class AllocatorT>
class llvm::AllocatorList< T, AllocatorT >

A linked-list with a custom, local allocator.

Expose a std::list-like interface that owns and uses a custom LLVM-style allocator (e.g., BumpPtrAllocator), leveraging simple_ilist for the implementation details.

Because this list owns the allocator, calling splice() with a different list isn't generally safe. As such, splice has been left out of the interface entirely.

Definition at line 29 of file AllocatorList.h.

Member Typedef Documentation

template<class T, class AllocatorT>
typedef IteratorImpl<const T, typename list_type::const_iterator> llvm::AllocatorList< T, AllocatorT >::const_iterator

Definition at line 125 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef const T* llvm::AllocatorList< T, AllocatorT >::const_pointer

Definition at line 71 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef const T& llvm::AllocatorList< T, AllocatorT >::const_reference

Definition at line 72 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef IteratorImpl<const T, typename list_type::const_reverse_iterator> llvm::AllocatorList< T, AllocatorT >::const_reverse_iterator

Definition at line 127 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef list_type::difference_type llvm::AllocatorList< T, AllocatorT >::difference_type

Definition at line 74 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef IteratorImpl<T, typename list_type::iterator> llvm::AllocatorList< T, AllocatorT >::iterator

Definition at line 121 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef T* llvm::AllocatorList< T, AllocatorT >::pointer

Definition at line 69 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef T& llvm::AllocatorList< T, AllocatorT >::reference

Definition at line 70 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef IteratorImpl<T, typename list_type::reverse_iterator> llvm::AllocatorList< T, AllocatorT >::reverse_iterator

Definition at line 123 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef list_type::size_type llvm::AllocatorList< T, AllocatorT >::size_type

Definition at line 73 of file AllocatorList.h.

template<class T, class AllocatorT>
typedef T llvm::AllocatorList< T, AllocatorT >::value_type

Definition at line 68 of file AllocatorList.h.

Constructor & Destructor Documentation

template<class T, class AllocatorT>
llvm::AllocatorList< T, AllocatorT >::AllocatorList ( )
default
template<class T, class AllocatorT>
llvm::AllocatorList< T, AllocatorT >::AllocatorList ( AllocatorList< T, AllocatorT > &&  X)
inline

Definition at line 130 of file AllocatorList.h.

template<class T, class AllocatorT>
llvm::AllocatorList< T, AllocatorT >::AllocatorList ( const AllocatorList< T, AllocatorT > &  X)
inline

Definition at line 132 of file AllocatorList.h.

template<class T, class AllocatorT>
llvm::AllocatorList< T, AllocatorT >::~AllocatorList ( )
inline

Definition at line 145 of file AllocatorList.h.

Member Function Documentation

template<class T, class AllocatorT>
T& llvm::AllocatorList< T, AllocatorT >::back ( )
inline

Definition at line 168 of file AllocatorList.h.

template<class T, class AllocatorT>
const T& llvm::AllocatorList< T, AllocatorT >::back ( ) const
inline

Definition at line 170 of file AllocatorList.h.

template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::begin ( )
inline
template<class T, class AllocatorT>
const_iterator llvm::AllocatorList< T, AllocatorT >::begin ( ) const
inline

Definition at line 157 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::clear ( )
inline
template<class T, class AllocatorT>
template<class... Ts>
iterator llvm::AllocatorList< T, AllocatorT >::emplace ( iterator  I,
Ts &&...  Vs 
)
inline
template<class T, class AllocatorT>
template<class... Ts>
void llvm::AllocatorList< T, AllocatorT >::emplace_back ( Ts &&...  Vs)
inline

Definition at line 206 of file AllocatorList.h.

template<class T, class AllocatorT>
template<class... Ts>
void llvm::AllocatorList< T, AllocatorT >::emplace_front ( Ts &&...  Vs)
inline

Definition at line 209 of file AllocatorList.h.

template<class T, class AllocatorT>
bool llvm::AllocatorList< T, AllocatorT >::empty ( )
inline
template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::end ( )
inline
template<class T, class AllocatorT>
const_iterator llvm::AllocatorList< T, AllocatorT >::end ( ) const
inline

Definition at line 158 of file AllocatorList.h.

template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::erase ( iterator  I)
inline

Definition at line 190 of file AllocatorList.h.

template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::erase ( iterator  First,
iterator  Last 
)
inline

Definition at line 194 of file AllocatorList.h.

template<class T, class AllocatorT>
T& llvm::AllocatorList< T, AllocatorT >::front ( )
inline

Definition at line 169 of file AllocatorList.h.

Referenced by llvm::yaml::Scanner::peekNext().

template<class T, class AllocatorT>
const T& llvm::AllocatorList< T, AllocatorT >::front ( ) const
inline

Definition at line 171 of file AllocatorList.h.

template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::insert ( iterator  I,
T &&  V 
)
inline
template<class T, class AllocatorT>
iterator llvm::AllocatorList< T, AllocatorT >::insert ( iterator  I,
const T V 
)
inline

Definition at line 180 of file AllocatorList.h.

template<class T, class AllocatorT>
template<class Iterator >
void llvm::AllocatorList< T, AllocatorT >::insert ( iterator  I,
Iterator  First,
Iterator  Last 
)
inline

Definition at line 185 of file AllocatorList.h.

template<class T, class AllocatorT>
AllocatorList& llvm::AllocatorList< T, AllocatorT >::operator= ( AllocatorList< T, AllocatorT > &&  X)
inline

Definition at line 135 of file AllocatorList.h.

template<class T, class AllocatorT>
AllocatorList& llvm::AllocatorList< T, AllocatorT >::operator= ( const AllocatorList< T, AllocatorT > &  X)
inline

Definition at line 141 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::pop_back ( )
inline

Definition at line 200 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::pop_front ( )
inline

Definition at line 201 of file AllocatorList.h.

Referenced by llvm::yaml::Scanner::getNext().

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::push_back ( T &&  V)
inline

Definition at line 202 of file AllocatorList.h.

Referenced by llvm::yaml::Scanner::peekNext().

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::push_back ( const T V)
inline

Definition at line 204 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::push_front ( T &&  V)
inline

Definition at line 203 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::push_front ( const T V)
inline

Definition at line 205 of file AllocatorList.h.

template<class T, class AllocatorT>
reverse_iterator llvm::AllocatorList< T, AllocatorT >::rbegin ( )
inline

Definition at line 159 of file AllocatorList.h.

template<class T, class AllocatorT>
const_reverse_iterator llvm::AllocatorList< T, AllocatorT >::rbegin ( ) const
inline

Definition at line 161 of file AllocatorList.h.

template<class T, class AllocatorT>
reverse_iterator llvm::AllocatorList< T, AllocatorT >::rend ( )
inline

Definition at line 160 of file AllocatorList.h.

template<class T, class AllocatorT>
const_reverse_iterator llvm::AllocatorList< T, AllocatorT >::rend ( ) const
inline

Definition at line 164 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::resetAlloc ( )
inline

Reset the underlying allocator.

Precondition
empty()

Definition at line 216 of file AllocatorList.h.

Referenced by llvm::yaml::Scanner::getNext().

template<class T, class AllocatorT>
size_t llvm::AllocatorList< T, AllocatorT >::size ( )
inline

Definition at line 153 of file AllocatorList.h.

template<class T, class AllocatorT>
void llvm::AllocatorList< T, AllocatorT >::swap ( AllocatorList< T, AllocatorT > &  RHS)
inline

Definition at line 147 of file AllocatorList.h.


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