App::PropertyContainerPy Class Reference

The python export class for PropertyContainer. More...

#include <PropertyContainerPy.h>

Inheritance diagram for App::PropertyContainerPy:
Base::PersistencePy Base::BaseClassPy Base::PyObjectBase App::DocumentObjectPy App::DocumentPy Gui::ViewProviderPy App::DocumentObjectGroupPy App::FeaturePythonPy Mesh::MeshFeaturePy Part::PartFeaturePy Robot::RobotObjectPy Gui::ViewProviderDocumentObjectPy Mesh::FeaturePythonPy Part::FeaturePythonPy Part::Part2DObjectPy Gui::ViewProviderPythonFeaturePy Sketcher::SketchObjectPy Sketcher::SketchObjectSFPy

List of all members.

Public Types

typedef PropertyContainerPointerType

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)
PropertyContainergetPropertyContainerPtr (void) const
 getter for the object handled by this class
virtual PyTypeObject * GetType (void)
 PropertyContainerPy (PropertyContainer *pcObject, PyTypeObject *T=&Type)
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)
 ~PropertyContainerPy ()

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of PropertyContainerPy.
static PyMethodDef Methods []
 Methods structure of PropertyContainerPy.
static PyParentObject Parents [] = { PARENTSAppPropertyContainerPy }
static PyTypeObject Type
 Type structure of PropertyContainerPy.

callbacks and implementers for the python object methods



PyObjectgetDocumentationOfProperty (PyObject *args)
 implementer for the getDocumentationOfProperty() method
PyObjectgetGroupOfProperty (PyObject *args)
 implementer for the getGroupOfProperty() method
PyObjectgetPropertyByName (PyObject *args)
 implementer for the getPropertyByName() method
PyObjectgetTypeOfProperty (PyObject *args)
 implementer for the getTypeOfProperty() method
static PyObjectstaticCallback_getDocumentationOfProperty (PyObject *self, PyObject *args)
 callback for the getDocumentationOfProperty() method
static PyObjectstaticCallback_getGroupOfProperty (PyObject *self, PyObject *args)
 callback for the getGroupOfProperty() method
static PyObjectstaticCallback_getPropertyByName (PyObject *self, PyObject *args)
 callback for the getPropertyByName() method
static PyObjectstaticCallback_getTypeOfProperty (PyObject *self, PyObject *args)
 callback for the getTypeOfProperty() method

callbacks and implementers for the python object attributes



Py::List getPropertiesList (void) const
 getter for the PropertiesList attribute
static PyObjectstaticCallback_getPropertiesList (PyObject *self, void *closure)
 getter callback for the PropertiesList attribute
static int staticCallback_setPropertiesList (PyObject *self, PyObject *value, void *closure)
 setter callback for the PropertiesList attribute

Detailed Description

The python export class for PropertyContainer.

Definition at line 20 of file PropertyContainerPy.h.


Member Typedef Documentation


Constructor & Destructor Documentation

PropertyContainerPy::PropertyContainerPy ( PropertyContainer pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 457 of file PropertyContainerPy.cpp.

PropertyContainerPy::~PropertyContainerPy (  ) 

Definition at line 478 of file PropertyContainerPy.cpp.


Member Function Documentation

PyObject * PropertyContainerPy::_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::PersistencePy.

Reimplemented in App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::FeaturePythonPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Gui::ViewProviderPythonFeaturePy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.

Definition at line 493 of file PropertyContainerPy.cpp.

References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().

PyObject * PropertyContainerPy::_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::PersistencePy.

Reimplemented in App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::FeaturePythonPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Gui::ViewProviderPythonFeaturePy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.

Definition at line 485 of file PropertyContainerPy.cpp.

References representation().

int PropertyContainerPy::_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::PersistencePy.

Reimplemented in App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::FeaturePythonPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Gui::ViewProviderPythonFeaturePy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.

Definition at line 561 of file PropertyContainerPy.cpp.

References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().

PyObject * PropertyContainerPy::getCustomAttributes ( const char *  attr  )  const
PyObject * PropertyContainerPy::getDocumentationOfProperty ( PyObject args  ) 
PyObject * PropertyContainerPy::getGroupOfProperty ( PyObject args  ) 
virtual PyParentObject* App::PropertyContainerPy::GetParents ( void   )  [inline, virtual]
Py::List PropertyContainerPy::getPropertiesList ( void   )  const

getter for the PropertiesList attribute

Definition at line 107 of file PropertyContainerPyImp.cpp.

References Py::List::append(), getPropertyContainerPtr(), and App::PropertyContainer::getPropertyMap().

Referenced by staticCallback_getPropertiesList().

PyObject * PropertyContainerPy::getPropertyByName ( PyObject args  ) 
PropertyContainer * PropertyContainerPy::getPropertyContainerPtr ( void   )  const
virtual PyTypeObject* App::PropertyContainerPy::GetType ( void   )  [inline, virtual]
PyObject * PropertyContainerPy::getTypeOfProperty ( PyObject args  ) 
int PropertyContainerPy::PyInit ( PyObject ,
PyObject  
) [virtual]
PyObject * PropertyContainerPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]
std::string PropertyContainerPy::representation ( void   )  const
int PropertyContainerPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)
PyObject * PropertyContainerPy::staticCallback_getDocumentationOfProperty ( PyObject self,
PyObject args 
) [static]
PyObject * PropertyContainerPy::staticCallback_getGroupOfProperty ( PyObject self,
PyObject args 
) [static]
PyObject * PropertyContainerPy::staticCallback_getPropertiesList ( PyObject self,
void *  closure 
) [static]

getter callback for the PropertiesList attribute

Definition at line 418 of file PropertyContainerPy.cpp.

References getPropertiesList(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().

PyObject * PropertyContainerPy::staticCallback_getPropertyByName ( PyObject self,
PyObject args 
) [static]
PyObject * PropertyContainerPy::staticCallback_getTypeOfProperty ( PyObject self,
PyObject args 
) [static]
int PropertyContainerPy::staticCallback_setPropertiesList ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the PropertiesList attribute

Definition at line 436 of file PropertyContainerPy.cpp.

References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().


Member Data Documentation

PyGetSetDef PropertyContainerPy::GetterSetter [static]
PyMethodDef PropertyContainerPy::Methods [static]
Initial value:
 {
    {"getPropertyByName",
        (PyCFunction) staticCallback_getPropertyByName,
        METH_VARARGS,
        "Return the value of a named property."
    },
    {"getTypeOfProperty",
        (PyCFunction) staticCallback_getTypeOfProperty,
        METH_VARARGS,
        "Return the type of a named property. This can be (Hidden,ReadOnly,Output) or any combination. "
    },
    {"getGroupOfProperty",
        (PyCFunction) staticCallback_getGroupOfProperty,
        METH_VARARGS,
        "Return the name of the group which the property belongs to in this class. The properties sorted in differnt named groups for convenience."
    },
    {"getDocumentationOfProperty",
        (PyCFunction) staticCallback_getDocumentationOfProperty,
        METH_VARARGS,
        "Return the documentation string of the property of this class."
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of PropertyContainerPy.

Reimplemented from Base::PersistencePy.

Reimplemented in App::DocumentObjectGroupPy, App::DocumentObjectPy, App::DocumentPy, App::FeaturePythonPy, Gui::ViewProviderDocumentObjectPy, Gui::ViewProviderPy, Gui::ViewProviderPythonFeaturePy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.

Definition at line 24 of file PropertyContainerPy.h.

Referenced by _getattr().

PyParentObject PropertyContainerPy::Parents = { PARENTSAppPropertyContainerPy } [static]
PyTypeObject PropertyContainerPy::Type [static]

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

Generated on Wed Nov 23 19:01:44 2011 for FreeCAD by  doxygen 1.6.1