Make FeaturePython Python binding a template class to avoid code duplication

This commit is contained in:
wmayer
2013-03-22 00:34:18 +01:00
parent 9da66cbb02
commit ce0e6e5cef
30 changed files with 508 additions and 506 deletions

View File

@@ -31,12 +31,12 @@
#include <Base/Exception.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <App/FeaturePythonPyImp.h>
#include "Core/MeshIO.h"
#include "MeshFeature.h"
#include "MeshFeaturePy.h"
#include "FeaturePythonPy.h"
using namespace Mesh;
@@ -105,7 +105,7 @@ template<> const char* Mesh::FeaturePython::getViewProviderName(void) const {
template<> PyObject* Mesh::FeaturePython::getPyObject(void) {
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new Mesh::FeaturePythonPy(this),true);
PythonObject = Py::Object(new FeaturePythonPyT<Mesh::MeshFeaturePy>(this),true);
}
return Py::new_reference_to(PythonObject);
}