PDI 1.10.0

the PDI data interface

PDI::Python_ref_wrapper Class Reference

#include <python_ref_wrapper.h>

Public Member Functions

 Python_ref_wrapper (Ref ref)
 Creates python reference wrapper.
pybind11::object getattribute (std::string member_name)
 Gets a member if ref has a record datatype.
void setattribute (std::string member_name, const pybind11::object value)
 Sets a member value if ref has a record datatype.
pybind11::object getitem (size_t index)
 Gets element of the array if ref has a array datatype.

Constructor & Destructor Documentation

◆ Python_ref_wrapper()

PDI::Python_ref_wrapper::Python_ref_wrapper ( Ref ref)

Creates python reference wrapper.

Parameters
refreference to wrap

Member Function Documentation

◆ getattribute()

pybind11::object PDI::Python_ref_wrapper::getattribute ( std::string member_name)

Gets a member if ref has a record datatype.

Parameters
member_namename of the member to get
Returns
Python_ref_wrapper if member has record type inside, numpy array otherwise

◆ setattribute()

void PDI::Python_ref_wrapper::setattribute ( std::string member_name,
const pybind11::object value )

Sets a member value if ref has a record datatype.

Parameters
member_namename of the member to set
valuevalue to set to member

◆ getitem()

pybind11::object PDI::Python_ref_wrapper::getitem ( size_t index)

Gets element of the array if ref has a array datatype.

Parameters
indexindex of element to get
Returns
Python_ref_wrapper if member has record type inside, numpy array otherwise

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