#include <UnitTestPy.h>
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
PyObject * | clearErrorList (PyObject *args) |
PyObject * | errorDialog (PyObject *args) |
virtual PyParentObject * | GetParents (void) |
virtual PyTypeObject * | GetType (void) |
PyObject * | getUnitTest (PyObject *args) |
PyObject * | insertError (PyObject *args) |
PyObject * | setErrorCount (PyObject *args) |
PyObject * | setFailCount (PyObject *args) |
PyObject * | setProgressFraction (PyObject *args) |
PyObject * | setRemainCount (PyObject *args) |
PyObject * | setRunCount (PyObject *args) |
PyObject * | setStatusText (PyObject *args) |
PyObject * | setUnitTest (PyObject *args) |
UnitTestPy (PyTypeObject *T=&Type) | |
PyObject * | updateGUI (PyObject *args) |
Static Public Member Functions | |
static PyObject * | PyMake (PyTypeObject *, PyObject *, PyObject *) |
static PyObject * | sclearErrorList (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | serrorDialog (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | sgetUnitTest (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | sinsertError (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetErrorCount (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetFailCount (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetProgressFraction (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetRemainCount (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetRunCount (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetStatusText (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | ssetUnitTest (PyObject *self, PyObject *args, PyObject *) |
static PyObject * | supdateGUI (PyObject *self, PyObject *args, PyObject *) |
Static Public Attributes | |
static PyMethodDef | Methods [] |
static PyParentObject | Parents [] = {&PyObjectBase::Type, NULL} |
static PyTypeObject | Type |
Py_Header struct from python.h. | |
Protected Member Functions | |
~UnitTestPy () |
Definition at line 70 of file UnitTestPy.h.
UnitTestPy::~UnitTestPy | ( | ) | [protected] |
Definition at line 295 of file UnitTestPy.cpp.
TestGui::UnitTestPy::UnitTestPy | ( | PyTypeObject * | T = &Type |
) |
Definition at line 282 of file UnitTestPy.cpp.
Referenced by PyMake().
PyObject * UnitTestPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Base::PyObjectBase.
Definition at line 311 of file UnitTestPy.cpp.
References _getattr_up, and Base::PyObjectBase::PyObjectBase().
PyObject * UnitTestPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Base::PyObjectBase.
Definition at line 303 of file UnitTestPy.cpp.
int UnitTestPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Base::PyObjectBase.
Definition at line 316 of file UnitTestPy.cpp.
Definition at line 326 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::clearErrorList(), TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, and PY_TRY.
Definition at line 394 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::showErrorDialog().
virtual PyParentObject* TestGui::UnitTestPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 72 of file UnitTestPy.h.
virtual PyTypeObject* TestGui::UnitTestPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 72 of file UnitTestPy.h.
Definition at line 358 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::instance(), PY_CATCH, and PY_TRY.
Definition at line 334 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::insertError(), TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, and PY_TRY.
Definition at line 287 of file UnitTestPy.cpp.
References UnitTestPy().
static PyObject* TestGui::UnitTestPy::sclearErrorList | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 89 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::serrorDialog | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 95 of file UnitTestPy.h.
Definition at line 428 of file UnitTestPy.cpp.
References RobotExampleTrajectoryOutOfShapes::count, TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setErrorCount().
Definition at line 417 of file UnitTestPy.cpp.
References RobotExampleTrajectoryOutOfShapes::count, TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setFailCount().
Definition at line 378 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setProgressFraction().
Definition at line 439 of file UnitTestPy.cpp.
References RobotExampleTrajectoryOutOfShapes::count, TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setRemainCount().
Definition at line 406 of file UnitTestPy.cpp.
References RobotExampleTrajectoryOutOfShapes::count, TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setRunCount().
Definition at line 367 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setStatusText().
Definition at line 347 of file UnitTestPy.cpp.
References TestGui::UnitTestDialog::instance(), PY_CATCH, Py_Return, PY_TRY, and TestGui::UnitTestDialog::setUnitTest().
static PyObject* TestGui::UnitTestPy::sgetUnitTest | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 92 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::sinsertError | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 90 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetErrorCount | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 98 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetFailCount | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 97 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetProgressFraction | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 94 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetRemainCount | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 99 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetRunCount | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 96 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetStatusText | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 93 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::ssetUnitTest | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 91 of file UnitTestPy.h.
static PyObject* TestGui::UnitTestPy::supdateGUI | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | ||||
) | [inline, static] |
Definition at line 100 of file UnitTestPy.h.
Definition at line 450 of file UnitTestPy.cpp.
PyMethodDef TestGui::UnitTestPy::Methods [static] |
{ {"" "clearErrorList" "",(PyCFunction) sclearErrorList ,Py_NEWARGS}, {"" "insertError" "",(PyCFunction) sinsertError ,Py_NEWARGS}, {"" "setUnitTest" "",(PyCFunction) ssetUnitTest ,Py_NEWARGS}, {"" "getUnitTest" "",(PyCFunction) sgetUnitTest ,Py_NEWARGS}, {"" "setStatusText" "",(PyCFunction) ssetStatusText ,Py_NEWARGS}, {"" "setProgressFraction" "",(PyCFunction) ssetProgressFraction ,Py_NEWARGS}, {"" "errorDialog" "",(PyCFunction) serrorDialog ,Py_NEWARGS}, {"" "setRunCount" "",(PyCFunction) ssetRunCount ,Py_NEWARGS}, {"" "setFailCount" "",(PyCFunction) ssetFailCount ,Py_NEWARGS}, {"" "setErrorCount" "",(PyCFunction) ssetErrorCount ,Py_NEWARGS}, {"" "setRemainCount" "",(PyCFunction) ssetRemainCount ,Py_NEWARGS}, {"" "updateGUI" "",(PyCFunction) supdateGUI ,Py_NEWARGS}, {NULL, NULL} }
Reimplemented from Base::PyObjectBase.
Definition at line 72 of file UnitTestPy.h.
PyParentObject TestGui::UnitTestPy::Parents = {&PyObjectBase::Type, NULL} [static] |
Reimplemented from Base::PyObjectBase.
Definition at line 72 of file UnitTestPy.h.
PyTypeObject TestGui::UnitTestPy::Type [static] |
Py_Header struct from python.h.
To prevent subclasses of PyTypeObject to be subclassed in Python we should remove the Py_TPFLAGS_BASETYPE flag.
Every PyObjectBase object is also a python object. So you can use every Python C-Library function also on a PyObjectBase object
For example, the classes App::VectorPy and App::MatrixPy have removed this flag and its Python proxies App.Vector and App.Matrix cannot be subclassed. In case we want to allow to derive from subclasses of PyTypeObject in Python we must either reimplment tp_new, tp_dealloc, tp_getattr, tp_setattr, tp_repr or set them to 0 and define tp_base as 0.
Reimplemented from Base::PyObjectBase.
Definition at line 72 of file UnitTestPy.h.