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

Base class for a key distinguished from other keys by one or more values. More...

#include <keys.hpp>

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

Public Member Functions

 value_key (T value, Ts... rest)
 Create a key distinguished from other keys by one or more values.
 
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, typename... Ts>
class live_cells::value_key< T, Ts >

Base class for a key distinguished from other keys by one or more values.

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 , typename... Ts>
live_cells::value_key< T, Ts >::value_key ( T value,
Ts... rest )
inline

Create a key distinguished from other keys by one or more values.

Parameters
valueFirst value
restRemaining values

Member Function Documentation

◆ eq()

template<typename T , typename... Ts>
bool live_cells::value_key< T, Ts >::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 , typename... Ts>
std::size_t live_cells::value_key< T, Ts >::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: