Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
Pyston::Placeholder< AttributeSet > Class Reference

#include <AttributeSet.h>

Collaboration diagram for Pyston::Placeholder< AttributeSet >:
Collaboration graph
[legend]

Classes

struct  AttrGetterFactory
 

Public Member Functions

 Placeholder (const unsigned pos, const AttributeSet &attrs)
 
boost::python::object get (const std::string &name) const
 

Private Attributes

unsigned m_pos
 
AttributeSet m_attrs
 

Detailed Description

Specialization of Placeholder for object-like variables. Note that, unlike other placeholders, this is used only during the evaluation. The final tree uses AttrGetter instances

Definition at line 85 of file AttributeSet.h.

Constructor & Destructor Documentation

◆ Placeholder()

Pyston::Placeholder< AttributeSet >::Placeholder ( const unsigned  pos,
const AttributeSet attrs 
)
inline

Constructor

Parameters
nameName of the Placeholder. It will be used to retrieve later the value assigned to it.
attrsAcceptable attribute names, with an instance of the acceptable type

Definition at line 94 of file AttributeSet.h.

Member Function Documentation

◆ get()

boost::python::object Pyston::Placeholder< AttributeSet >::get ( const std::string name) const
inline

Unfortunately we have to return directly a python object wrapping the appropiate AttrGetter

Parameters
nameParameter name
Exceptions
UnrecoverableErrorIf the name is not a known parameter. Fallback to Python interpretation will not help.

It uses a boost visitor to generate the right AttrGetter depending on the value stored on the prototype object passed to the constructor

Definition at line 107 of file AttributeSet.h.

References Pyston::Placeholder< T >::m_pos.

Member Data Documentation

◆ m_attrs

Definition at line 115 of file AttributeSet.h.

◆ m_pos

unsigned Pyston::Placeholder< AttributeSet >::m_pos
private

Definition at line 114 of file AttributeSet.h.


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