AIToolbox
A library that offers tools for AI problem solving.
AIToolbox::Impl Namespace Reference

Namespaces

 POMDP
 

Classes

struct  GetFunctionArguments
 This struct helps decompose a function into return value and arguments. More...
 
struct  GetFunctionArguments< R(*)(Args...)>
 
struct  GetFunctionArguments< R(C::*)(Args...) const >
 
struct  GetFunctionArguments< R(C::*)(Args...)>
 
struct  IdPack
 This class is simply a template container for ids. More...
 
struct  is_compatible_f
 This struct reports whether a given function is compatible with a given signature. More...
 
struct  is_compatible_f< R(Args...), R2(Args2...)>
 
struct  is_compatible_f< R(C::*)(Args...) const, R2(Args2...)>
 
struct  is_compatible_f< R(C::*)(Args...), R2(Args2...)>
 
struct  Matcher
 This struct allows to match between two tuples types. More...
 
struct  Matcher< N, std::tuple< F, A... >, std::tuple< F, B... >, IDs... >
 
struct  Matcher< N, std::tuple< FA, A... >, std::tuple< FB, B... >, IDs... >
 
struct  Matcher< N, std::tuple<>, std::tuple< B... >, IDs... >
 

Variables

char logBuffer [500] = {0}
 

Function Documentation

◆ caller() [1/2]

template<typename C , typename F , typename... Args, size_t... IDs>
void AIToolbox::Impl::caller ( C &  c,
f,
std::tuple< Args... > &&  args,
IdPack< IDs... >   
)

◆ caller() [2/2]

template<typename F , typename... Args, size_t... IDs>
void AIToolbox::Impl::caller ( f,
std::tuple< Args... > &&  args,
IdPack< IDs... >   
)

This function calls the input function with the subset of correct parameters from the input tuple.

The nameless IdPack parameter contains the indeces of the arguments to pass to the function.

Parameters
fThe function to call.
argsAll arguments.

◆ callFunction() [1/2]

template<typename C , typename F , typename... Args>
void AIToolbox::Impl::callFunction ( C &  c,
f,
Args &&...  args 
)

This function calls the input member function with the specified arguments.

If the function only accepts a subset of the input arguments, only the correct ones are passed through. We do require that the arguments are in the same order (we don't find permutations of the arguments which might match).

Parameters
cThe object to call the member function on.
fThe member function to call.
...argsThe arguments to pass.

◆ callFunction() [2/2]

template<typename F , typename... Args>
void AIToolbox::Impl::callFunction ( f,
Args &&...  args 
)

This function calls the input function with the specified arguments.

If the function only accepts a subset of the input arguments, only the correct ones are passed through. We do require that the arguments are in the same order (we don't find permutations of the arguments which might match).

Parameters
fThe function to call.
...argsThe arguments to pass.

Variable Documentation

◆ logBuffer

char AIToolbox::Impl::logBuffer[500] = {0}
inline