From ab24e9df6a16db8c87aea1f7b768e70529ff8d82 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 5 Jan 2015 13:45:46 +0100 Subject: [PATCH] + Implement repr() method of Python binding for ParameterGrp --- src/Base/ParameterPy.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Base/ParameterPy.cpp b/src/Base/ParameterPy.cpp index 0c039f25a..128453fbc 100644 --- a/src/Base/ParameterPy.cpp +++ b/src/Base/ParameterPy.cpp @@ -35,6 +35,7 @@ # include # endif # include +# include #endif @@ -84,6 +85,7 @@ public: // python exports ++++++++++++++++++++++++++++++++++++++++++++++++++++ //--------------------------------------------------------------------- + PyObject *_repr(void); PyObject *_getattr(char *attr); // __getattr__ function // getter setter int _setattr(char *attr, PyObject *value); // __setattr__ function @@ -252,6 +254,14 @@ ParameterGrpPy::~ParameterGrpPy() // Everything handled in parent //-------------------------------------------------------------------------- // FCPyParametrGrp Attributes //-------------------------------------------------------------------------- + +PyObject *ParameterGrpPy::_repr(void) +{ + std::stringstream a; + a << ""; + return Py_BuildValue("s", a.str().c_str()); +} + PyObject *ParameterGrpPy::_getattr(char *attr) // __getattr__ function: note only need to handle new state { _getattr_up(PyObjectBase); // send to parent