Part: Default geometry extension template encapsulate value

This commit is contained in:
Abdullah Tahiri
2019-02-10 14:20:40 +01:00
committed by wmayer
parent fb5e8b4df7
commit 69c3b7d4f8
4 changed files with 14 additions and 11 deletions

View File

@@ -34,7 +34,7 @@ using namespace Part;
std::string GeometryIntExtensionPy::representation(void) const
{
std::stringstream str;
long id = getGeometryIntExtensionPtr()->value;
long id = getGeometryIntExtensionPtr()->getValue();
str << "<GeometryIntExtension (" << id << ") >";
return str.str();
}
@@ -57,7 +57,7 @@ int GeometryIntExtensionPy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyErr_Clear();
int Id;
if (PyArg_ParseTuple(args, "i", &Id)) {
this->getGeometryIntExtensionPtr()->value=Id;
this->getGeometryIntExtensionPtr()->setValue(Id);
return 0;
}
@@ -71,12 +71,12 @@ int GeometryIntExtensionPy::PyInit(PyObject* args, PyObject* /*kwd*/)
Py::Long GeometryIntExtensionPy::getValue(void) const
{
return Py::Long(this->getGeometryIntExtensionPtr()->value);
return Py::Long(this->getGeometryIntExtensionPtr()->getValue());
}
void GeometryIntExtensionPy::setValue(Py::Long value)
{
this->getGeometryIntExtensionPtr()->value=long(value);
this->getGeometryIntExtensionPtr()->setValue(long(value));
}