Live Cells C++
Reactive Programming for C++
Loading...
Searching...
No Matches
live_cells::unique_key Class Reference

A key of uniquely identified by a single instance. More...

#include <keys.hpp>

Inheritance diagram for live_cells::unique_key:
Collaboration diagram for live_cells::unique_key:

Public Member Functions

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.
 
bool is_unique () const noexcept override
 Is this a unique key?
 

Detailed Description

A key of uniquely identified by a single instance.

An instance of this class compares equal only when compared to the same instance.

Member Function Documentation

◆ eq()

bool live_cells::unique_key::eq ( const key & k) const
overridevirtualnoexcept

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()

std::size_t live_cells::unique_key::hash ( ) const
overridevirtualnoexcept

Compute the hash code for this key.

Returns
Hash code

Implements live_cells::key.

◆ is_unique()

bool live_cells::unique_key::is_unique ( ) const
inlineoverridevirtualnoexcept

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 from live_cells::key.


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