Nugget
Public Types | Public Member Functions | Protected Attributes | List of all members
eastl::fixed_list< T, nodeCount, bEnableOverflow, OverflowAllocator > Class Template Reference

#include <fixed_list.h>

Inheritance diagram for eastl::fixed_list< T, nodeCount, bEnableOverflow, OverflowAllocator >:
Inheritance graph
[legend]
Collaboration diagram for eastl::fixed_list< T, nodeCount, bEnableOverflow, OverflowAllocator >:
Collaboration graph
[legend]

Public Types

enum  { kMaxSize = nodeCount }
 
typedef fixed_node_allocator< sizeof(typename list< T >::node_type), nodeCount, EASTL_ALIGN_OF(typename list< T >::node_type), 0, bEnableOverflow, OverflowAllocator > fixed_allocator_type
 
typedef OverflowAllocator overflow_allocator_type
 
typedef list< T, fixed_allocator_typebase_type
 
typedef fixed_list< T, nodeCount, bEnableOverflow, OverflowAllocator > this_type
 
typedef base_type::size_type size_type
 
typedef base_type::value_type value_type
 
typedef base_type::node_type node_type
 
typedef base_type::iterator iterator
 
- Public Types inherited from eastl::list< T, fixed_node_allocator< sizeof(list< T >::node_type), nodeCount, EASTL_ALIGN_OF(list< T >::node_type), 0, true, EASTLAllocatorType > >
typedef T value_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef ListIterator< T, T *, T & > iterator
 
typedef ListIterator< T, const T *, const T & > const_iterator
 
typedef eastl::reverse_iterator< iteratorreverse_iterator
 
typedef eastl::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef base_type::size_type size_type
 
typedef base_type::difference_type difference_type
 
typedef base_type::allocator_type allocator_type
 
typedef base_type::node_type node_type
 
typedef base_type::base_node_type base_node_type
 
- Public Types inherited from eastl::ListBase< T, Allocator >
typedef T value_type
 
typedef Allocator allocator_type
 
typedef ListNode< T > node_type
 
typedef eastl_size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef ListNodeBase base_node_type
 

Public Member Functions

 fixed_list (const overflow_allocator_type &overflowAllocator)
 
 fixed_list (size_type n)
 
 fixed_list (size_type n, const value_type &value)
 
 fixed_list (const this_type &x)
 
 fixed_list (this_type &&x)
 
 fixed_list (this_type &&, const overflow_allocator_type &overflowAllocator)
 
 fixed_list (std::initializer_list< value_type > ilist, const overflow_allocator_type &overflowAllocator=EASTL_FIXED_LIST_DEFAULT_ALLOCATOR)
 
template<typename InputIterator >
 fixed_list (InputIterator first, InputIterator last)
 
this_typeoperator= (const this_type &x)
 
this_typeoperator= (std::initializer_list< value_type > ilist)
 
this_typeoperator= (this_type &&x)
 
void swap (this_type &x)
 
void reset_lose_memory ()
 
size_type max_size () const
 
bool full () const
 
bool has_overflowed () const
 
bool can_overflow () const
 
const overflow_allocator_type & get_overflow_allocator () const EA_NOEXCEPT
 
overflow_allocator_type & get_overflow_allocator () EA_NOEXCEPT
 
void set_overflow_allocator (const overflow_allocator_type &allocator)
 
void assign (size_type n, const value_type &value)
 
template<typename InputIterator >
void assign (InputIterator first, InputIterator last)
 
void assign (std::initializer_list< value_type > ilist)
 
void resize (size_type n, const value_type &value)
 
void resize (size_type n)
 
iterator insert (const_iterator position)
 
iterator insert (const_iterator position, const value_type &value)
 
iterator insert (const_iterator position, value_type &&x)
 
iterator insert (const_iterator position, std::initializer_list< value_type > ilist)
 
iterator insert (const_iterator position, size_type n, const value_type &value)
 
template<typename InputIterator >
iterator insert (const_iterator position, InputIterator first, InputIterator last)
 
size_type size () const EA_NOEXCEPT
 
