|
| 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) |
|
template<typename InputIterator > |
| list (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 | 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) |
|
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 |
|
template<typename... Args> |
void | emplace_front (Args &&... args) |
|
template<typename... 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 () |
|
template<typename... Args> |
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) |
|
template<typename InputIterator > |
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) |
|
template<typename Predicate > |
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) |
|
template<typename Compare > |
void | merge (this_type &x, Compare compare) |
|
template<typename Compare > |
void | merge (this_type &&x, Compare compare) |
|
void | unique () |
|
template<typename BinaryPredicate > |
void | unique (BinaryPredicate) |
|
void | sort () |
|
template<typename Compare > |
void | sort (Compare compare) |
|
bool | validate () const |
|
int | validate_iterator (const_iterator i) const |
|
node_type * | DoAllocateNode () |
|
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_type & | internalNode () EA_NOEXCEPT |
|
base_node_type const & | internalNode () const EA_NOEXCEPT |
|
allocator_type & | internalAllocator () EA_NOEXCEPT |
|
const allocator_type & | internalAllocator () const EA_NOEXCEPT |
|
const allocator_type & | get_allocator () const EA_NOEXCEPT |
|
allocator_type & | get_allocator () EA_NOEXCEPT |
|
void | set_allocator (const allocator_type &allocator) |
|
|
node_type * | DoCreateNode () |
|
template<typename... Args> |
node_type * | DoCreateNode (Args &&... args) |
|
template<typename Integer > |
void | DoAssign (Integer n, Integer value, true_type) |
|
template<typename InputIterator > |
void | DoAssign (InputIterator first, InputIterator last, false_type) |
|
void | DoAssignValues (size_type n, const value_type &value) |
|
template<typename Integer > |
void | DoInsert (ListNodeBase *pNode, Integer n, Integer value, true_type) |
|
template<typename InputIterator > |
void | DoInsert (ListNodeBase *pNode, InputIterator first, InputIterator last, false_type) |
|
void | DoInsertValues (ListNodeBase *pNode, size_type n, const value_type &value) |
|
template<typename... Args> |
void | DoInsertValue (ListNodeBase *pNode, Args &&... args) |
|
void | DoErase (ListNodeBase *pNode) |
|
void | DoSwap (this_type &x) |
|
template<typename Compare > |
iterator | DoSort (iterator i1, iterator end2, size_type n, Compare &compare) |
|
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 |
|
| ListBase (const allocator_type &a) |
|
node_type * | DoAllocateNode () |
|
void | DoFreeNode (node_type *pNode) |
|
void | DoInit () EA_NOEXCEPT |
|
void | DoClear () |
|
template<typename T, typename Allocator = EASTLAllocatorType>
class eastl::list< T, Allocator >
list
– size() is O(n) – Note that as of this writing, list::size() is an O(n) operation when EASTL_LIST_SIZE_CACHE is disabled. That is, getting the size of the list is not a fast operation, as it requires traversing the list and counting the nodes. We could make list::size() be fast by having a member mSize variable. There are reasons for having such functionality and reasons for not having such functionality. We currently choose to not have a member mSize variable as it would add four bytes to the class, add a tiny amount of processing to functions such as insert and erase, and would only serve to improve the size function, but no others. The alternative argument is that the C++ standard states that std::list should be an O(1) operation (i.e. have a member size variable), most C++ standard library list implementations do so, the size is but an integer which is quick to update, and many users expect to have a fast size function. The EASTL_LIST_SIZE_CACHE option changes this. To consider: Make size caching an optional template parameter.
Pool allocation If you want to make a custom memory pool for a list container, your pool needs to contain items of type list::node_type. So if you have a memory pool that has a constructor that takes the size of pool items and the count of pool items, you would do this (assuming that MemoryPool implements the Allocator interface): typedef list<Widget, MemoryPool> WidgetList; // Delare your WidgetList type. MemoryPool myPool(sizeof(WidgetList::node_type), 100); // Make a pool of 100 Widget nodes. WidgetList myList(&myPool); // Create a list that uses the pool.