OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C > Struct Template Reference

#include <PyOpalObject.h>

Inherits default_call_policies.

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 = nullptr
 

Detailed Description

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

Helper class to handle setting Attributes from python

Definition at line 71 of file PyOpalObject.h.

Constructor & Destructor Documentation

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.

destructor

Definition at line 448 of file PyOpalObject.h.

Member Function Documentation

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.

template<class C>
static 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 PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::object_m.

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

Member Data Documentation

template<class C>
PyOpalObject< C > * PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::object_m = nullptr
staticprivate
template<class C>
std::string PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::opalName_m
private

Definition at line 465 of file PyOpalObject.h.

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

Definition at line 464 of file PyOpalObject.h.


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