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

#include <PyOpalObject.h>

Inherits boost::python::default_call_policies.

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

Public Member Functions

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

Static Public Member Functions

static void setObject (const PyOpalObject< C > *object)

Private Attributes

AttributeType type_m
std::string opalName_m

Static Private Attributes

static const PyOpalObject< C > * object_m

Detailed Description

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

Helper class to handle getting Attributes from python

Definition at line 409 of file PyOpalObject.h.

Constructor & Destructor Documentation

◆ PyOpalObjectGetProperty()

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

Constructor

  • type: type of the python object

  • opalName: name of the Opal Attribute

Definition at line 415 of file PyOpalObject.h.

References opalName_m, and type_m.

◆ ~PyOpalObjectGetProperty()

destructor

Definition at line 417 of file PyOpalObject.h.

Member Function Documentation

◆ postcall()

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

postcall action

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

  • result: filled by the postcall operation. 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 933 of file PyOpalObject.h.

References object_m, opalName_m, and type_m.

◆ setObject()

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

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

Definition at line 430 of file PyOpalObject.h.

References object_m.

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

Member Data Documentation

◆ object_m

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

Definition at line 435 of file PyOpalObject.h.

Referenced by postcall(), and setObject().

◆ opalName_m

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

Definition at line 434 of file PyOpalObject.h.

Referenced by postcall(), and PyOpalObjectGetProperty().

◆ type_m

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

Definition at line 433 of file PyOpalObject.h.

Referenced by postcall(), and PyOpalObjectGetProperty().


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