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

Key identifying a constant_cell. More...

#include <constant_cell.hpp>

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

Public Member Functions

 constant_key (T value)
 Create a constant cell key identifying a constant_cell with a given value.
 
bool eq (const key &k) 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?
 

Public Attributes

constvalue
 Constant value.
 

Detailed Description

template<typename T>
struct live_cells::constant_key< T >

Key identifying a constant_cell.

Constructor & Destructor Documentation

◆ constant_key()

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

Create a constant cell key identifying a constant_cell with a given value.

Parameters
valueThe value

Member Function Documentation

◆ eq()

template<typename T >
bool live_cells::constant_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::constant_key< T >::hash ( ) const
inlineoverridevirtualnoexcept

Compute the hash code for this key.

Returns
Hash code

Implements live_cells::key.


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