Extensions: Show up in the python interface

This commit is contained in:
Stefan Tröger
2016-06-01 08:37:28 +02:00
committed by wmayer
parent c5a2419e14
commit 4c42181e34
21 changed files with 435 additions and 258 deletions

View File

@@ -67,6 +67,10 @@ public:
static PyObject *PyMake(struct _typeobject *, PyObject *, PyObject *);
virtual int PyInit(PyObject* args, PyObject*k);
~@self.export.Name@();
+ if (self.export.Initialisation):
int initialisation();
-
typedef @self.export.TwinPointer@* PointerType ;
@@ -606,6 +610,10 @@ int @self.export.Name@::staticCallback_set@i.Name@ (PyObject *self, PyObject *va
+ if (self.export.Reference):
pcObject->ref();
-
+ if (self.export.Initialisation):
initialisation();
-
}
+ if not (self.export.Constructor):
@@ -808,6 +816,13 @@ int @self.export.Name@::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
}
-
+ if (self.export.Initialisation):
int @self.export.Name@::initialisation()
{
return 0;
}
-
// returns a string which represents the object e.g. when printed in python
std::string @self.export.Name@::representation(void) const
{
@@ -1117,6 +1132,13 @@ int @self.export.Name@::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
return 0;
}
-
+ if (self.export.Initialisation):
int @self.export.Name@::initialisation()
{
PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
return 0;
}
-
+ for i in self.export.Methode: