Live Cells C++
Reactive Programming for C++
Loading...
Searching...
No Matches
live_cells::value_key< T > Class Template Reference

Base class for a key distinguished from other keys by one value. More...

#include <keys.hpp>

Inheritance diagram for live_cells::value_key< T >:
Collaboration diagram for live_cells::value_key< T >:

Public Member Functions

 value_key (T value)
 Create a key distinguished from other keys by one value.
 
bool eq (const key &other) const noexcept override
 Compare this key to another key for equality.
 
std::size_t hash () const noexcept override
 Compute the hash code for this key.
 
- Public Member Functions inherited from live_cells::key
virtual bool is_unique () const noexcept
 Is this a unique key?
 

Detailed Description

template<typename T>
class live_cells::value_key< T >

Base class for a key distinguished from other keys by one value.

Keys of this type compare equal if their runtime type is the same, and their values are equal.

Constructor & Destructor Documentation

◆ value_key()

template<typename T >
live_cells::value_key< T >::value_key ( T value)
inline

Create a key distinguished from other keys by one value.

Parameters
valueThe value

Member Function Documentation

◆ eq()

template<typename T >
bool live_cells::value_key< T >::eq ( const key & k) const
inlineoverridevirtualnoexcept

Compare this key to another key for equality.

Parameters
kThe key to compare to
Returns
true if this is equal to \aa k.

Implements live_cells::key.

◆ hash()

template<typename T >
std::size_t live_cells::value_key< T >::hash ( ) const
inlineoverridevirtualnoexcept

Compute the hash code for this key.

Returns
Hash code

Implements live_cells::key.


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