Vcsn
2.2
Be Rational
|
#include <registry.hh>
Public Member Functions | |
Registry (const std::string &name) | |
Create a register for an algorithm. More... | |
Registry ()=delete | |
bool | set (const signature &sig, Fun *fn) |
Register function fn for signature sig. More... | |
const Fun * | get0 (const signature &sig) |
Get function for signature sig. More... | |
std::string | signatures (const signature &sig) const |
A message about a failed signature compilation. More... | |
const Fun * | get (const signature &sig) |
Get function for signature sig. More... | |
template<typename... Args> | |
auto | call (const signature &sig, Args &&...args) -> decltype(std::declval< Fun >()(args...)) |
Call function for signature sig. More... | |
template<typename... Args> | |
auto | call (Args &&...args) -> decltype(std::declval< Fun >()(args...)) |
Public Attributes | |
bool | debug = getenv("VCSN_DYN") |
Whether log messages should be issued. More... | |
Private Types | |
using | map_t = std::unordered_map< signature, Fun * > |
Signature -> pointer to implementation. More... | |
Private Attributes | |
std::string | name_ |
Function name (e.g., "determinize"). More... | |
map_t | map_ |
Definition at line 21 of file registry.hh.
|
private |
Signature -> pointer to implementation.
Definition at line 127 of file registry.hh.
|
inline |
Create a register for an algorithm.
name | the name of the algo. |
Definition at line 26 of file registry.hh.
|
delete |
|
inline |
Call function for signature sig.
make_context needs this signature.
Definition at line 108 of file registry.hh.
Referenced by vcsn::dyn::detail::Registry< Fun >::call().
|
inline |
Definition at line 116 of file registry.hh.
References vcsn::dyn::detail::Registry< Fun >::call(), and vcsn::vsignature().
|
inline |
Get function for signature sig.
Definition at line 75 of file registry.hh.
References vcsn::dyn::jit_error::assertions, vcsn::dyn::compile(), vcsn::dyn::detail::Registry< Fun >::get0(), vcsn::dyn::detail::Registry< Fun >::name_, vcsn::dyn::detail::Registry< Fun >::signatures(), and VCSN_REQUIRE.
|
inline |
Get function for signature sig.
Definition at line 45 of file registry.hh.
References vcsn::dyn::detail::Registry< Fun >::map_, and vcsn::dyn::detail::Registry< Fun >::name_.
Referenced by vcsn::dyn::detail::Registry< Fun >::get().
|
inline |
Register function fn for signature sig.
Definition at line 36 of file registry.hh.
References vcsn::dyn::detail::Registry< Fun >::map_, and vcsn::dyn::detail::Registry< Fun >::name_.
|
inline |
A message about a failed signature compilation.
Definition at line 57 of file registry.hh.
References vcsn::dyn::detail::Registry< Fun >::map_, vcsn::sort(), and vcsn::signature::to_string().
Referenced by vcsn::dyn::detail::Registry< Fun >::get().
bool vcsn::dyn::detail::Registry< Fun >::debug = getenv("VCSN_DYN") |
Whether log messages should be issued.
Definition at line 33 of file registry.hh.
|
private |
Definition at line 128 of file registry.hh.
Referenced by vcsn::dyn::detail::Registry< Fun >::get0(), vcsn::dyn::detail::Registry< Fun >::set(), and vcsn::dyn::detail::Registry< Fun >::signatures().
|
private |
Function name (e.g., "determinize").
Definition at line 125 of file registry.hh.
Referenced by vcsn::dyn::detail::Registry< Fun >::get(), vcsn::dyn::detail::Registry< Fun >::get0(), and vcsn::dyn::detail::Registry< Fun >::set().