- Public Member Functions inherited from eastl::list< T, fixed_node_allocator< sizeof(list< T >::node_type), nodeCount, EASTL_ALIGN_OF(list< T >::node_type), 0, true, EASTLAllocatorType > >
 list (const allocator_type &allocator)
 
 list (size_type n, const allocator_type &allocator=EASTL_LIST_DEFAULT_ALLOCATOR)
 
 list (size_type n, const value_type &value, const allocator_type &allocator=EASTL_LIST_DEFAULT_ALLOCATOR)
 
 list (const this_type &x)
 
 list (const this_type &x, const allocator_type &allocator)
 
 list (this_type &&x)
 
 list (this_type &&, const allocator_type &)
 
 list (std::initializer_list< value_type > ilist, const allocator_type &allocator=EASTL_LIST_DEFAULT_ALLOCATOR)
 
 list (InputIterator first, InputIterator last)
 
this_typeoperator= (const this_type &x)
 
this_typeoperator= (std::initializer_list< value_type > ilist)
 
this_typeoperator= (this_type &&x)
 
void swap (this_type &x)
 
void assign (size_type n, const value_type &value)
 
void assign (InputIterator first, InputIterator last)
 
void assign (std::initializer_list< value_type > ilist)
 
iterator begin () EA_NOEXCEPT
 
const_iterator begin () const EA_NOEXCEPT
 
const_iterator cbegin () const EA_NOEXCEPT
 
iterator end () EA_NOEXCEPT
 
const_iterator end () const EA_NOEXCEPT
 
const_iterator cend () const EA_NOEXCEPT
 
reverse_iterator rbegin () EA_NOEXCEPT
 
const_reverse_iterator rbegin () const EA_NOEXCEPT
 
const_reverse_iterator crbegin () const EA_NOEXCEPT
 
reverse_iterator rend () EA_NOEXCEPT
 
const_reverse_iterator rend () const EA_NOEXCEPT
 
const_reverse_iterator crend () const EA_NOEXCEPT
 
bool empty () const EA_NOEXCEPT
 
size_type size () const EA_NOEXCEPT
 
void resize (size_type n, const value_type &value)
 
void resize (size_type n)
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void emplace_front (Args &&... args)
 
void emplace_back (Args &&... args)
 
void push_front (const value_type &value)
 
void push_front (value_type &&x)
 
reference push_front ()
 
void * push_front_uninitialized ()
 
void push_back (const value_type &value)
 
void push_back (value_type &&x)
 
reference push_back ()
 
void * push_back_uninitialized ()
 
void pop_front ()
 
void pop_back ()
 
iterator emplace (const_iterator position, Args &&... args)
 
iterator insert (const_iterator position)
 
iterator insert (const_iterator position, const value_type &value)
 
iterator insert (const_iterator position, value_type &&x)
 
iterator insert (const_iterator position, std::initializer_list< value_type > ilist)
 
iterator insert (const_iterator position, size_type n, const value_type &value)
 
iterator insert (const_iterator position, InputIterator first, InputIterator last)
 
