Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <Node.h>
Public Member Functions | |
Node () | |
virtual | ~Node ()=default |
virtual T | eval (const Context &, const Arguments &) const =0 |
template<typename... Args> | |
T | eval (const Context &context, Args... args) const |
template<typename... Args> | |
T | eval (Args... args) const |
![]() | |
NodeBase (const std::type_index &type_index) | |
virtual | ~NodeBase ()=default |
virtual std::string | repr () const =0 |
virtual void | visit (Visitor &) const =0 |
const std::type_index & | type () const |
Protected Member Functions | |
T | eval_helper (const Context &context, Arguments &arguments) const |
template<typename A0 , typename... AN> | |
T | eval_helper (const Context &context, Arguments &arguments, A0 v0, AN... an) const |
A node on the computing tree, which has an associated primitive type
|
inline |
|
virtualdefault |
Destructor
|
inline |
Definition at line 138 of file Node.h.
References Pyston::Node< T >::eval().
|
pure virtual |
Evaluate the computing tree
In principle one could avoid to pass any values here, and assign directly the final value to the placeholders that were used to create this tree. However, this would cause the placeholders not to be thread-safe, and a tree would have to be either cloned, either protected by a mutex. Passing the values as an argument allows making the full tree immutable once built, and fully thread safe.
Implemented in Pyston::Constant< T >, Pyston::Placeholder< T >, Pyston::AttrGetter< T >, Pyston::Cast< To, From >, Pyston::Function< R, Args >, and Pyston::PythonCall< T >.
Referenced by Pyston::Node< T >::eval(), and Pyston::Node< T >::eval_helper().
|
inline |
Definition at line 132 of file Node.h.
References Pyston::Node< T >::eval_helper().
|
inlineprotected |
Definition at line 143 of file Node.h.
References Pyston::Node< T >::eval().
Referenced by Pyston::Node< T >::eval(), and Pyston::Node< T >::eval_helper().
|
inlineprotected |
Definition at line 148 of file Node.h.
References Pyston::Node< T >::eval_helper(), and std::vector< T >::push_back().