Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <AttributeSet.h>
Public Member Functions | |
AttrGetter (const unsigned pos, const std::string &name) | |
std::string | repr () const override |
void | visit (Visitor &visitor) const override |
T | eval (const Context &, const Arguments &arguments) const override |
![]() | |
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 | |
unsigned | m_pos |
std::string | m_name |
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 |
A node that retrieves the value from a dictionary
Definition at line 34 of file AttributeSet.h.
|
inline |
Constructor
pos | Position of the Placeholder. It will be used to retrieve later the value assigned to it. |
name | The name of the attribute |
Definition at line 43 of file AttributeSet.h.
|
inlineoverridevirtual |
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.
std::out_of_range | if the key is missing |
Implements Pyston::Node< T >.
Definition at line 65 of file AttributeSet.h.
References Pyston::AttrGetter< T >::m_name, and Pyston::AttrGetter< T >::m_pos.
|
inlineoverridevirtual |
Implements Pyston::NodeBase.
Definition at line 48 of file AttributeSet.h.
References Pyston::AttrGetter< T >::m_name, Pyston::AttrGetter< T >::m_pos, and std::to_string().
|
inlineoverridevirtual |
Entry point for the visitor
Implements Pyston::NodeBase.
Definition at line 55 of file AttributeSet.h.
References Pyston::Visitor::enter(), and Pyston::Visitor::exit().
|
private |
Definition at line 76 of file AttributeSet.h.
Referenced by Pyston::AttrGetter< T >::eval(), and Pyston::AttrGetter< T >::repr().
|
private |
Definition at line 75 of file AttributeSet.h.
Referenced by Pyston::AttrGetter< T >::eval(), and Pyston::AttrGetter< T >::repr().