rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rexlib::typed_program_cache_key< K > Class Template Referencefinal

Default key wrapper for value types that model std::hash and equality comparison. More...

#include <rexlib/core/dispatch/typed_program_cache_key.hpp>

Inheritance diagram for rexlib::typed_program_cache_key< K >:
rexlib::program_cache_key

Public Member Functions

 typed_program_cache_key (K key)
 
std::size_t hash () const noexcept override
 Hash of the wrapped key.
 
bool equals (const program_cache_key &other) const noexcept override
 Equality against another key.
 
const K & get_key () const noexcept
 
- Public Member Functions inherited from rexlib::program_cache_key
 program_cache_key (const program_cache_key &other)=delete
 
 program_cache_key (program_cache_key &&other)=delete
 
program_cache_key & operator= (const program_cache_key &other)=delete
 
program_cache_key & operator= (program_cache_key &&other)=delete
 

Detailed Description

template<typename K>
class rexlib::typed_program_cache_key< K >

Default key wrapper for value types that model std::hash and equality comparison.

Template Parameters
KThe wrapped key type. Must be hashable through std::hash and equality-comparable

Member Function Documentation

◆ equals()

template<typename K >
bool rexlib::typed_program_cache_key< K >::equals ( const program_cache_key &  other) const
overridevirtualnoexcept

Equality against another key.

The cache guarantees that this method is only invoked with keys of the same type. Implementations may rely on that precondition and skip any runtime type check.

Parameters
otherThe key to compare against.
Returns
true Both keys refer to the same entry.
false The keys differ in value.

Implements rexlib::program_cache_key.

◆ hash()

template<typename K >
std::size_t rexlib::typed_program_cache_key< K >::hash ( ) const
overridevirtualnoexcept

Hash of the wrapped key.

Returns
std::size_t The hash value.

Implements rexlib::program_cache_key.


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