The python export class for ViewProviderPythonFeature. More...
#include <ViewProviderPythonFeaturePy.h>
Public Types | |
typedef ViewProviderDocumentObject * | PointerType |
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 * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
virtual PyParentObject * | GetParents (void) |
virtual PyTypeObject * | GetType (void) |
ViewProviderDocumentObject * | getViewProviderPythonFeaturePtr (void) const |
getter for the object handled by this class | |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
ViewProviderPythonFeaturePy (ViewProviderDocumentObject *pcObject, PyTypeObject *T=&Type) | |
~ViewProviderPythonFeaturePy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of ViewProviderPythonFeaturePy. | |
static PyMethodDef | Methods [] |
Methods structure of ViewProviderPythonFeaturePy. | |
static PyParentObject | Parents [] = { PARENTSGuiViewProviderPythonFeaturePy } |
static PyTypeObject | Type |
Type structure of ViewProviderPythonFeaturePy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | addDisplayMode (PyObject *args) |
implementer for the addDisplayMode() method | |
PyObject * | addProperty (PyObject *args) |
implementer for the addProperty() method | |
PyObject * | supportedProperties (PyObject *args) |
implementer for the supportedProperties() method | |
static PyObject * | staticCallback_addDisplayMode (PyObject *self, PyObject *args) |
callback for the addDisplayMode() method | |
static PyObject * | staticCallback_addProperty (PyObject *self, PyObject *args) |
callback for the addProperty() method | |
static PyObject * | staticCallback_supportedProperties (PyObject *self, PyObject *args) |
callback for the supportedProperties() method |
The python export class for ViewProviderPythonFeature.
Definition at line 20 of file ViewProviderPythonFeaturePy.h.
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 36 of file ViewProviderPythonFeaturePy.h.
ViewProviderPythonFeaturePy::ViewProviderPythonFeaturePy | ( | ViewProviderDocumentObject * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 338 of file ViewProviderPythonFeaturePy.cpp.
ViewProviderPythonFeaturePy::~ViewProviderPythonFeaturePy | ( | ) |
Definition at line 359 of file ViewProviderPythonFeaturePy.cpp.
PyObject * ViewProviderPythonFeaturePy::_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 Gui::ViewProviderDocumentObjectPy.
Definition at line 374 of file ViewProviderPythonFeaturePy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * ViewProviderPythonFeaturePy::_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 Gui::ViewProviderDocumentObjectPy.
Definition at line 366 of file ViewProviderPythonFeaturePy.cpp.
References representation().
int ViewProviderPythonFeaturePy::_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 Gui::ViewProviderDocumentObjectPy.
Definition at line 442 of file ViewProviderPythonFeaturePy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the addDisplayMode() method
Definition at line 43 of file ViewProviderPythonFeaturePyImp.cpp.
References Gui::ViewProvider::addDisplayMaskMode(), getViewProviderPythonFeaturePtr(), Base::Interpreter(), PY_CATCH, Py_Return, PY_TRY, and Base::Exception::what().
implementer for the addProperty() method
Definition at line 66 of file ViewProviderPythonFeaturePyImp.cpp.
References App::PropertyContainer::addDynamicProperty(), getViewProviderPythonFeaturePtr(), and Py::new_reference_to().
PyObject * ViewProviderPythonFeaturePy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 105 of file ViewProviderPythonFeaturePyImp.cpp.
References App::PropertyContainer::getDynamicPropertyByName(), App::PropertyContainer::getDynamicPropertyNames(), Base::BaseClass::getPyObject(), getViewProviderPythonFeaturePtr(), PY_CATCH, PY_TRY, and Base::streq().
Referenced by _getattr().
virtual PyParentObject* Gui::ViewProviderPythonFeaturePy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 28 of file ViewProviderPythonFeaturePy.h.
virtual PyTypeObject* Gui::ViewProviderPythonFeaturePy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 27 of file ViewProviderPythonFeaturePy.h.
ViewProviderDocumentObject * ViewProviderPythonFeaturePy::getViewProviderPythonFeaturePtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 501 of file ViewProviderPythonFeaturePy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by addDisplayMode(), addProperty(), getCustomAttributes(), and setCustomAttributes().
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 351 of file ViewProviderPythonFeaturePy.cpp.
PyObject * ViewProviderPythonFeaturePy::PyMake | ( | struct _typeobject * | , | |
PyObject * | , | |||
PyObject * | ||||
) | [static] |
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 343 of file ViewProviderPythonFeaturePy.cpp.
std::string ViewProviderPythonFeaturePy::representation | ( | void | ) | const |
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 38 of file ViewProviderPythonFeaturePyImp.cpp.
Referenced by _repr().
int ViewProviderPythonFeaturePy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 126 of file ViewProviderPythonFeaturePyImp.cpp.
References App::PropertyContainer::getDynamicPropertyByName(), getViewProviderPythonFeaturePtr(), Base::BaseClass::setPyObject(), and Base::Exception::what().
Referenced by _setattr().
PyObject * ViewProviderPythonFeaturePy::staticCallback_addDisplayMode | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the addDisplayMode() method
Definition at line 103 of file ViewProviderPythonFeaturePy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * ViewProviderPythonFeaturePy::staticCallback_addProperty | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the addProperty() method
Definition at line 179 of file ViewProviderPythonFeaturePy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * ViewProviderPythonFeaturePy::staticCallback_supportedProperties | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the supportedProperties() method
Definition at line 255 of file ViewProviderPythonFeaturePy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the supportedProperties() method
Definition at line 87 of file ViewProviderPythonFeaturePyImp.cpp.
References Py::List::append(), Base::BaseClassPy::getAllDerivedFrom(), App::Property::getClassTypeId(), and Py::new_reference_to().
PyGetSetDef ViewProviderPythonFeaturePy::GetterSetter [static] |
{ {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of ViewProviderPythonFeaturePy.
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 25 of file ViewProviderPythonFeaturePy.h.
PyMethodDef ViewProviderPythonFeaturePy::Methods [static] |
{ {"addDisplayMode", (PyCFunction) staticCallback_addDisplayMode, METH_VARARGS, "Add a new display mode to the view provider" }, {"addProperty", (PyCFunction) staticCallback_addProperty, METH_VARARGS, "\n addProperty(string, string) -- Add a generic property.\n The first argument specifies the type, the second the\n name of the property.\n " }, {"supportedProperties", (PyCFunction) staticCallback_supportedProperties, METH_VARARGS, "A list of supported property types" }, {NULL, NULL, 0, NULL} }
Methods structure of ViewProviderPythonFeaturePy.
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 24 of file ViewProviderPythonFeaturePy.h.
Referenced by _getattr().
PyParentObject ViewProviderPythonFeaturePy::Parents = { PARENTSGuiViewProviderPythonFeaturePy } [static] |
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 26 of file ViewProviderPythonFeaturePy.h.
PyTypeObject ViewProviderPythonFeaturePy::Type [static] |
Type structure of ViewProviderPythonFeaturePy.
Reimplemented from Gui::ViewProviderDocumentObjectPy.
Definition at line 23 of file ViewProviderPythonFeaturePy.h.