Alexandria  2.27.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Pyston::FunctionFactory< R(Args...)> Class Template Reference

#include <Function.h>

Collaboration diagram for Pyston::FunctionFactory< R(Args...)>:
Collaboration graph
[legend]

Public Member Functions

 m_functor (functor)
 
std::shared_ptr< Node< R > > operator() (const std::shared_ptr< Node< Args >> &...nodes) const
 

Public Attributes

 __pad0__: m_repr(repr)
 

Protected Attributes

std::string m_repr
 
std::function< R(const Context
&, Args...)> 
m_functor
 

Detailed Description

template<typename R, typename... Args>
class Pyston::FunctionFactory< R(Args...)>

Specialization for functions that receive a context

Template Parameters
RType corresponding to the created new Node
TType corresponding to the received Node

Definition at line 91 of file Function.h.

Member Function Documentation

template<typename R , typename... Args>
Pyston::FunctionFactory< R(Args...)>::m_functor ( functor  )
inline

Definition at line 101 of file Function.h.

template<typename R , typename... Args>
std::shared_ptr<Node<R> > Pyston::FunctionFactory< R(Args...)>::operator() ( const std::shared_ptr< Node< Args >> &...  nodes) const
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().

Here is the call graph for this function:

Member Data Documentation

template<typename R , typename... Args>
Pyston::FunctionFactory< R(Args...)>::__pad0__

Constructor

Parameters
functorThe functor that will be passed down to the created UnaryOperator nodes
reprHuman readable representation of the operator

Definition at line 101 of file Function.h.

template<typename R , typename... Args>
std::function<R(const Context&, Args...)> Pyston::FunctionFactory< R(Args...)>::m_functor
protected

Definition at line 116 of file Function.h.

template<typename R , typename... Args>
std::string Pyston::FunctionFactory< R(Args...)>::m_repr
protected

Definition at line 115 of file Function.h.


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