HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PY_Callback Class Reference

#include <PY_Callback.h>

+ Inheritance diagram for PY_Callback:

Public Types

using ArgHandler = UT_Function< void(PY_PyObject *args, PY_PyObject *kwargs)>
 

Public Member Functions

 PY_Callback () noexcept
 
 PY_Callback (std::nullptr_t n) noexcept
 
 PY_Callback (void *python_callable_object, bool new_ref=false) noexcept
 
void call (PY_Result &result, const char *args_expression=NULL, const char *kwargs_expression=NULL) const
 
PY_Result call (const char *args_expression=NULL, const char *kwargs_expression=NULL) const
 
PY_Result call (const char *args_expression, const char *kwargs_expression, PY_Result::Type desired_result_type) const
 
PY_Result call (const char *args_expression, const char *kwargs_expression, const char *module_name, PY_Result::Type desired_result_type, PY_OpaqueObject &out_args, PY_OpaqueObject &out_kwargs, ArgHandler arg_handler) const
 
PY_Result evaluateArgs (const char *args_expression, const char *kwargs_expression, const char *module_name, PY_OpaqueObject &out_args, PY_OpaqueObject &out_kwargs, ArgHandler arg_handler) const
 
void setExpressionCache (PY_CallbackCompiledCodeCache *c)
 
 PY_Callback (const PY_Callback &callback) noexcept
 
PY_Callbackoperator= (const PY_Callback &callback) noexcept
 
 PY_Callback (PY_Callback &&callback) noexcept
 
PY_Callbackoperator= (PY_Callback &&callback) noexcept
 
- Public Member Functions inherited from PY_OpaqueObject
 PY_OpaqueObject () noexcept
 
 PY_OpaqueObject (std::nullptr_t) noexcept
 
 PY_OpaqueObject (void *opaque_py_object, bool new_ref=false) noexcept
 
 ~PY_OpaqueObject ()
 
void reset () noexcept
 Releases ownership and sets to nullptr. More...
 
void reset (void *opaque_py_object, bool new_ref) noexcept
 
void resetToNone ()
 Set to the Py_None() More...
 
voidopaqueObject () const noexcept
 
voidreleaseOpaqueObject () noexcept
 Releases ownership of the managed object as a void *, and resets. More...
 
PY_PyObjectpyObject () const noexcept
 
PY_PyObjectreleasePyObject () noexcept
 
 operator bool () const noexcept
 Return true if *this owns an object (ie. != nullptr) More...
 
 PY_OpaqueObject (const PY_OpaqueObject &opaque_object) noexcept
 
PY_OpaqueObjectoperator= (const PY_OpaqueObject &opaque_object) noexcept
 
 PY_OpaqueObject (PY_OpaqueObject &&opaque_object) noexcept
 
PY_OpaqueObjectoperator= (PY_OpaqueObject &&opaque_object) noexcept
 
PY_OpaqueObjectoperator= (std::nullptr_t) noexcept
 
bool operator== (const PY_OpaqueObject &opaque_object) const noexcept
 
bool operator!= (const PY_OpaqueObject &opaque_object) const noexcept
 
bool equalsOpaqueObject (void *opaque_py_object) const noexcept
 

Static Public Member Functions

static void setHOM (PY_CallbackHOM *hom)
 
static PY_CallbackHOMgetHOM ()
 

Detailed Description

Definition at line 72 of file PY_Callback.h.

Member Typedef Documentation

Definition at line 75 of file PY_Callback.h.

Constructor & Destructor Documentation

PY_Callback::PY_Callback ( )
inlinenoexcept

Definition at line 77 of file PY_Callback.h.

PY_Callback::PY_Callback ( std::nullptr_t  n)
inlinenoexcept

Definition at line 79 of file PY_Callback.h.

PY_Callback::PY_Callback ( void python_callable_object,
bool  new_ref = false 
)
inlineexplicitnoexcept

Definition at line 85 of file PY_Callback.h.

PY_Callback::PY_Callback ( const PY_Callback callback)
inlinenoexcept

Copy construct/assign

Definition at line 92 of file PY_Callback.h.

PY_Callback::PY_Callback ( PY_Callback &&  callback)
inlinenoexcept

Move construct/assign

Definition at line 102 of file PY_Callback.h.

Member Function Documentation

void PY_Callback::call ( PY_Result result,
const char *  args_expression = NULL,
const char *  kwargs_expression = NULL 
) const
PY_Result PY_Callback::call ( const char *  args_expression = NULL,
const char *  kwargs_expression = NULL 
) const
inline

Definition at line 125 of file PY_Callback.h.

PY_Result PY_Callback::call ( const char *  args_expression,
const char *  kwargs_expression,
PY_Result::Type  desired_result_type 
) const
PY_Result PY_Callback::call ( const char *  args_expression,
const char *  kwargs_expression,
const char *  module_name,
PY_Result::Type  desired_result_type,
PY_OpaqueObject out_args,
PY_OpaqueObject out_kwargs,
ArgHandler  arg_handler 
) const
inline

Definition at line 144 of file PY_Callback.h.

PY_Result PY_Callback::evaluateArgs ( const char *  args_expression,
const char *  kwargs_expression,
const char *  module_name,
PY_OpaqueObject out_args,
PY_OpaqueObject out_kwargs,
ArgHandler  arg_handler 
) const
inline

Definition at line 168 of file PY_Callback.h.

static PY_CallbackHOM* PY_Callback::getHOM ( )
inlinestatic

Definition at line 196 of file PY_Callback.h.

PY_Callback& PY_Callback::operator= ( const PY_Callback callback)
inlinenoexcept

Copy construct/assign

Definition at line 96 of file PY_Callback.h.

PY_Callback& PY_Callback::operator= ( PY_Callback &&  callback)
inlinenoexcept

Move construct/assign

Definition at line 107 of file PY_Callback.h.

void PY_Callback::setExpressionCache ( PY_CallbackCompiledCodeCache c)
inline

Definition at line 190 of file PY_Callback.h.

static void PY_Callback::setHOM ( PY_CallbackHOM hom)
inlinestatic

Definition at line 193 of file PY_Callback.h.


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