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

#include <hxhash_table.hpp>

Public Types

using key_t = key_t_

Public Member Functions

template<typename ref_t_>
 hxhash_table_set_node (ref_t_ &&key_)
 hxhash_table_set_node (void)=delete
 hxhash_table_set_node (const hxhash_table_set_node &src_)=delete
hxhash_table_set_node & operator= (const hxhash_table_set_node &x_)=delete
bool operator== (const hxhash_table_set_node &x_) const
bool operator< (const hxhash_table_set_node &x_) const
const key_t_ & hash_key (void) const
hxhash_t hash_value (void) const

Static Public Member Functions

static hxhash_t hash_value (const key_t_ &key_)

Additional Inherited Members

Protected Member Functions inherited from hxhash_node_base
 hxhash_node_base (hxhash_t hash_)
Protected Attributes inherited from hxhash_node_base
hxhash_node_base * hash_next
hxhash_t hash_val

Detailed Description

template<typename key_t_>
class hxhash_table_set_node< key_t_ >

hxhash_table_set_node - Optional base class for unordered set entries.

Caches the hash value. See hxhash_table_map_node if you need a map node. Copying and assignment are unimplemented and the key must be immutable in any assignment operation in a subclass.

Member Typedef Documentation

◆ key_t

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

Constructor & Destructor Documentation

◆ hxhash_table_set_node() [1/3]

template<typename key_t_>
template<typename ref_t_>
hxhash_table_set_node< key_t_ >::hxhash_table_set_node ( ref_t_ && key_)
inline

Constructs a node from the key and caches its hash for reuse.

  • key : Key used to identify the node.

◆ hxhash_table_set_node() [2/3]

template<typename key_t_>
hxhash_table_set_node< key_t_ >::hxhash_table_set_node ( void )
delete

Assignment is undefined. The key is immutable.

◆ hxhash_table_set_node() [3/3]

template<typename key_t_>
hxhash_table_set_node< key_t_ >::hxhash_table_set_node ( const hxhash_table_set_node< key_t_ > & src_)
delete

Member Function Documentation

◆ hash_key()

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

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

◆ hash_value() [1/2]

template<typename key_t_>
hxhash_t hxhash_table_set_node< key_t_ >::hash_value ( const key_t_ & key_)
inlinestatic

Returns the hash value computed for key.

Hash values are not required to be unique.

  • key : The key to hash.

◆ hash_value() [2/2]

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

Returns the cached hash value for the stored key.

Hash values are not required to be unique.

◆ operator<()

template<typename key_t_>
bool hxhash_table_set_node< key_t_ >::operator< ( const hxhash_table_set_node< key_t_ > & x_) const
inline

Returns true if this node's key is ordered before x's key, using hxkey_less.

  • x : The node to compare against.

◆ operator=()

template<typename key_t_>
hxhash_table_set_node & hxhash_table_set_node< key_t_ >::operator= ( const hxhash_table_set_node< key_t_ > & x_)
delete

◆ operator==()

template<typename key_t_>
bool hxhash_table_set_node< key_t_ >::operator== ( const hxhash_table_set_node< key_t_ > & x_) const
inline

Returns true if this node and x have equal keys, using hxkey_equal.

  • x : The node to compare against.

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