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::PyElementNS::PyElementGetProperty< C > Struct Template Reference

#include <PyElement.h>

Inherits boost::python::default_call_policies.

Public Member Functions

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

Static Public Member Functions

static void setElement (const PyElement< C > *element)
 

Private Attributes

AttributeType type_m
 
std::string opalName_m
 

Static Private Attributes

static const PyElement< C > * element_m = NULL
 

Detailed Description

template<class C>
struct PyOpal::PyElementNS::PyElementGetProperty< C >

Helper class to handle getting Attributes from python

Definition at line 204 of file PyElement.h.

Constructor & Destructor Documentation

◆ PyElementGetProperty()

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

Constructor

  • type: type of the python object
  • opalName: name of the Opal Attribute

Definition at line 210 of file PyElement.h.

◆ ~PyElementGetProperty()

destructor

Definition at line 212 of file PyElement.h.

Member Function Documentation

◆ postcall()

template<class C >
template<class ArgumentPackage >
PyObject * PyOpal::PyElementNS::PyElementGetProperty< 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 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 424 of file PyElement.h.

References PyOpal::PyElementNS::DOUBLE.

◆ setElement()

template<class C >
static void PyOpal::PyElementNS::PyElementGetProperty< C >::setElement ( const PyElement< C > *  element)
inlinestatic

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

Definition at line 225 of file PyElement.h.

References PyOpal::PyElementNS::PyElementGetProperty< C >::element_m.

Referenced by PyOpal::PyElementNS::PyElement< C >::dummyGet().

Member Data Documentation

◆ element_m

template<class C >
const PyElement< C > * PyOpal::PyElementNS::PyElementGetProperty< C >::element_m = NULL
staticprivate

◆ opalName_m

template<class C >
std::string PyOpal::PyElementNS::PyElementGetProperty< C >::opalName_m
private

Definition at line 229 of file PyElement.h.

◆ type_m

template<class C >
AttributeType PyOpal::PyElementNS::PyElementGetProperty< C >::type_m
private

Definition at line 228 of file PyElement.h.


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