GCSIM
Public Member Functions | Public Attributes | List of all members
hash_map_entry< K, V > Struct Template Reference

the structure of the element inside of the hash_map. More...

#include <hash-map-entry.hpp>

Public Member Functions

 hash_map_entry (const K &k, const V &v)
 creates an instance of the hash_map entry.
 
 hash_map_entry (K &&k, V &&v)
 creates an instance of the hash_map entry.
 

Public Attributes

hash_map_entrynext
 pointer to the next entry in the bucket.
 
key
 key of the entry.
 
value
 value of the entry.
 

Detailed Description

template<typename K, typename V>
struct hash_map_entry< K, V >

the structure of the element inside of the hash_map.

Template Parameters
K- type of the key.
V- type of the value.

Constructor & Destructor Documentation

◆ hash_map_entry() [1/2]

template<typename K , typename V >
hash_map_entry< K, V >::hash_map_entry ( const K &  k,
const V &  v 
)
inline

creates an instance of the hash_map entry.

Parameters
k- const reference to a key.
v- const reference to a value.

next defaults to nullptr.

◆ hash_map_entry() [2/2]

template<typename K , typename V >
hash_map_entry< K, V >::hash_map_entry ( K &&  k,
V &&  v 
)
inline

creates an instance of the hash_map entry.

Parameters
k- rvalue key.
v- rvalue value.

next defaults to nullptr.

Member Data Documentation

◆ key

template<typename K , typename V >
K hash_map_entry< K, V >::key

key of the entry.

◆ next

template<typename K , typename V >
hash_map_entry* hash_map_entry< K, V >::next

pointer to the next entry in the bucket.

◆ value

template<typename K , typename V >
V hash_map_entry< K, V >::value

value of the entry.


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