Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <Constant.h>
Public Member Functions | |
Constant (T value) | |
std::string | repr () const final |
T | eval (const Context &, const Arguments &) const final |
void | visit (Visitor &visitor) const final |
![]() | |
Node () | |
virtual | ~Node ()=default |
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 |
const std::type_index & | type () const |
Private Attributes | |
T | m_value |
Additional Inherited Members | |
![]() | |
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 |
Node that just wraps a constant
T | The type of the constant |
Definition at line 32 of file Constant.h.
|
inlineexplicit |
|
inlinefinalvirtual |
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.
Implements Pyston::Node< T >.
Definition at line 53 of file Constant.h.
References Pyston::Constant< T >::m_value.
|
inlinefinalvirtual |
Implements Pyston::NodeBase.
Definition at line 44 of file Constant.h.
References Pyston::Constant< T >::m_value, and std::to_string().
|
inlinefinalvirtual |
|
private |
Definition at line 66 of file Constant.h.
Referenced by Pyston::Constant< T >::eval(), and Pyston::Constant< T >::repr().