libhatchet
Loading...
Searching...
No Matches
hxhash_table_node_integer< key_t_ > Class Template Reference

#include <hxhash_table_nodes.hpp>

Public Types

using key_t = key_t_

Public Member Functions

 hxhash_table_node_integer (const key_t_ &key_)
 hxhash_table_node_integer (const hxhash_table_node_integer &src_)
hxhash_table_node_integeroperator= (const hxhash_table_node_integer &other_)
hxhash_table_node_integerhash_next (void) const
void set_hash_next (hxhash_table_node_integer *next_)
const key_t_ & hash_key (void) const
hxhash_t hash_value (void) const

Static Public Member Functions

static hxhash_t hash_value (key_t_ key_)

Detailed Description

template<typename key_t_>
class hxhash_table_node_integer< key_t_ >

hxhash_table_node_integer - node_t for use with hxhash_table for integer types.

See the documentation of hxhash_table for the required interface. Copy and move construction produce an unlinked node with the same key and hash. Copy and move assignment leave the linkage of either node unchanged. This serves as an example of a node_t that does not use a base class.

Member Typedef Documentation

◆ key_t

template<typename key_t_>
using hxhash_table_node_integer< key_t_ >::key_t = key_t_

Constructor & Destructor Documentation

◆ hxhash_table_node_integer() [1/2]

template<typename key_t_>
hxhash_table_node_integer< key_t_ >::hxhash_table_node_integer ( const key_t_ & key_)
inline

Constructs a node wrapping the key and caches its hash.

  • key : Key value represented by the node.

◆ hxhash_table_node_integer() [2/2]

template<typename key_t_>
hxhash_table_node_integer< key_t_ >::hxhash_table_node_integer ( const hxhash_table_node_integer< key_t_ > & src_)
inline

Constructs an unlinked node with the same key.

Member Function Documentation

◆ hash_key()

template<typename key_t_>
const key_t_ & hxhash_table_node_integer< key_t_ >::hash_key ( void ) const
inline

The key and hash identify the node_t and should not change once added.

◆ hash_next()

template<typename key_t_>
hxhash_table_node_integer * hxhash_table_node_integer< key_t_ >::hash_next ( void ) const
inline

Returns the next node in the table's embedded linked list.

◆ hash_value() [1/2]

template<typename key_t_>
hxhash_t hxhash_table_node_integer< key_t_ >::hash_value ( key_t_ key_)
inlinestatic

Returns the hash of a key without constructing a node.

  • key : The key to hash.

◆ hash_value() [2/2]

template<typename key_t_>
hxhash_t hxhash_table_node_integer< key_t_ >::hash_value ( void ) const
inline

Returns the cached hash value for the stored key.

◆ operator=()

template<typename key_t_>
hxhash_table_node_integer & hxhash_table_node_integer< key_t_ >::operator= ( const hxhash_table_node_integer< key_t_ > & other_)
inline

Assigns nothing. Hash table linkage of either node is not affected.

◆ set_hash_next()

template<typename key_t_>
void hxhash_table_node_integer< key_t_ >::set_hash_next ( hxhash_table_node_integer< key_t_ > * next_)
inline

Sets the next node in the table's embedded linked list.

  • next : The new next node pointer.

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