Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::LinHashBucketVtl< Key > Class Template Reference

Bucket with virtual destructor for a hash table with collision resolution by separate chaining. More...

#include <tpl_linHash.H>

Inheritance diagram for Aleph::LinHashBucketVtl< Key >:
[legend]
Collaboration diagram for Aleph::LinHashBucketVtl< Key >:
[legend]

Public Member Functions

 LinHashBucketVtl (const LinHashBucketVtl &bucket)
 
 LinHashBucketVtl ()
 
 LinHashBucketVtl (const Key &key)
 
Key & get_key () noexcept
 
Dlinkget_link () noexcept
 
virtual ~LinHashBucketVtl ()
 virtual destructor.
 
- Public Member Functions inherited from Aleph::Dnode< Key >
Dnode< Key > *& get_next () const noexcept
 Return the next node to this
 
Dnode< Key > *& get_prev () const noexcept
 Return the previous node to this
 
Dnode< Key > * remove_prev () noexcept
 Remove the previous node to this; return its address.
 
Dnode< Key > * remove_next () noexcept
 Remove the next node to this; return its address.
 
Dnode< Key > *& get_first_ne () const noexcept
 Get the first node.
 
Dnode< Key > *& get_last_ne () const noexcept
 Get the last node.
 
Dnode< Key > *& get_first () const
 Get the first node.
 
Dnode< Key > *& get_last () const
 Get the last node.
 
Dnode< Key > * remove_last_ne () noexcept
 Remove the last node and return its address.
 
Dnode< Key > * remove_first_ne () noexcept
 Remove the first node and return its address.
 
Dnode< Key > * remove_last ()
 Remove the last node and return its address.
 
Dnode< Key > * remove_first ()
 Remove the first node and return its address.
 
 Dnode () noexcept
 
 Dnode (const Key &item)
 Construct a node with a copy of item
 
 Dnode (Key &&item)
 Construct a new node with the item moved.
 
 Dnode (const Dnode &node)
 Copy constructor.
 
 Dnode (Dnode &&node) noexcept
 Move constructor.
 
Dnodeswap (Dnode &p)
 Swap this with p
 
Dnodeoperator= (const Dnode &p)
 Copy assigment.
 
Dnodeoperator= (Dnode &&p)
 Move asignment.
 
Key & get_data () noexcept
 Return a modifiable reference to the data contained in the node.
 
const Key & get_data () const noexcept
 Return a modifiable reference to the data contained in the node.
 
Key & get_key () noexcept
 
const Key & get_key () const noexcept
 

Static Public Member Functions

static LinHashBucketVtldlink_to_base (Dlink *link) noexcept
 
- Static Public Member Functions inherited from Aleph::Dnode< Key >
static Dnodedata_to_node (Key &data) noexcept
 Given an reference to the data in the node, returns a pointer to the Dnode object that contains it.
 

Private Attributes

Dlink link
 

Additional Inherited Members

- Public Types inherited from Aleph::Dnode< Key >
using key_type = Key
 The data type.
 

Detailed Description

template<typename Key>
class Aleph::LinHashBucketVtl< Key >

Bucket with virtual destructor for a hash table with collision resolution by separate chaining.

Parameters
Keyhash search key
See also
LhashTable

Definition at line 121 of file tpl_linHash.H.

Constructor & Destructor Documentation

◆ LinHashBucketVtl() [1/3]

template<typename Key >
Aleph::LinHashBucketVtl< Key >::LinHashBucketVtl ( const LinHashBucketVtl< Key > &  bucket)
inline

Definition at line 123 of file tpl_linHash.H.

◆ LinHashBucketVtl() [2/3]

template<typename Key >
Aleph::LinHashBucketVtl< Key >::LinHashBucketVtl ( )
inline

Definition at line 123 of file tpl_linHash.H.

◆ LinHashBucketVtl() [3/3]

template<typename Key >
Aleph::LinHashBucketVtl< Key >::LinHashBucketVtl ( const Key &  key)
inline

Definition at line 123 of file tpl_linHash.H.

◆ ~LinHashBucketVtl()

template<typename Key >
virtual Aleph::LinHashBucketVtl< Key >::~LinHashBucketVtl ( )
inlinevirtual

virtual destructor.

Definition at line 126 of file tpl_linHash.H.

Member Function Documentation

◆ dlink_to_base()

template<typename Key >
static LinHashBucketVtl * Aleph::LinHashBucketVtl< Key >::dlink_to_base ( Dlink link)
inlinestaticnoexcept

Definition at line 123 of file tpl_linHash.H.

◆ get_key()

template<typename Key >
Key & Aleph::LinHashBucketVtl< Key >::get_key ( )
inlinenoexcept

Definition at line 123 of file tpl_linHash.H.

◆ get_link()

template<typename Key >
Dlink * Aleph::LinHashBucketVtl< Key >::get_link ( )
inlinenoexcept

Definition at line 123 of file tpl_linHash.H.

Member Data Documentation

◆ link

template<typename Key >
Dlink Aleph::LinHashBucketVtl< Key >::link
private

Definition at line 123 of file tpl_linHash.H.


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