OPAL (Object Oriented Parallel Accelerator Library) 2022.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 boost::python::default_call_policies, and boost::python::default_call_policies.

Public Member Functions

 PyOpalObjectSetProperty (AttributeType type, std::string opalName)
 
 ~PyOpalObjectSetProperty ()
 
template<class ArgumentPackage >
PyObject * postcall (ArgumentPackage const &args, PyObject *result)
 
 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)
 
static void setObject (PyOpalObject< C > *object)
 

Private Attributes

AttributeType type_m
 
std::string opalName_m
 

Static Private Attributes

static PyOpalObject< C > * object_m = NULL
 

Detailed Description

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

Helper class to handle setting Attributes from python

Definition at line 326 of file PyOpalObject.h.

Constructor & Destructor Documentation

◆ PyOpalObjectSetProperty() [1/2]

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 269 of file PyOpalObject.h.

◆ ~PyOpalObjectSetProperty() [1/2]

destructor

Definition at line 271 of file PyOpalObject.h.

◆ PyOpalObjectSetProperty() [2/2]

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 332 of file PyOpalObject.h.

◆ ~PyOpalObjectSetProperty() [2/2]

destructor

Definition at line 334 of file PyOpalObject.h.

Member Function Documentation

◆ postcall() [1/2]

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 NULL. 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 533 of file PyOpalObject.h.

◆ postcall() [2/2]

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 NULL. 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.

◆ setObject() [1/2]

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 284 of file PyOpalObject.h.

References PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::object_m.

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

◆ setObject() [2/2]

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 347 of file PyOpalObject.h.

References PyOpal::PyOpalObjectNS::PyOpalObjectSetProperty< C >::object_m.

Member Data Documentation

◆ object_m

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

◆ opalName_m

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

Definition at line 288 of file PyOpalObject.h.

◆ type_m

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

Definition at line 287 of file PyOpalObject.h.


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