A sum type for callables with arbitrary signature.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/inlet/Function.hpp>
template<typename... FunctionTags>
class axom::inlet::FunctionWrapper< FunctionTags >
A sum type for callables with arbitrary signature.
- Template Parameters
-
FunctionTags | The types of supported functions |
This provides an interface not templated on a specific function signature for uniform retrieval through the Reader interface
◆ FunctionWrapper() [1/3]
template<typename... FunctionTags>
template<typename FuncType >
Primary constructor, initializes a member of the "variant".
- Parameters
-
[in] | func | The function to initialize with |
- Template Parameters
-
FuncType | The function's signature |
- Note
- "Empty" functions are allowable and result in the object comparing false when converted to bool
References axom::inlet::cpp11_compat::make_unique().
◆ FunctionWrapper() [2/3]
template<typename... FunctionTags>
◆ FunctionWrapper() [3/3]
template<typename... FunctionTags>
◆ call()
template<typename... FunctionTags>
template<typename Ret , typename... Args>
Calls the function.
- Parameters
-
[in] | args | The parameter pack for the function's arguments |
- Template Parameters
-
Ret | The user-specified return type, needed to fully disambiguate the function to call |
Args | The types of the user-specified arguments, deduced automatically |
- Returns
- The function's result
References SLIC_ERROR_IF.
◆ get()
template<typename... FunctionTags>
template<typename FuncType >
◆ operator bool()
template<typename... FunctionTags>
Checks whether the function exists.
◆ setName()
template<typename... FunctionTags>
Sets the function's name.
- Note
- Needs to be separate from constructor to allow the compiler to deduce template arguments correctly
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/inlet/Function.hpp