![]() |
mutable
A Database System for Research and Fast Prototyping
|
Implements a doubly-linked list with an overhead of just a single pointer per element. More...
#include <ADT.hpp>
Data Structures | |
struct | node_type |
struct | the_iterator |
Public Types | |
using | value_type = T |
using | size_type = std::size_t |
using | allocator_type = Allocator |
using | reference_type = T & |
using | const_reference_type = const T & |
using | iterator = the_iterator< false > |
using | const_iterator = the_iterator< true > |
Private Member Functions | |
node_type * | allocate_node () |
void | deallocate_node (node_type *ptr) |
Private Attributes | |
allocator_type | allocator_ |
| |
node_type * | head_ = nullptr |
| |
node_type * | tail_ = nullptr |
| |
size_type | size_ = 0 |
| |
Friends | |
void | swap (doubly_linked_list &first, doubly_linked_list &second) |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const doubly_linked_list &L) |
std::string | to_string (const doubly_linked_list &L) |
Implements a doubly-linked list with an overhead of just a single pointer per element.
using m::doubly_linked_list< T, Allocator >::allocator_type = Allocator |
using m::doubly_linked_list< T, Allocator >::const_iterator = the_iterator<true> |
using m::doubly_linked_list< T, Allocator >::const_reference_type = const T& |
using m::doubly_linked_list< T, Allocator >::iterator = the_iterator<false> |
using m::doubly_linked_list< T, Allocator >::reference_type = T& |
using m::doubly_linked_list< T, Allocator >::size_type = std::size_t |
using m::doubly_linked_list< T, Allocator >::value_type = T |
|
inline |
|
inlineexplicit |
|
inline |
Definition at line 482 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::begin(), m::doubly_linked_list< T, Allocator >::end(), and m::doubly_linked_list< T, Allocator >::push_back().
|
inline |
Definition at line 489 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::clear().
|
inlineexplicit |
Definition at line 491 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::begin(), m::doubly_linked_list< T, Allocator >::cbegin(), m::doubly_linked_list< T, Allocator >::cend(), and m::doubly_linked_list< T, Allocator >::insert().
|
inline |
Definition at line 495 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::swap.
|
inlineprivate |
Definition at line 660 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::allocator_.
Referenced by m::doubly_linked_list< T, Allocator >::emplace().
|
inline |
Definition at line 504 of file ADT.hpp.
References M_insist, m::doubly_linked_list< T, Allocator >::tail_, and m::doubly_linked_list< T, Allocator >::node_type::value_.
|
inline |
Definition at line 505 of file ADT.hpp.
References M_insist, m::doubly_linked_list< T, Allocator >::tail_, and m::doubly_linked_list< T, Allocator >::node_type::value_.
|
inline |
Definition at line 508 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_.
Referenced by m::list_allocator::allocate(), m::doubly_linked_list< T, Allocator >::cbegin(), m::doubly_linked_list< T, Allocator >::doubly_linked_list(), m::doubly_linked_list< T, Allocator >::emplace_front(), m::doubly_linked_list< T, Allocator >::insert(), m::list_allocator::insert_chunk_sorted(), m::doubly_linked_list< T, Allocator >::pop_front(), m::list_allocator::reclaim_chunk(), and m::list_allocator::~list_allocator().
|
inline |
Definition at line 510 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_.
|
inline |
Definition at line 512 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::begin().
Referenced by m::doubly_linked_list< T, Allocator >::doubly_linked_list().
|
inline |
Definition at line 513 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::end().
Referenced by m::doubly_linked_list< T, Allocator >::doubly_linked_list().
|
inline |
Definition at line 627 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_, M_insist, m::doubly_linked_list< T, Allocator >::pop_front(), and m::doubly_linked_list< T, Allocator >::size_.
Referenced by m::doubly_linked_list< T, Allocator >::~doubly_linked_list().
|
inline |
Definition at line 519 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::rbegin().
|
inline |
Definition at line 520 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::rend().
|
inlineprivate |
Definition at line 661 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::allocator_.
Referenced by m::doubly_linked_list< T, Allocator >::erase().
|
inline |
Definition at line 656 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::dump().
Referenced by m::doubly_linked_list< T, Allocator >::dump().
|
inline |
|
inline |
Definition at line 529 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::allocate_node(), args, m::doubly_linked_list< T, Allocator >::head_, m::doubly_linked_list< T, Allocator >::the_iterator< C >::node_, m::doubly_linked_list< T, Allocator >::the_iterator< C >::prev_, m::doubly_linked_list< T, Allocator >::node_type::ptrxor_, m::doubly_linked_list< T, Allocator >::size_, m::doubly_linked_list< T, Allocator >::tail_, and m::doubly_linked_list< T, Allocator >::node_type::value_.
Referenced by m::doubly_linked_list< T, Allocator >::emplace_back(), m::doubly_linked_list< T, Allocator >::emplace_front(), and m::doubly_linked_list< T, Allocator >::insert().
|
inline |
Definition at line 549 of file ADT.hpp.
References args, m::doubly_linked_list< T, Allocator >::emplace(), and m::doubly_linked_list< T, Allocator >::end().
Referenced by m::doubly_linked_list< T, Allocator >::push_back().
|
inline |
Definition at line 555 of file ADT.hpp.
References args, m::doubly_linked_list< T, Allocator >::begin(), and m::doubly_linked_list< T, Allocator >::emplace().
Referenced by m::doubly_linked_list< T, Allocator >::push_front().
|
inline |
Definition at line 523 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::size_.
Referenced by m::list_allocator::list_allocator(), and m::list_allocator::~list_allocator().
|
inline |
Definition at line 509 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::tail_.
Referenced by m::list_allocator::allocate(), m::doubly_linked_list< T, Allocator >::cend(), m::list_allocator::coalesce(), m::doubly_linked_list< T, Allocator >::doubly_linked_list(), m::doubly_linked_list< T, Allocator >::emplace_back(), m::doubly_linked_list< T, Allocator >::insert(), m::list_allocator::insert_chunk_sorted(), m::list_allocator::link_chunk(), and m::list_allocator::reclaim_chunk().
|
inline |
Definition at line 511 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::tail_.
|
inline |
Definition at line 609 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::erase(), m::doubly_linked_list< T, Allocator >::the_iterator< C >::node_, and m::doubly_linked_list< T, Allocator >::the_iterator< C >::prev_.
Referenced by m::doubly_linked_list< T, Allocator >::erase().
|
inline |
Definition at line 591 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::deallocate_node(), m::doubly_linked_list< T, Allocator >::head_, M_insist, m::doubly_linked_list< T, Allocator >::the_iterator< C >::node_, m::doubly_linked_list< T, Allocator >::the_iterator< C >::prev_, m::doubly_linked_list< T, Allocator >::node_type::ptrxor_, m::doubly_linked_list< T, Allocator >::size_, and m::doubly_linked_list< T, Allocator >::tail_.
Referenced by m::doubly_linked_list< T, Allocator >::pop_front(), m::list_allocator::unlink_chunk(), and m::list_allocator::~list_allocator().
|
inline |
Definition at line 502 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_, M_insist, and m::doubly_linked_list< T, Allocator >::node_type::value_.
|
inline |
Definition at line 503 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_, M_insist, and m::doubly_linked_list< T, Allocator >::node_type::value_.
|
inlinenoexcept |
Definition at line 499 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::allocator_.
|
inline |
Definition at line 565 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace().
Referenced by m::doubly_linked_list< T, Allocator >::doubly_linked_list(), m::doubly_linked_list< T, Allocator >::insert(), and m::list_allocator::link_chunk().
|
inline |
Definition at line 575 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::begin(), m::doubly_linked_list< T, Allocator >::end(), m::doubly_linked_list< T, Allocator >::insert(), M_insist, m::doubly_linked_list< T, Allocator >::the_iterator< C >::node_, and m::doubly_linked_list< T, Allocator >::the_iterator< C >::prev_.
|
inline |
Definition at line 567 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::insert(), m::doubly_linked_list< T, Allocator >::the_iterator< C >::node_, and m::doubly_linked_list< T, Allocator >::the_iterator< C >::prev_.
|
inline |
Definition at line 587 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::insert().
|
inline |
Definition at line 566 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace().
|
inline |
|
inline |
Definition at line 497 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::swap.
|
inline |
Definition at line 611 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::pop_front(), and m::doubly_linked_list< T, Allocator >::reverse().
|
inline |
Definition at line 618 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::begin(), m::doubly_linked_list< T, Allocator >::erase(), m::doubly_linked_list< T, Allocator >::head_, M_insist, m::doubly_linked_list< T, Allocator >::size_, m::doubly_linked_list< T, Allocator >::tail_, and m::doubly_linked_list< T, Allocator >::node_type::value_.
Referenced by m::doubly_linked_list< T, Allocator >::clear(), and m::doubly_linked_list< T, Allocator >::pop_back().
|
inline |
Definition at line 560 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace_back().
Referenced by m::doubly_linked_list< T, Allocator >::doubly_linked_list().
|
inline |
Definition at line 561 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace_back().
|
inline |
Definition at line 562 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace_front().
|
inline |
Definition at line 563 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::emplace_front().
|
inline |
Definition at line 515 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::tail_.
Referenced by m::doubly_linked_list< T, Allocator >::crbegin().
|
inline |
Definition at line 517 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::tail_.
|
inline |
Definition at line 516 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_.
Referenced by m::doubly_linked_list< T, Allocator >::crend().
|
inline |
Definition at line 518 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_.
|
inline |
Definition at line 630 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::head_, and m::doubly_linked_list< T, Allocator >::tail_.
Referenced by m::doubly_linked_list< T, Allocator >::pop_back().
|
inline |
Definition at line 524 of file ADT.hpp.
References m::doubly_linked_list< T, Allocator >::size_.
Referenced by m::list_allocator::list_allocator(), and m::list_allocator::num_chunks_available().
|
friend |
|
friend |
Definition at line 465 of file ADT.hpp.
Referenced by m::doubly_linked_list< T, Allocator >::doubly_linked_list(), and m::doubly_linked_list< T, Allocator >::operator=().
|
friend |
|
mutableprivate |
the memory allocator
Definition at line 401 of file ADT.hpp.
Referenced by m::doubly_linked_list< T, Allocator >::allocate_node(), m::doubly_linked_list< T, Allocator >::deallocate_node(), and m::doubly_linked_list< T, Allocator >::get_allocator().
|
private |
points to the first node
Definition at line 404 of file ADT.hpp.
Referenced by m::doubly_linked_list< T, Allocator >::begin(), m::doubly_linked_list< T, Allocator >::clear(), m::doubly_linked_list< T, Allocator >::emplace(), m::doubly_linked_list< T, Allocator >::erase(), m::doubly_linked_list< T, Allocator >::front(), m::doubly_linked_list< T, Allocator >::pop_front(), m::doubly_linked_list< T, Allocator >::rend(), and m::doubly_linked_list< T, Allocator >::reverse().
|
private |
the number of elements/nodes in the list
Definition at line 408 of file ADT.hpp.
Referenced by m::doubly_linked_list< T, Allocator >::clear(), m::doubly_linked_list< T, Allocator >::emplace(), m::doubly_linked_list< T, Allocator >::empty(), m::doubly_linked_list< T, Allocator >::erase(), m::doubly_linked_list< T, Allocator >::pop_front(), and m::doubly_linked_list< T, Allocator >::size().
|
private |
points to the last node
Definition at line 406 of file ADT.hpp.
Referenced by m::doubly_linked_list< T, Allocator >::back(), m::doubly_linked_list< T, Allocator >::emplace(), m::doubly_linked_list< T, Allocator >::end(), m::doubly_linked_list< T, Allocator >::erase(), m::doubly_linked_list< T, Allocator >::pop_front(), m::doubly_linked_list< T, Allocator >::rbegin(), and m::doubly_linked_list< T, Allocator >::reverse().