Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
FunHashDispatch< SIG > Class Template Reference

#include "lib/fun-hash-dispatch.hpp"

Description

template<class SIG>
class lib::FunHashDispatch< SIG >

Dispatcher-table for state-less functions with a given signature.

Entries are keyed by hashID and can not be changed, once entered.

Definition at line 51 of file fun-hash-dispatch.hpp.

Public Member Functions

SIG * enrol (HashVal key, SIG *fun)
 
bool contains (HashVal key) const
 
SIG * select (HashVal key)
 retrieve entry, which can be invoked directly
 

Private Types

using DispatchTab = std::unordered_map< HashVal, SIG * >
 

Private Attributes

DispatchTab dispatchTab_ {}
 

Additional Inherited Members

- Private Member Functions inherited from MoveOnly
 ~MoveOnly ()=default
 
 MoveOnly ()=default
 
 MoveOnly (MoveOnly &&)=default
 
 MoveOnly (MoveOnly const &)=delete
 
MoveOnlyoperator= (MoveOnly &&)=delete
 
MoveOnlyoperator= (MoveOnly const &)=delete
 

Member Typedef Documentation

◆ DispatchTab

template<class SIG >
using DispatchTab = std::unordered_map<HashVal, SIG*>
private

Definition at line 54 of file fun-hash-dispatch.hpp.

Member Function Documentation

◆ enrol()

template<class SIG >
SIG * enrol ( HashVal  key,
SIG *  fun 
)
inline

Definition at line 59 of file fun-hash-dispatch.hpp.

References _, and FunHashDispatch< SIG >::dispatchTab_.

Referenced by FunHashDispatch_test::run().

+ Here is the caller graph for this function:

◆ contains()

template<class SIG >
bool contains ( HashVal  key) const
inline

Definition at line 66 of file fun-hash-dispatch.hpp.

References util::contains(), and FunHashDispatch< SIG >::dispatchTab_.

Referenced by FunHashDispatch_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ select()

template<class SIG >
SIG * select ( HashVal  key)
inline

retrieve entry, which can be invoked directly

Definition at line 73 of file fun-hash-dispatch.hpp.

References FunHashDispatch< SIG >::dispatchTab_.

Referenced by FunHashDispatch_test::run().

+ Here is the caller graph for this function:

Member Data Documentation

◆ dispatchTab_

template<class SIG >
DispatchTab dispatchTab_ {}
private
+ Inheritance diagram for FunHashDispatch< SIG >:
+ Collaboration diagram for FunHashDispatch< SIG >:

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