Debian Codegraph @

src/CallbackStruct.h

raw symbols SCIP
1 // This struct manages callbacks into Python. It is stored as the
2 // user data portion of a widget, and the PythonCallback function is
3 // set as the callback. PythonCallback unmarshalls the pointer to
4 // the Python function and Python user data and calls back into
5 // Python.
6 //
7
8 #ifndef CallbackStruct_h
9 #define CallbackStruct_h
10
11 #include <Python.h>
12
13 class CallbackStruct
14 {
15 public:
16 PyObject *func;
17 PyObject *data;
18 PyObject *widget;
19 void *type;
20 PyObject *link;
21 char type_name[64];
22 CallbackStruct( PyObject *theFunc, PyObject *theData, PyObject *theWidget, PyObject *theLink = 0):
23 func(theFunc),
24 data(theData),
25 widget(theWidget)
26 {
27 memset(type_name, 0, 64);
28 }
29 CallbackStruct( PyObject *theFunc, PyObject *theData, void *theType):
30 func(theFunc),
31 data(theData),
32 widget(0),
33 type(theType)
34 {
35 memset(type_name, 0, 64);
36 }
37
38 };
39
40 #endif