25 typedef _object PyObject;
52 void setup(
const std::string& filename,
const std::vector<std::string>& args);
54 bool canConvert(PyObject* obj,
const std::string& to);
55 Manta::PbClass* objFromPy(PyObject* obj);
56 Manta::PbClass* createPy(
const std::string& classname,
const std::string& name, Manta::PbArgs& args, Manta::PbClass* parent);
57 void setReference(Manta::PbClass* cls, PyObject* obj);
58 PyObject* copyObject(Manta::PbClass* cls,
const std::string& classname);
59 void MantaEnsureRegistration();
63 PyMODINIT_FUNC PyInit_Main(
void);
68 typedef void (*InitFunc)(PyObject*);
69 typedef PyObject* (*GenericFunction)(PyObject*
self, PyObject* args, PyObject* kwds);
70 typedef PyObject* (*OperatorFunction)(PyObject*
self, PyObject* o);
71 typedef int (*Constructor)(PyObject*
self, PyObject* args, PyObject* kwds);
72 typedef PyObject* (*Getter)(PyObject*
self,
void* closure);
73 typedef int (*Setter)(PyObject*
self, PyObject* value,
void* closure);
78 Register(
const std::string& className,
const std::string& funcName, GenericFunction func);
80 Register(
const std::string& className,
const std::string& funcName, OperatorFunction func);
82 Register(
const std::string& className,
const std::string& funcName, Constructor func);
84 Register(
const std::string& className,
const std::string& property, Getter getter, Setter setter);
86 Register(
const std::string& className,
const std::string& pyName,
const std::string& baseClass);
88 Register(
const std::string& file,
const std::string& pythonCode);
93 #define KEEP_UNUSED(var) do { (void)var; } while(false); Definition: commonkernels.h:22
Definition: registry.h:45
Auto registry of python methods and classes.
Definition: registry.h:76
Definition: registry.cpp:24