Gui::ViewProviderPythonFeaturePy Class Reference

The python export class for ViewProviderPythonFeature. More...

#include <ViewProviderPythonFeaturePy.h>

Inheritance diagram for Gui::ViewProviderPythonFeaturePy:
Gui::ViewProviderDocumentObjectPy Gui::ViewProviderPy App::PropertyContainerPy Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

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.
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
virtual PyParentObjectGetParents (void)
virtual PyTypeObject * GetType (void)
ViewProviderDocumentObjectgetViewProviderPythonFeaturePtr (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 PyObjectPyMake (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



PyObjectaddDisplayMode (PyObject *args)
 implementer for the addDisplayMode() method
PyObjectaddProperty (PyObject *args)
 implementer for the addProperty() method
PyObjectsupportedProperties (PyObject *args)
 implementer for the supportedProperties() method
static PyObjectstaticCallback_addDisplayMode (PyObject *self, PyObject *args)
 callback for the addDisplayMode() method
static PyObjectstaticCallback_addProperty (PyObject *self, PyObject *args)
 callback for the addProperty() method
static PyObjectstaticCallback_supportedProperties (PyObject *self, PyObject *args)
 callback for the supportedProperties() method

Detailed Description

The python export class for ViewProviderPythonFeature.

Definition at line 20 of file ViewProviderPythonFeaturePy.h.


Member Typedef Documentation

Reimplemented from Gui::ViewProviderDocumentObjectPy.

Definition at line 36 of file ViewProviderPythonFeaturePy.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

PyObject * ViewProviderPythonFeaturePy::addDisplayMode ( PyObject args  ) 
PyObject * ViewProviderPythonFeaturePy::addProperty ( PyObject args  ) 
PyObject * ViewProviderPythonFeaturePy::getCustomAttributes ( const char *  attr  )  const
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().

int ViewProviderPythonFeaturePy::PyInit ( PyObject ,
PyObject  
) [virtual]

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 
)
PyObject * ViewProviderPythonFeaturePy::staticCallback_addDisplayMode ( PyObject self,
PyObject args 
) [static]
PyObject * ViewProviderPythonFeaturePy::staticCallback_addProperty ( PyObject self,
PyObject args 
) [static]
PyObject * ViewProviderPythonFeaturePy::staticCallback_supportedProperties ( PyObject self,
PyObject args 
) [static]
PyObject * ViewProviderPythonFeaturePy::supportedProperties ( PyObject args  ) 

Member Data Documentation

Initial value:
 {
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of ViewProviderPythonFeaturePy.

Reimplemented from Gui::ViewProviderDocumentObjectPy.

Definition at line 25 of file ViewProviderPythonFeaturePy.h.

Initial value:
 {
    {"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.


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

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