AIToolbox
A library that offers tools for AI problem solving.
|
Go to the source code of this file.
Namespaces | |
AIToolbox | |
AIToolbox::Impl | |
Functions | |
Function Matcher | |
In this file we implement some metaprogramming goodies to improve the interface of some things. In particular, here we implement a way to call a function which has a subset of the arguments that we actually want to pass (provided they are in the correct order). For example, say we want to call: f(10, 0.5, 'c') But we are passed a function void f(char); Then we would like to simply call f('c'); This is useful since it allows the user to implement callbacks with only the parameters they care about, shortening interfaces a bit. | |
template<typename F , typename... Args, size_t... IDs> | |
void | AIToolbox::Impl::caller (F f, std::tuple< Args... > &&args, IdPack< IDs... >) |
This function calls the input function with the subset of correct parameters from the input tuple. More... | |
template<typename C , typename F , typename... Args, size_t... IDs> | |
void | AIToolbox::Impl::caller (C &c, F f, std::tuple< Args... > &&args, IdPack< IDs... >) |
template<typename F , typename... Args> | |
void | AIToolbox::Impl::callFunction (F f, Args &&...args) |
This function calls the input function with the specified arguments. More... | |
template<typename C , typename F , typename... Args> | |
void | AIToolbox::Impl::callFunction (C &c, F f, Args &&...args) |
This function calls the input member function with the specified arguments. More... | |
Function Matcher | |
In this file we implement some metaprogramming goodies to improve the interface of some things. In particular, here we implement a way to call a function which has a subset of the arguments that we actually want to pass (provided they are in the correct order). For example, say we want to call: f(10, 0.5, 'c') But we are passed a function void f(char); Then we would like to simply call f('c'); This is useful since it allows the user to implement callbacks with only the parameters they care about, shortening interfaces a bit. | |
template<typename F , typename... Args, size_t... IDs> | |
void | AIToolbox::Impl::caller (F f, std::tuple< Args... > &&args, IdPack< IDs... >) |
This function calls the input function with the subset of correct parameters from the input tuple. More... | |
template<typename C , typename F , typename... Args, size_t... IDs> | |
void | AIToolbox::Impl::caller (C &c, F f, std::tuple< Args... > &&args, IdPack< IDs... >) |
template<typename F , typename... Args> | |
void | AIToolbox::Impl::callFunction (F f, Args &&...args) |
This function calls the input function with the specified arguments. More... | |
template<typename C , typename F , typename... Args> | |
void | AIToolbox::Impl::callFunction (C &c, F f, Args &&...args) |
This function calls the input member function with the specified arguments. More... | |