libhatchet
Loading...
Searching...
No Matches
hxhash_table_map_node< key_t_, value_t_ > Class Template Reference

#include <hxhash_table.hpp>

Public Types

using key_t = key_t_
using value_t = value_t_
Public Types inherited from hxhash_table_set_node< key_t_ >
using key_t = key_t_

Public Member Functions

 hxhash_table_map_node (const key_t_ &key_)
template<typename ref_t_>
 hxhash_table_map_node (const key_t_ &key_, ref_t_ &&value_)
bool operator== (const hxhash_table_map_node &x_) const
bool operator< (const hxhash_table_map_node &x_) const
const value_t_ & value (void) const
value_t_ & value (void)
Public Member Functions inherited from hxhash_table_set_node< key_t_ >
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

Additional Inherited Members

Static Public Member Functions inherited from hxhash_table_set_node< key_t_ >
static hxhash_t hash_value (const key_t_ &key_)
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_, typename value_t_>
class hxhash_table_map_node< key_t_, value_t_ >

hxhash_table_map_node - Base class for unordered map entries.

Member Typedef Documentation

◆ key_t

template<typename key_t_, typename value_t_>
using hxhash_table_map_node< key_t_, value_t_ >::key_t = key_t_

◆ value_t

template<typename key_t_, typename value_t_>
using hxhash_table_map_node< key_t_, value_t_ >::value_t = value_t_

Constructor & Destructor Documentation

◆ hxhash_table_map_node() [1/2]

template<typename key_t_, typename value_t_>
hxhash_table_map_node< key_t_, value_t_ >::hxhash_table_map_node ( const key_t_ & key_)
inline

Default-initializes a node.

value_t must default-construct when accessed via operator[].

  • key : Key used to identify the node.

◆ hxhash_table_map_node() [2/2]

template<typename key_t_, typename value_t_>
template<typename ref_t_>
hxhash_table_map_node< key_t_, value_t_ >::hxhash_table_map_node ( const key_t_ & key_,
ref_t_ && value_ )
inline

Constructs a node whose value is copy- or move-initialized.

  • key : Key used to identify the node.
  • value : Value forwarded into storage.

Member Function Documentation

◆ operator<()

template<typename key_t_, typename value_t_>
bool hxhash_table_map_node< key_t_, value_t_ >::operator< ( const hxhash_table_map_node< key_t_, value_t_ > & x_) const

Returns true if this node is ordered before x, comparing keys first and then values with hxkey_equal and hxkey_less.

  • x : The node to compare against.

◆ operator==()

template<typename key_t_, typename value_t_>
bool hxhash_table_map_node< key_t_, value_t_ >::operator== ( const hxhash_table_map_node< key_t_, value_t_ > & x_) const

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

  • x : The node to compare against.

◆ value() [1/2]

template<typename key_t_, typename value_t_>
value_t_ & hxhash_table_map_node< key_t_, value_t_ >::value ( void )
inline

Returns the stored value, allowing mutation.

◆ value() [2/2]

template<typename key_t_, typename value_t_>
const value_t_ & hxhash_table_map_node< key_t_, value_t_ >::value ( void ) const
inline

Returns the stored value.


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