iterator erase (const_iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
reverse_iterator erase (const_reverse_iterator position)
 
reverse_iterator erase (const_reverse_iterator first, const_reverse_iterator last)
 
void clear () EA_NOEXCEPT
 
void reset_lose_memory () EA_NOEXCEPT
 
void remove (const T &x)
 
void remove_if (Predicate)
 
void reverse () EA_NOEXCEPT
 
void splice (const_iterator position, this_type &x)
 
void splice (const_iterator position, this_type &x, const_iterator i)
 
void splice (const_iterator position, this_type &x, const_iterator first, const_iterator last)
 
void splice (const_iterator position, this_type &&x)
 
void splice (const_iterator position, this_type &&x, const_iterator i)
 
void splice (const_iterator position, this_type &&x, const_iterator first, const_iterator last)
 
void merge (this_type &x)
 
void merge (this_type &&x)
 
void merge (this_type &x, Compare compare)
 
void merge (this_type &&x, Compare compare)
 
void unique ()
 
void unique (BinaryPredicate)
 
void sort ()
 
void sort (Compare compare)
 
bool validate () const
 
int validate_iterator (const_iterator i) const
 
node_typeDoAllocateNode ()
 
void DoFreeNode (node_type *pNode)
 
void DoClear ()
 
void DoInit () EA_NOEXCEPT
 
const allocator_type & get_allocator () const EA_NOEXCEPT
 
allocator_type & get_allocator () EA_NOEXCEPT
 
base_node_typeinternalNode () EA_NOEXCEPT
 
base_node_type const & internalNode () const EA_NOEXCEPT
 
allocator_type & internalAllocator () EA_NOEXCEPT
 
const allocator_type & internalAllocator () const EA_NOEXCEPT
 
- Public Member Functions inherited from eastl::ListBase< T, Allocator >
const allocator_type & get_allocator () const EA_NOEXCEPT
 
allocator_type & get_allocator () EA_NOEXCEPT
 
void set_allocator (const allocator_type &allocator)
 

Protected Attributes

char mBuffer [fixed_allocator_type::kBufferSize]
 
- Protected Attributes inherited from eastl::ListBase< T, Allocator >
eastl::compressed_pair< base_node_type, allocator_type > mNodeAllocator
 

Additional Inherited Members

- Public Attributes inherited from eastl::list< T, fixed_node_allocator< sizeof(list< T >::node_type), nodeCount, EASTL_ALIGN_OF(list< T >::node_type), 0, true, EASTLAllocatorType > >
eastl::compressed_pair< base_node_type, allocator_type > mNodeAllocator
 
- Protected Member Functions inherited from eastl::list< T, fixed_node_allocator< sizeof(list< T >::node_type), nodeCount, EASTL_ALIGN_OF(list< T >::node_type), 0, true, EASTLAllocatorType > >
node_typeDoCreateNode ()
 
node_typeDoCreateNode (Args &&... args)
 
void DoAssign (Integer n, Integer value, true_type)
 
void DoAssign (InputIterator first, InputIterator last, false_type)
 
void DoAssignValues (size_type n, const value_type &value)
 
void DoInsert (ListNodeBase *pNode, Integer n, Integer value, true_type)
 
void DoInsert (ListNodeBase *pNode, InputIterator first, InputIterator last, false_type)
 
void DoInsertValues (ListNodeBase *pNode, size_type n, const value_type &value)
 
void DoInsertValue (ListNodeBase *pNode, Args &&... args)
 
void DoErase (ListNodeBase *pNode)
 
void DoSwap (this_type &x)
 
iterator DoSort (iterator i1, iterator end2, size_type n, Compare &compare)
 
- Protected Member Functions inherited from eastl::ListBase< T, Allocator >
base_node_typeinternalNode () EA_NOEXCEPT
 
base_node_type const & internalNode () const EA_NOEXCEPT
 
allocator_type & internalAllocator () EA_NOEXCEPT
 
const allocator_type & internalAllocator () const EA_NOEXCEPT
 
 ListBase (const allocator_type &a)
 
node_typeDoAllocateNode ()
 
void DoFreeNode (node_type *pNode)
 
void DoInit () EA_NOEXCEPT
 
void DoClear ()
 

Detailed Description

template<typename T, size_t nodeCount, bool bEnableOverflow = true, typename OverflowAllocator = EASTLAllocatorType>
class eastl::fixed_list< T, nodeCount, bEnableOverflow, OverflowAllocator >

fixed_list

fixed_list is a list which uses a single block of contiguous memory for its nodes. The purpose of this is to reduce memory usage relative to a conventional memory allocation system (with block headers), to increase allocation speed (often due to avoidance of mutex locks), to increase performance (due to better memory locality), and to decrease memory fragmentation due to the way that fixed block allocators work.

The primary downside to a fixed_list is that the number of nodes it can contain is fixed upon its declaration. If you want a fixed_list that doesn't have this limitation, then you probably don't want a fixed_list. You can always create your own memory allocator that works the way you want.

Template parameters: T The type of object the list holds. nodeCount The max number of objects to contain. bEnableOverflow Whether or not we should use the overflow heap if our object pool is exhausted. OverflowAllocator Overflow allocator, which is only used if bEnableOverflow == true. Defaults to the global heap.


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