Nugget
Public Types | Public Member Functions | Static Public Member Functions | List of all members
eastl::intrusive_sdlist< T > Class Template Reference

#include <intrusive_sdlist.h>

Inheritance diagram for eastl::intrusive_sdlist< T >:
Inheritance graph
[legend]
Collaboration diagram for eastl::intrusive_sdlist< T >:
Collaboration graph
[legend]

Public Types

typedef intrusive_sdlist< T > this_type
 
typedef intrusive_sdlist_base base_type
 
typedef T node_type
 
typedef T value_type
 
typedef base_type::size_type size_type
 
typedef base_type::difference_type difference_type
 
typedef T & reference
 
typedef const T & const_reference
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef IntrusiveSDListIterator< T, T *, T & > iterator
 
typedef IntrusiveSDListIterator< T, const T *, const T & > const_iterator
 
typedef eastl::reverse_iterator< iteratorreverse_iterator
 
typedef eastl::reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from eastl::intrusive_sdlist_base
typedef eastl_size_t size_type
 
typedef ptrdiff_t difference_type
 

Public Member Functions

 intrusive_sdlist ()
 Creates an empty list.
 
 intrusive_sdlist (const this_type &x)
 Creates an empty list; ignores the argument.
 
this_typeoperator= (const this_type &x)
 Clears the list; ignores the argument.
 
iterator begin ()
 Returns an iterator pointing to the first element in the list.
 
const_iterator begin () const
 Returns a const_iterator pointing to the first element in the list.
 
const_iterator cbegin () const
 Returns a const_iterator pointing to the first element in the list.
 
iterator end ()
 Returns an iterator pointing one-after the last element in the list.
 
const_iterator end () const
 Returns a const_iterator pointing one-after the last element in the list.
 
const_iterator cend () const
 Returns a const_iterator pointing one-after the last element in the list.
 
reference front ()
 Returns a reference to the first element. The list must be empty.
 
const_reference front () const
 Returns a const reference to the first element. The list must be empty.
 
void push_front (value_type &value)
 Adds an element to the front of the list; O(1). The element is not copied. The element must not be in any other list.
 
void push_back (value_type &value)
 Adds an element to the back of the list; O(N). The element is not copied. The element must not be in any other list.
 
void pop_back ()
 Removes an element from the back of the list; O(N). The element must be present, but is not deallocated.
 
bool contains (const value_type &value) const
 Returns true if the given element is in the list; O(n). Equivalent to (locate(x) != end()).
 
iterator locate (value_type &value)
 Converts a reference to an object in the list back to an iterator, or returns end() if it is not part of the list. O(n)
 
const_iterator locate (const value_type &value) const
 Converts a const reference to an object in the list back to a const iterator, or returns end() if it is not part of the list. O(n)
 
iterator insert (iterator position, value_type &value)
 Inserts an element before the element pointed to by the iterator. O(1)
 
iterator erase (iterator position)
 Erases the element pointed to by the iterator. O(1)
 
iterator erase (iterator first, iterator last)
 Erases elements within the iterator range [first, last). O(1).
 
void swap (intrusive_sdlist &x)
 Swaps the contents of two intrusive lists; O(1).
 
void splice (iterator position, value_type &value)
 
void splice (iterator position, this_type &x)
 
void splice (iterator position, this_type &x, iterator xPosition)
 
void splice (iterator position, this_type &x, iterator first, iterator last)
 
bool validate () const
 
int validate_iterator (const_iterator i) const
 
- Public Member Functions inherited from eastl::intrusive_sdlist_base
bool empty () const
 Returns true if the container is empty.
 
size_type size () const
 Returns the number of elements in the list; O(n).
 
void clear ()
 Clears the list; O(1). No deallocation occurs.
 
void pop_front ()
 Removes an element from the front of the list; O(1). The element must be present, but is not deallocated.
 
void reverse ()
 Reverses a list so that front and back are swapped; O(n).
 

Static Public Member Functions

static void remove (value_type &value)
 Erases an element from a list; O(1). Note that this is static so you don't need to know which list the element, although it must be in some list.
 

Additional Inherited Members

- Protected Attributes inherited from eastl::intrusive_sdlist_base
intrusive_sdlist_nodempNext
 

Detailed Description

template<typename T = intrusive_sdlist_node>
class eastl::intrusive_sdlist< T >

intrusive_sdlist

Member Function Documentation

◆ splice() [1/4]

template<typename T >
void eastl::intrusive_sdlist< T >::splice ( iterator  position,
this_type x 
)

Moves the contents of a list into this list before the element pointed to by position; O(1). Required: &x != this (same as std::list).

◆ splice() [2/4]

template<typename T >
void eastl::intrusive_sdlist< T >::splice ( iterator  position,
this_type x,
iterator  first,
iterator  last 
)

Moves the range of elements [first, last) from list x into the current list before the element pointed to by position; O(1). Required: position must not be in [first, last). (same as std::list).

◆ splice() [3/4]

template<typename T >
void eastl::intrusive_sdlist< T >::splice ( iterator  position,
this_type x,
iterator  xPosition 
)

Moves the given element pointed to i within the list x into the current list before the element pointed to by position; O(1).

◆ splice() [4/4]

template<typename T >
void eastl::intrusive_sdlist< T >::splice ( iterator  position,
value_type &  value 
)

Moves the given element into this list before the element pointed to by position; O(1). Required: x must be in some list or have first/next pointers that point it itself.


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