template <typename, typename, SizeOrder, typename>
class DoublyLinkedList
Defined at line 234 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
Public Members
static SizeOrder ListSizeOrder
static const bool SupportsConstantOrderErase
static const bool SupportsConstantOrderSize
static const bool IsAssociative
static const bool IsSequenced
Public Methods
void DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> ()
Default construction gives an empty list.
Defined at line 270 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> (DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> && other_list)
Rvalue construction is permitted, but will result in the move of the list
contents from one instance of the list to the other (even for unmanaged
pointers)
Defined at line 289 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> & operator= (DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> && other_list)
Rvalue assignment is permitted for managed lists, and when the target is
an empty list of unmanaged pointers. Like Rvalue construction, it will
result in the move of the source contents to the destination.
Defined at line 296 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void ~DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> ()
Defined at line 305 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator begin ()
Standard begin/end, cbegin/cend iterator accessors.
Defined at line 320 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator begin ()
Defined at line 321 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator cbegin ()
Defined at line 322 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator end ()
Defined at line 324 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator end ()
Defined at line 325 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator cend ()
Defined at line 326 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator make_iterator (ValueType & obj)
make_iterator : Construct an iterator out of a pointer to an object.
Defined at line 329 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator make_iterator (const ValueType & obj)
Defined at line 333 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator materialize_iterator (ValueType & obj)
materialize_iterator : Construct an iterator out of a pointer to an object,
without a reference to the container.
USE WITH CAUTION: The caller is responsible for ensuring it is safe to
access the container when using this iterator. In particular, static lock
analysis will not detect access without holding the required locks guarding
the container.
Defined at line 345 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
const_iterator materialize_iterator (const ValueType & obj)
Defined at line 349 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
bool is_empty ()
is_empty : False if the list has at least one element in it, true otherwise.
Defined at line 355 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
typename PtrTraits::RefType front ()
front
Return a reference to the element at the front of the list without
removing it. It is an error to call front on an empty list.
Defined at line 364 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
typename PtrTraits::ConstRefType front ()
Defined at line 368 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
typename PtrTraits::RefType back ()
back
Return a reference to the element at the back of the list without
removing it. It is an error to call back on an empty list.
Defined at line 377 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
typename PtrTraits::ConstRefType back ()
Defined at line 382 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void push_front (const PtrType & ptr)
push_front : Push an element onto the front of the list.
Defined at line 388 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void push_front (PtrType && ptr)
Defined at line 389 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void push_back (const PtrType & ptr)
push_back : Push an element onto the end of the list.
Defined at line 392 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void push_back (PtrType && ptr)
Defined at line 393 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert (const iterator & iter, const PtrType & ptr)
insert : Insert an element before iter in the list, and return an
element to the newly-inserted element.
Defined at line 397 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert (const iterator & iter, PtrType && ptr)
Defined at line 398 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert (ValueType & before, const PtrType & ptr)
Defined at line 402 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert (ValueType & before, PtrType && ptr)
Defined at line 403 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void splice (const iterator & iter, DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> & other_list)
splice : Splice another list before iter in this list.
Defined at line 408 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
ContainerType split_after (const iterator & iter)
Split the list immediately after |iter|, returning the remainder of the
list in a new list instance.
|iter| *must* refer to a member of the list being split. Attempt to split
list A with an iterator to an element which is a member of list B will
result in undefined behavior which may not be detectable at runtime.
Defined at line 468 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
ContainerType split_after (ValueType & obj)
Alternate form of split_after which uses an object reference instead of an
iterator to determine the split point. Just like the iterator form of
split_after, |obj| *must* be a member of the list being split.
Defined at line 481 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert_after (const iterator & iter, const PtrType & ptr)
insert_after : Insert an element after iter in the list, and return
an element to the newly-inserted element.
Note: It is an error to attempt to push a nullptr instance of PtrType, or
to attempt to push with iter == end().
Defined at line 529 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
iterator insert_after (const iterator & iter, PtrType && ptr)
Defined at line 532 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType pop_front ()
pop_front and pop_back
Removes either the head or the tail of the list and transfers the pointer
to the caller. If the list is empty, return a nullptr instance of
PtrType.
Defined at line 544 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType pop_back ()
Defined at line 545 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType erase (ValueType & obj)
erase
Remove the element at the provided iterator and return a pointer to the
removed element. If there is no element in the list at this position
(iter is end()), return a nullptr instance of PtrType. It is an error to
attempt to use an iterator from a different instance of this list type to
attempt to erase a node.
Defined at line 554 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType erase (const iterator & iter)
Defined at line 555 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType erase_next (const iterator & iter)
erase_next
Remove the element in the list which follows iter and return a pointer to
the removed element. If there is no element in the list which follows
iter, return a nullptr instance of PtrType. It is an error to attempt to
erase_next an invalid iterator (either an uninitialized iterator, or an
iterator which is equal to end()) It is an error to attempt to use an
iterator from a different instance of this list type to attempt to erase
a node.
Defined at line 566 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void clear ()
clear
Clear out the list, unlinking all of the elements in the process. For
managed pointer types, this will release all references held by the list
to the objects which were in it.
Defined at line 583 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void clear_unsafe ()
clear_unsafe
See comments in fbl/intrusive_single_list.h
Think carefully before calling this!
Defined at line 605 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
void swap (DoublyLinkedList<PtrType_, TagType_, ListSizeOrder_, NodeTraits_> & other)
swap : swaps the contest of two lists.
Defined at line 619 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
size_t size_slow ()
size_slow : count the elements in the list in O(n) fashion.
Defined at line 632 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
size_t size ()
size : Only allowed when the user has selected an SizeOrder::Constant for this list.
Defined at line 649 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
template <typename UnaryFn>
PtrType erase_if (UnaryFn fn)
erase_if
Find the first member of the list which satisfies the predicate given by
'fn' and remove it from the list, returning a referenced pointer to the
removed element. Return nullptr if no element satisfies the predicate.
Defined at line 662 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
template <typename UnaryFn>
const_iterator find_if (UnaryFn fn)
find_if
Find the first member of the list which satisfies the predicate given by
'fn' and return an iterator in the list which refers to it. Return end()
if no member satisfies the predicate.
Defined at line 676 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
template <typename UnaryFn>
iterator find_if (UnaryFn fn)
Defined at line 686 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
template <typename UnaryFn>
PtrType replace_if (UnaryFn fn, const PtrType & ptr)
replace_if (copy)
Find the first member of the list which satisfies the predicate given by
'fn' and replace it in the list, returning a referenced pointer to the
replaced element. If no member satisfies the predicate, simply return
nullptr instead.
Defined at line 698 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
template <typename UnaryFn>
PtrType replace_if (UnaryFn fn, PtrType && ptr)
replace_if (move)
Same as the copy version, except that if no member satisfies the
predicate, the original reference is returned instead of nullptr.
Defined at line 712 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
PtrType replace (typename PtrTraits::RefType target, PtrType replacement)
replace (copy and move)
Replaces the target member of the list with the given replacement.
Defined at line 724 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_double_list.h
Records
Friends
template <typenametypenameSizeOrdertypename>
class DoublyLinkedListChecker