Nugget
|
#include <fixed_slist.h>
Public Types | |
enum | { kMaxSize = nodeCount } |
typedef fixed_node_allocator< sizeof(typename slist< T >::node_type), nodeCount, EASTL_ALIGN_OF(typename slist< T >::node_type), 0, bEnableOverflow, OverflowAllocator > | fixed_allocator_type |
typedef OverflowAllocator | overflow_allocator_type |
typedef slist< T, fixed_allocator_type > | base_type |
typedef fixed_slist< 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 |
Public Types inherited from eastl::slist< T, fixed_node_allocator< sizeof(slist< T >::node_type), nodeCount, EASTL_ALIGN_OF(slist< T >::node_type), 0, true, EASTLAllocatorType > > | |
typedef T | value_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef SListIterator< T, T *, T & > | iterator |
typedef SListIterator< T, const T *, const T & > | const_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::SListBase< T, Allocator > | |
typedef Allocator | allocator_type |
typedef SListNode< T > | node_type |
typedef eastl_size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef SListNodeBase | base_node_type |
Public Member Functions | |
fixed_slist (const overflow_allocator_type &overflowAllocator) | |
fixed_slist (size_type n) | |
fixed_slist (size_type n, const value_type &value) | |
fixed_slist (const this_type &x) | |
fixed_slist (this_type &&x) | |
fixed_slist (this_type &&, const overflow_allocator_type &) | |
fixed_slist (std::initializer_list< value_type > ilist, const overflow_allocator_type &overflowAllocator=EASTL_FIXED_SLIST_DEFAULT_ALLOCATOR) | |
template<typename InputIterator > | |
fixed_slist (InputIterator first, InputIterator last) | |
this_type & | operator= (const this_type &x) |
this_type & | operator= (std::initializer_list< value_type > ilist) |
this_type & | operator= (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) |
void | assign (std::initializer_list< value_type > ilist) |
template<typename InputIterator > | |
void | assign (InputIterator first, InputIterator last) |
void | resize (size_type n, const value_type &value) |
void | resize (size_type n) |
size_type | size () const EA_NOEXCEPT |
Public Member Functions inherited from eastl::slist< T, fixed_node_allocator< sizeof(slist< T >::node_type), nodeCount, EASTL_ALIGN_OF(slist< T >::node_type), 0, true, EASTLAllocatorType > > | |
slist (const allocator_type &allocator) | |
slist (size_type n, const allocator_type &allocator=EASTL_SLIST_DEFAULT_ALLOCATOR) | |
slist (size_type n, const value_type &value, const allocator_type &allocator=EASTL_SLIST_DEFAULT_ALLOCATOR) | |
slist (const this_type &x) | |
slist (std::initializer_list< value_type > ilist, const allocator_type &allocator=EASTL_SLIST_DEFAULT_ALLOCATOR) | |
slist (this_type &&x) | |
slist (this_type &&x, const allocator_type &allocator) | |
slist (InputIterator first, InputIterator last) | |
this_type & | operator= (const this_type &x) |
this_type & | operator= (std::initializer_list< value_type >) |
this_type & | operator= (this_type &&x) |
void | swap (this_type &x) |
void | assign (size_type n, const value_type &value) |
void | assign (std::initializer_list< value_type > ilist) |
void | assign (InputIterator first, InputIterator last) |
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 |
iterator | before_begin () EA_NOEXCEPT |
const_iterator | before_begin () const EA_NOEXCEPT |
const_iterator | cbefore_begin () const EA_NOEXCEPT |
iterator | previous (const_iterator position) |
const_iterator | previous (const_iterator position) const |
reference | front () |
const_reference | front () const |
void | emplace_front (Args &&... args) |
void | push_front (const value_type &value) |
reference | push_front () |
void | push_front (value_type &&value) |
void | pop_front () |
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) |
iterator | insert (const_iterator position) |
iterator | insert (const_iterator position, const value_type &value) |
void | insert (const_iterator position, size_type n, const value_type &value) |
void | insert (const_iterator position, InputIterator first, InputIterator last) |
iterator | insert_after (const_iterator position) |
iterator | insert_after (const_iterator position, const value_type &value) |
iterator | insert_after (const_iterator position, size_type n, const value_type &value) |
iterator | insert_after (const_iterator position, std::initializer_list< value_type > ilist) |
iterator | insert_after (const_iterator position, value_type &&value) |
iterator | insert_after (const_iterator position, InputIterator first, InputIterator last) |
iterator | emplace_after (const_iterator position, Args &&... args) |
iterator | erase (const_iterator position) |
iterator | erase (const_iterator first, const_iterator last) |
iterator | erase_after (const_iterator position) |
iterator | erase_after (const_iterator before_first, const_iterator last) |
void | clear () EA_NOEXCEPT |
void | reset_lose_memory () EA_NOEXCEPT |
void | remove (const value_type &value) |
void | remove_if (Predicate 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 | splice_after (const_iterator position, this_type &x) |
void | splice_after (const_iterator position, this_type &x, const_iterator i) |
void | splice_after (const_iterator position, this_type &x, const_iterator first, const_iterator last) |
void | splice_after (const_iterator position, this_type &&x) |
void | splice_after (const_iterator position, this_type &&x, const_iterator i) |
void | splice_after (const_iterator position, this_type &&x, const_iterator first, const_iterator last) |
void | splice_after (const_iterator position, const_iterator before_first, const_iterator before_last) |
void | splice_after (const_iterator position, const_iterator previous) |
void | sort () |
void | sort (Compare compare) |
bool | validate () const |
int | validate_iterator (const_iterator i) const |
SListNodeBase * | DoEraseAfter (SListNodeBase *pNode) |
SListNodeBase * | DoEraseAfter (SListNodeBase *pNode, SListNodeBase *pNodeLast) |
node_type * | DoAllocateNode () |
void | DoFreeNode (node_type *pNode) |
base_node_type & | internalNode () 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::SListBase< 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::SListBase< T, Allocator > | |
eastl::compressed_pair< base_node_type, allocator_type > | mNodeAllocator |
Additional Inherited Members | |
Public Attributes inherited from eastl::slist< T, fixed_node_allocator< sizeof(slist< T >::node_type), nodeCount, EASTL_ALIGN_OF(slist< T >::node_type), 0, true, EASTLAllocatorType > > | |
eastl::compressed_pair< base_node_type, allocator_type > | mNodeAllocator |
Protected Member Functions inherited from eastl::slist< T, fixed_node_allocator< sizeof(slist< T >::node_type), nodeCount, EASTL_ALIGN_OF(slist< T >::node_type), 0, true, EASTLAllocatorType > > | |
node_type * | DoCreateNode () |
node_type * | DoCreateNode (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) |
node_type * | DoInsertAfter (SListNodeBase *pNode, InputIterator first, InputIterator last) |
node_type * | DoInsertAfter (SListNodeBase *pNode, Integer n, Integer value, true_type) |
node_type * | DoInsertAfter (SListNodeBase *pNode, InputIterator first, InputIterator last, false_type) |
node_type * | DoInsertValueAfter (SListNodeBase *pNode) |
node_type * | DoInsertValueAfter (SListNodeBase *pNode, Args &&... args) |
node_type * | DoInsertValuesAfter (SListNodeBase *pNode, size_type n, const value_type &value) |
void | DoSwap (this_type &x) |
Protected Member Functions inherited from eastl::SListBase< T, Allocator > | |
base_node_type & | internalNode () EA_NOEXCEPT |
base_node_type const & | internalNode () const EA_NOEXCEPT |
allocator_type & | internalAllocator () EA_NOEXCEPT |
const allocator_type & | internalAllocator () const EA_NOEXCEPT |
SListBase (const allocator_type &a) | |
node_type * | DoAllocateNode () |
void | DoFreeNode (node_type *pNode) |
SListNodeBase * | DoEraseAfter (SListNodeBase *pNode) |
SListNodeBase * | DoEraseAfter (SListNodeBase *pNode, SListNodeBase *pNodeLast) |
fixed_slist is an slist 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_slist is that the number of nodes it can contain is fixed upon its declaration. If you want a fixed_slist that doesn't have this limitation, then you probably don't want a fixed_slist. You can always create your own memory allocator that works the way you want.
Template parameters: T The type of object the slist 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.