OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C > Struct Template Reference

#include <PyOpalObject.h>

Inherits boost::python::default_call_policies.

Collaboration diagram for PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >:

Public Member Functions

 PyOpalObjectSetProperty (AttributeType type, std::string opalName)
 ~PyOpalObjectSetProperty ()
template<class ArgumentPackage>
PyObject * postcall (ArgumentPackage const &args, PyObject *result)

Static Public Member Functions

static void setObject (PyOpalObject< C > *object)

Private Attributes

AttributeType type_m
std::string opalName_m

Static Private Attributes

static PyOpalObject< C > * object_m

Detailed Description

template<class C>
struct PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >

Helper class to handle setting Attributes from python

Definition at line 440 of file PyOpalObject.h.

Constructor & Destructor Documentation

◆ PyOpalObjectSetProperty()

template<class C>
PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::PyOpalObjectSetProperty ( AttributeType type,
std::string opalName )
inline

Constructor

  • type: type of the python object

  • opalName: name of the Opal Attribute

Definition at line 446 of file PyOpalObject.h.

References opalName_m, and type_m.

◆ ~PyOpalObjectSetProperty()

destructor

Definition at line 448 of file PyOpalObject.h.

Member Function Documentation

◆ postcall()

template<class C>
template<class ArgumentPackage>
PyObject * PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::postcall ( ArgumentPackage const & args,
PyObject * result )

postcall action

  • ArgumentPackage: this is really a PyObject* holding the argument calls

  • result: filled by the postcall operation (with PyNone). Sets the element_m to nullptr. Note that the whole element_m stuff is a bit hacky. Probably possible to extract the element from ArgumentPackage, I didn't manage to do it yet.

Definition at line 946 of file PyOpalObject.h.

References object_m, opalName_m, and type_m.

◆ setObject()

template<class C>
void PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::setObject ( PyOpalObject< C > * object)
inlinestatic

Set pointer to the element; should be called before each postcall

Definition at line 461 of file PyOpalObject.h.

References object_m.

Referenced by PyOpal::PyOpalObjectNS::PyOpalObject< C >::dummySet().

Member Data Documentation

◆ object_m

template<class C>
PyOpalObject<C>* PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::object_m
staticprivate

Definition at line 466 of file PyOpalObject.h.

Referenced by postcall(), and setObject().

◆ opalName_m

template<class C>
std::string PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::opalName_m
private

Definition at line 465 of file PyOpalObject.h.

Referenced by postcall(), and PyOpalObjectSetProperty().

◆ type_m

template<class C>
AttributeType PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::type_m
private

Definition at line 464 of file PyOpalObject.h.

Referenced by postcall(), and PyOpalObjectSetProperty().


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