fv::Function< R(ArgTypes...)> Class Template Reference

In order to enable proper provenance tracking, and at the same time keep the ability to embed functions into values, the Function class should be used. More...

`#include <value.hpp>`

Inheritance diagram for fv::Function< R(ArgTypes...)>:
[legend]
Collaboration diagram for fv::Function< R(ArgTypes...)>:
[legend]

## Public Member Functions

| Function (const std::string &name, const std::string &impl, std::function< R(ArgTypes...)> f)
| Function (const std::string &name, std::function< R(ArgTypes...)> f)
R | operator() (ArgTypes ...args)
Public Member Functions inherited from fv::GenFunction
| GenFunction (const std::string &name, const std::string &impl)
std::string & | get_name ()
std::string & | get_impl ()

## Private Attributes

std::function< R(ArgTypes...)> | f

## Additional Inherited Members

Static Public Member Functions inherited from fv::GenFunction
static std::string | format_code (const std::string &code)
| Attempt to invoke clang-format for the purpose of printing out nicely formatted functions to the log file. More...
static std::string | summary ()
template<typename T >
static Function< T > & | register_function (const std::string &name, std::function< T > f, const std::string &impl)
template<typename T >
static Function< T > & | lookup_function (const std::string &name)
Static Public Attributes inherited from fv::GenFunction
static std::map< const std::string, GenFunction * > | function_registry
| Static mapping of functions from their name to the object wrapper of the function.
Static Protected Attributes inherited from fv::GenFunction
static bool | in_register_function =false

## Detailed Description

### template<typename R, typename... ArgTypes>
class fv::Function< R(ArgTypes...)>

In order to enable proper provenance tracking, and at the same time keep the ability to embed functions into values, the Function class should be used.

It is simply a wrapper around a std::function that also has a name. This name is used when generating the name of values that use the function. A function name is automatically prepended with "func::" to explicitly state that the value is the result of a computation encoded within the function object, and not from some other Value object. Unfortunately, it is up to the user to find where that function is defined in the source code to inspect what it is doing. But hopefully this isn't too onerous by just using grep.

Definition at line 240 of file value.hpp.

The documentation for this class was generated from the following file:

- /home/caleb/Sources/TTTT/filval/value.hpp