1 |
#include "circus/Module.h" |
#include "circus/Module.h" |
2 |
|
|
3 |
|
Module::Module(char *s){ |
4 |
|
// fire up Pytho and import module |
5 |
|
|
6 |
|
Py_Initialize(); |
7 |
|
this->pModule = PyImport_Import(PyString_FromString(s)); |
8 |
|
|
9 |
|
} |
10 |
|
|
11 |
|
int Module::load(){ |
12 |
|
// call module._load() method |
13 |
|
PyObject *pDict, *pFunc; |
14 |
|
pDict = PyModule_GetDict(this->pModule); |
15 |
|
|
16 |
|
return 0; |
17 |
|
} |
18 |
|
|
19 |
|
int Module::unload(){ |
20 |
|
// import module and call its _unload() method |
21 |
|
return 0; |
22 |
|
} |
23 |
|
|
24 |
|
int Module::registerEvents(){ |
25 |
|
// loop through my_events and regsiter each with Ringmaster |
26 |
|
return 0; |
27 |
|
} |
28 |
|
|
29 |
bool Module::operator==(const Module &right) const{ |
bool Module::operator==(const Module &right) const{ |
30 |
// not sure what to compare yet.... |
// not sure what to compare yet.... |
31 |
return true; |
return true; |