Live Cells C++
Reactive Programming for C++
Loading...
Searching...
No Matches
live_cells::key Class Referenceabstract

Defines the interface for a key which uniquely identifies a cell. More...

#include <keys.hpp>

Inheritance diagram for live_cells::key:

Public Member Functions

virtual bool eq (const key &k) const noexcept=0
 Compare this key to another key for equality.
 
virtual std::size_t hash () const noexcept=0
 Compute the hash code for this key.
 
virtual bool is_unique () const noexcept
 Is this a unique key?
 

Detailed Description

Defines the interface for a key which uniquely identifies a cell.

Member Function Documentation

◆ eq()

virtual bool live_cells::key::eq ( const key & k) const
pure virtualnoexcept

Compare this key to another key for equality.

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

Implemented in live_cells::constant_key< T >, live_cells::unique_key, live_cells::value_key< T, Ts >, live_cells::value_key< key_ref >, live_cells::value_key< key_ref, key_ref >, and live_cells::value_key< T >.

◆ hash()

virtual std::size_t live_cells::key::hash ( ) const
pure virtualnoexcept

◆ is_unique()

virtual bool live_cells::key::is_unique ( ) const
inlinevirtualnoexcept

Is this a unique key?

A key is unique if it is identified by a single key instance.

Returns
true if this key is unique.

Reimplemented in live_cells::unique_key.


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