AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
Function.hpp File Reference

This file contains the class definition of Inlet's Function class. More...

#include <memory>
#include <functional>
#include <tuple>
#include <type_traits>
#include "fmt/fmt.hpp"
#include "axom/sidre.hpp"
#include "axom/inlet/Field.hpp"
#include "axom/inlet/InletVector.hpp"
#include "axom/inlet/Verifiable.hpp"
#include "axom/inlet/inlet_utils.hpp"

Classes

struct  axom::inlet::FunctionType
 The types used to describe function signatures in the input file. More...
 
class  axom::inlet::detail::inlet_function_arg_type< Arg >
 A type trait for modifying function argument types to enforce const correctness and to avoid copies. More...
 
class  axom::inlet::detail::cleanup_function_signature< typename >
 Takes a Ret(Args...) signature and applies cvref qualifiers to applicable arguments. More...
 
struct  axom::inlet::detail::cleanup_function_signature< Ret(Args...)>
 
struct  axom::inlet::detail::TypeList< Ts >
 A lightweight type used to store a list of types. More...
 
struct  axom::inlet::detail::Concat< TypeLists >
 Helper structure used to concatenate parameter packs (lists) of TypeLists. More...
 
struct  axom::inlet::detail::Concat<>
 
struct  axom::inlet::detail::Concat< TypeList< Types... > >
 
struct  axom::inlet::detail::Concat< TypeList< First... >, TypeList< Second... > >
 
struct  axom::inlet::detail::Concat< TypeList< First... >, TypeList< Second... >, Tail... >
 
struct  axom::inlet::detail::list_prepend< T, Ts >
 Adds a single type to a single TypeList via prepending. More...
 
struct  axom::inlet::detail::list_prepend< T, TypeList< Ts... > >
 
struct  axom::inlet::detail::multi_list_prepend< T, Ts >
 Adds a single type to a parameter pack of TypeLists. More...
 
struct  axom::inlet::detail::permutation_helper< N >
 Recursive helper struct for enumerating permutations of a list of types. More...
 
struct  axom::inlet::detail::permutation_helper< 0u >
 
struct  axom::inlet::detail::list_to_inlet_signature< Ts >
 Converts a list into a function signature. More...
 
struct  axom::inlet::detail::list_to_inlet_signature< TypeList< Ret, Args... > >
 
class  axom::inlet::FunctionWrapper< FunctionTags >
 A sum type for callables with arbitrary signature. More...
 
struct  axom::inlet::detail::lists_to_wrapper< TypeLists >
 "Unwraps" a list of lists, converts the inner lists to function signatures, and defines a FunctionWrapper templated on those signatures More...
 
struct  axom::inlet::detail::lists_to_wrapper< TypeList< TypeLists... > >
 
struct  axom::inlet::detail::arg_lists< N, Ts >
 Generates the permutations of a parameter pack up to a certain length, including all shorter permutations. More...
 
struct  axom::inlet::detail::arg_lists< 0u, Ts... >
 
class  axom::inlet::Function
 

Namespaces

 axom
 
 axom::inlet
 
 axom::inlet::detail
 

Typedefs

template<std::size_t N, typename... Ts>
using axom::inlet::detail::type_permutations = decltype(permutation_helper< N - 1 >::get(std::declval< TypeList< Ts... > >(), std::declval< TypeList< TypeList< Ts >... > >()))
 Entry point for retrieving a permutation of types. More...
 
using axom::inlet::detail::ret_list = TypeList< FunctionType::Void, FunctionType::Vector, FunctionType::Double, FunctionType::String >
 
using axom::inlet::detail::arg_permutations = arg_lists< MAX_NUM_ARGS, FunctionType::Vector, FunctionType::Double, FunctionType::String >::type
 
using axom::inlet::detail::arg_permutations_with_returns = decltype(permutation_helper< 1u >::get(ret_list {}, std::declval< arg_permutations >()))
 
using axom::inlet::detail::no_arguments_with_returns = decltype(permutation_helper< 1u >::get(ret_list {}, TypeList< TypeList<> >()))
 
using axom::inlet::detail::func_signature_lists = decltype(type_list_cat(std::declval< arg_permutations_with_returns >(), std::declval< no_arguments_with_returns >()))
 
using axom::inlet::detail::BasicFunctionWrapper = lists_to_wrapper< func_signature_lists >::type
 
using axom::inlet::FunctionVariant = detail::BasicFunctionWrapper
 

Enumerations

enum  axom::inlet::FunctionTag { axom::inlet::FunctionTag::Vector, axom::inlet::FunctionTag::Double, axom::inlet::FunctionTag::Void, axom::inlet::FunctionTag::String }
 The tags used to describe function signatures in the input file. More...
 

Functions

template<typename... TypeLists>
Concat< TypeLists... >::type axom::inlet::detail::type_list_cat (TypeLists &&...)
 Implements concatenation functionality similar to std::tuple_cat. More...
 

Variables

static constexpr std::size_t axom::inlet::detail::MAX_NUM_ARGS = 2u
 The maximum number of user-specified arguments to a function. More...
 

Detailed Description

This file contains the class definition of Inlet's Function class.