TestGui::UnitTestPy Class Reference

#include <UnitTestPy.h>

Inheritance diagram for TestGui::UnitTestPy:
Base::PyObjectBase

List of all members.

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.
PyObjectclearErrorList (PyObject *args)
PyObjecterrorDialog (PyObject *args)
virtual PyParentObjectGetParents (void)
virtual PyTypeObject * GetType (void)
PyObjectgetUnitTest (PyObject *args)
PyObjectinsertError (PyObject *args)
PyObjectsetErrorCount (PyObject *args)
PyObjectsetFailCount (PyObject *args)
PyObjectsetProgressFraction (PyObject *args)
PyObjectsetRemainCount (PyObject *args)
PyObjectsetRunCount (PyObject *args)
PyObjectsetStatusText (PyObject *args)
PyObjectsetUnitTest (PyObject *args)
 UnitTestPy (PyTypeObject *T=&Type)
PyObjectupdateGUI (PyObject *args)

Static Public Member Functions

static PyObjectPyMake (PyTypeObject *, PyObject *, PyObject *)
static PyObjectsclearErrorList (PyObject *self, PyObject *args, PyObject *)
static PyObjectserrorDialog (PyObject *self, PyObject *args, PyObject *)
static PyObjectsgetUnitTest (PyObject *self, PyObject *args, PyObject *)
static PyObjectsinsertError (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetErrorCount (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetFailCount (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetProgressFraction (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetRemainCount (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetRunCount (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetStatusText (PyObject *self, PyObject *args, PyObject *)
static PyObjectssetUnitTest (PyObject *self, PyObject *args, PyObject *)
static PyObjectsupdateGUI (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 ()

Detailed Description

Definition at line 70 of file UnitTestPy.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

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.

PyObject * UnitTestPy::clearErrorList ( PyObject args  ) 
PyObject * UnitTestPy::errorDialog ( PyObject args  ) 
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.

PyObject * UnitTestPy::getUnitTest ( PyObject args  ) 

Definition at line 358 of file UnitTestPy.cpp.

References TestGui::UnitTestDialog::instance(), PY_CATCH, and PY_TRY.

PyObject * UnitTestPy::insertError ( PyObject args  ) 
PyObject * UnitTestPy::PyMake ( PyTypeObject *  ignored,
PyObject args,
PyObject kwds 
) [static]

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.

PyObject * UnitTestPy::setErrorCount ( PyObject args  ) 
PyObject * UnitTestPy::setFailCount ( PyObject args  ) 
PyObject * UnitTestPy::setProgressFraction ( PyObject args  ) 
PyObject * UnitTestPy::setRemainCount ( PyObject args  ) 
PyObject * UnitTestPy::setRunCount ( PyObject args  ) 
PyObject * UnitTestPy::setStatusText ( PyObject args  ) 
PyObject * UnitTestPy::setUnitTest ( PyObject args  ) 
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.

PyObject * UnitTestPy::updateGUI ( PyObject args  ) 

Definition at line 450 of file UnitTestPy.cpp.

References PY_CATCH, Py_Return, and PY_TRY.


Member Data Documentation

PyMethodDef TestGui::UnitTestPy::Methods [static]
Initial value:
 {
  {"" "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.


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:48 2011 for FreeCAD by  doxygen 1.6.1