Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <Function.h>
Public Member Functions | |
FunctionFactory (const std::string &repr, std::function< R(const Context &, Args...)> functor) | |
std::shared_ptr< Node< R > > | operator() (const std::shared_ptr< Node< Args > > &... nodes) const |
Protected Attributes | |
std::string | m_repr |
std::function< R(const Context &, Args...)> | m_functor |
Specialization for functions that receive a context
R | Type corresponding to the created new Node |
T | Type corresponding to the received Node |
Definition at line 91 of file Function.h.
|
inline |
Constructor
functor | The functor that will be passed down to the created UnaryOperator nodes |
repr | Human readable representation of the operator |
Definition at line 100 of file Function.h.
|
inline |
Callable that creates the Node
This is what gets called from Python when an operator is used. For instance -a
will trigger a call factory(a)
. Unlike the BinaryOperatorFactory, this will not be called is a is not of type Node, since there would be no reason to!
Definition at line 110 of file Function.h.
References std::make_shared().
|
protected |
Definition at line 116 of file Function.h.
|
protected |
Definition at line 115 of file Function.h.