20#ifndef _SOURCE_LANGS_PY_TFEVENTPYEXECUTOR_H_
21#define _SOURCE_LANGS_PY_TFEVENTPYEXECUTOR_H_
32 template<
typename event_t>
43 PyObject *result = PyObject_CallObject(executorPyCallable, NULL);
46 PyObject *err = PyErr_Occurred();
91 executorPyCallable = callable;
102 executorPyCallable = callable;
112 executorPyCallable = NULL;
118 event_t *activeEvent = NULL;
121 PyObject *executorPyCallable = NULL;
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
Definition tfEventPyExecutor.h:33
bool hasExecutorPyCallable()
Tests whether the executor callback from the python layer has been set.
Definition tfEventPyExecutor.h:82
HRESULT invoke(event_t &ke)
Issues call to execute event callback in python layer on new event.
Definition tfEventPyExecutor.h:61
void maybeSetExecutorPyCallable(PyObject *callable)
Sets the executor callback from the python layer if it has not yet been set.
Definition tfEventPyExecutor.h:100
HRESULT invoke()
Issues call to execute event callback in python layer on existing event.
Definition tfEventPyExecutor.h:40
void setExecutorPyCallable(PyObject *callable)
Sets the executor callback from the python layer.
Definition tfEventPyExecutor.h:89
event_t * getEvent()
Gets the current event object.
Definition tfEventPyExecutor.h:72
void resetExecutorPyCallable()
Resets the executor callback from the python layer.
Definition tfEventPyExecutor.h:110
int32_t HRESULT
Definition tf_port.h:255