Recti 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Dllink< T > Class Template Reference

doubly linked node (that may also be a "head" a list) More...

#include <dllink.hpp>

Collaboration diagram for Dllink< T >:
Collaboration graph
[legend]

Public Member Functions

constexpr Dllink (T dat) noexcept
 Construct a new Dllink object.
 
constexpr Dllink ()=default
 Copy construct a new Dllink object (deleted intentionally)
 
 ~Dllink ()=default
 
 Dllink (const Dllink &)=delete
 
auto operator= (const Dllink &) -> Dllink &=delete
 
constexpr Dllink (Dllink &&) noexcept=default
 
constexpr auto operator= (Dllink &&) noexcept -> Dllink &=delete
 
constexpr auto lock () noexcept -> void
 lock the node (and don't append it to any list)
 
constexpr auto is_locked () const noexcept -> bool
 whether the node is locked
 
constexpr auto detach () noexcept -> void
 detach from a list
 

Public Attributes

Dllinknext {this}
 
Dllinkprev {this}
 
data {}
 

Detailed Description

template<typename T>
class Dllink< T >

doubly linked node (that may also be a "head" a list)

A Doubly-linked List class. This class simply contains a link of node's. By adding a "head" node (sentinel), deleting a node is extremely fast (see "Introduction to Algorithm"). This class does not keep the length information as it is not necessary for the FM algorithm. This saves memory and run-time to update the length information. Note that this class does not own the list node. They are supplied by the caller in order to better reuse the nodes.

Template Parameters
TThe data type stored in each node.

Constructor & Destructor Documentation

◆ Dllink() [1/4]

template<typename T >
constexpr Dllink< T >::Dllink ( dat)
inlineexplicitconstexprnoexcept

Construct a new Dllink object.

Parameters
[in]datthe data

◆ Dllink() [2/4]

template<typename T >
constexpr Dllink< T >::Dllink ( )
constexprdefault

Copy construct a new Dllink object (deleted intentionally)

◆ ~Dllink()

template<typename T >
Dllink< T >::~Dllink ( )
default

◆ Dllink() [3/4]

template<typename T >
Dllink< T >::Dllink ( const Dllink< T > &  )
delete

◆ Dllink() [4/4]

template<typename T >
constexpr Dllink< T >::Dllink ( Dllink< T > &&  )
constexprdefaultnoexcept

Member Function Documentation

◆ detach()

template<typename T >
constexpr auto Dllink< T >::detach ( ) -> void
inlineconstexprnoexcept

detach from a list

◆ is_locked()

template<typename T >
constexpr auto Dllink< T >::is_locked ( ) const -> bool
inlineconstexprnoexcept

whether the node is locked

Returns
True if the node is locked, false otherwise.

◆ lock()

template<typename T >
constexpr auto Dllink< T >::lock ( ) -> void
inlineconstexprnoexcept

lock the node (and don't append it to any list)

◆ operator=() [1/2]

template<typename T >
auto Dllink< T >::operator= ( const Dllink< T > &  ) -> Dllink &=delete
delete

◆ operator=() [2/2]

template<typename T >
constexpr auto Dllink< T >::operator= ( Dllink< T > &&  ) -> Dllink &=delete
constexprdeletenoexcept

Member Data Documentation

◆ data

template<typename T >
T Dllink< T >::data {}

data

◆ next

template<typename T >
Dllink* Dllink< T >::next {this}

pointer to the next node

◆ prev

template<typename T >
Dllink* Dllink< T >::prev {this}

pointer to the previous node


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