ROSE 0.11.145.192
Public Member Functions | List of all members
Sawyer::Container::HashMap< K, T, H, C, A >::Node Class Reference

Description

template<class K, class T, class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
class Sawyer::Container::HashMap< K, T, H, C, A >::Node

Type for stored nodes.

A storage node contains an immutable key and its associated value.

Definition at line 111 of file HashMap.h.

#include <Sawyer/HashMap.h>

Inheritance diagram for Sawyer::Container::HashMap< K, T, H, C, A >::Node:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Container::HashMap< K, T, H, C, A >::Node:
Collaboration graph
[legend]

Public Member Functions

 Node (const std::pair< const Key, Value > &pair)
 
 Node (const Key &key, Value &value)
 
const Keykey () const
 Key part of key/value node.
 
Valuevalue ()
 Value part of key/value node.
 
const Valuevalue () const
 Value part of key/value node.
 

Constructor & Destructor Documentation

◆ Node() [1/2]

template<class K , class T , class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
Sawyer::Container::HashMap< K, T, H, C, A >::Node::Node ( const std::pair< const Key, Value > &  pair)
inlineexplicit

Definition at line 114 of file HashMap.h.

◆ Node() [2/2]

template<class K , class T , class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
Sawyer::Container::HashMap< K, T, H, C, A >::Node::Node ( const Key key,
Value value 
)
inline

Definition at line 117 of file HashMap.h.

Member Function Documentation

◆ key()

template<class K , class T , class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
const Key & Sawyer::Container::HashMap< K, T, H, C, A >::Node::key ( ) const
inline

Key part of key/value node.

Returns the key part of a key/value node. Keys are not mutable when they are part of a map.

Definition at line 123 of file HashMap.h.

◆ value() [1/2]

template<class K , class T , class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
Value & Sawyer::Container::HashMap< K, T, H, C, A >::Node::value ( )
inline

Value part of key/value node.

Returns a reference to the value part of a key/value node.

Definition at line 130 of file HashMap.h.

◆ value() [2/2]

template<class K , class T , class H = boost::hash<K>, class C = std::equal_to<K>, class A = std::allocator<std::pair<const K, T> >>
const Value & Sawyer::Container::HashMap< K, T, H, C, A >::Node::value ( ) const
inline

Value part of key/value node.

Returns a reference to the value part of a key/value node.

Definition at line 131 of file HashMap.h.


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