The python export class for PropertyContainer. More...
#include <PropertyContainerPy.h>
Public Types | |
typedef PropertyContainer * | 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) |
PropertyContainer * | getPropertyContainerPtr (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 PyObject * | PyMake (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 | |
| |
PyObject * | getDocumentationOfProperty (PyObject *args) |
implementer for the getDocumentationOfProperty() method | |
PyObject * | getGroupOfProperty (PyObject *args) |
implementer for the getGroupOfProperty() method | |
PyObject * | getPropertyByName (PyObject *args) |
implementer for the getPropertyByName() method | |
PyObject * | getTypeOfProperty (PyObject *args) |
implementer for the getTypeOfProperty() method | |
static PyObject * | staticCallback_getDocumentationOfProperty (PyObject *self, PyObject *args) |
callback for the getDocumentationOfProperty() method | |
static PyObject * | staticCallback_getGroupOfProperty (PyObject *self, PyObject *args) |
callback for the getGroupOfProperty() method | |
static PyObject * | staticCallback_getPropertyByName (PyObject *self, PyObject *args) |
callback for the getPropertyByName() method | |
static PyObject * | staticCallback_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 PyObject * | staticCallback_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 |
The python export class for PropertyContainer.
Definition at line 20 of file PropertyContainerPy.h.
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 36 of file PropertyContainerPy.h.
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.
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 |
getter method for special attributes (e.g. dynamic ones)
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 120 of file PropertyContainerPyImp.cpp.
References App::PropertyContainer::getPropertyByName(), getPropertyContainerPtr(), App::PropertyContainer::getPropertyMap(), Base::BaseClass::getPyObject(), and Base::streq().
Referenced by _getattr().
implementer for the getDocumentationOfProperty() method
Definition at line 94 of file PropertyContainerPyImp.cpp.
References getPropertyContainerPtr(), App::PropertyContainer::getPropertyDocumentation(), and Py::new_reference_to().
implementer for the getGroupOfProperty() method
Definition at line 81 of file PropertyContainerPyImp.cpp.
References getPropertyContainerPtr(), App::PropertyContainer::getPropertyGroup(), and Py::new_reference_to().
virtual PyParentObject* App::PropertyContainerPy::GetParents | ( | void | ) | [inline, virtual] |
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 28 of file PropertyContainerPy.h.
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().
implementer for the getPropertyByName() method
Definition at line 45 of file PropertyContainerPyImp.cpp.
References App::PropertyContainer::getPropertyByName(), getPropertyContainerPtr(), and Base::BaseClass::getPyObject().
PropertyContainer * PropertyContainerPy::getPropertyContainerPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 620 of file PropertyContainerPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by getCustomAttributes(), App::DocumentPy::getCustomAttributes(), getDocumentationOfProperty(), getGroupOfProperty(), getPropertiesList(), getPropertyByName(), getTypeOfProperty(), setCustomAttributes(), and App::DocumentPy::setCustomAttributes().
virtual PyTypeObject* App::PropertyContainerPy::GetType | ( | void | ) | [inline, virtual] |
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 27 of file PropertyContainerPy.h.
implementer for the getTypeOfProperty() method
Definition at line 60 of file PropertyContainerPyImp.cpp.
References Py::List::append(), getPropertyContainerPtr(), App::PropertyContainer::getPropertyType(), Py::new_reference_to(), App::Prop_Hidden, App::Prop_Output, App::Prop_ReadOnly, App::Prop_Transient, and Type.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
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 470 of file PropertyContainerPy.cpp.
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 462 of file PropertyContainerPy.cpp.
std::string PropertyContainerPy::representation | ( | void | ) | const |
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 40 of file PropertyContainerPyImp.cpp.
Referenced by _repr().
int PropertyContainerPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
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 151 of file PropertyContainerPyImp.cpp.
References App::PropertyContainer::getPropertyByName(), getPropertyContainerPtr(), App::PropertyContainer::getPropertyType(), App::Prop_ReadOnly, Base::BaseClass::setPyObject(), and Type.
Referenced by _setattr().
PyObject * PropertyContainerPy::staticCallback_getDocumentationOfProperty | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the getDocumentationOfProperty() method
Definition at line 342 of file PropertyContainerPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * PropertyContainerPy::staticCallback_getGroupOfProperty | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the getGroupOfProperty() method
Definition at line 266 of file PropertyContainerPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
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] |
callback for the getPropertyByName() method
Definition at line 114 of file PropertyContainerPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * PropertyContainerPy::staticCallback_getTypeOfProperty | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the getTypeOfProperty() method
Definition at line 190 of file PropertyContainerPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
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().
PyGetSetDef PropertyContainerPy::GetterSetter [static] |
{ {"PropertiesList", (getter) staticCallback_getPropertiesList, (setter) staticCallback_setPropertiesList, "A list of all property names", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute 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 25 of file PropertyContainerPy.h.
PyMethodDef PropertyContainerPy::Methods [static] |
{ {"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] |
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 26 of file PropertyContainerPy.h.
PyTypeObject PropertyContainerPy::Type [static] |
Type 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 23 of file PropertyContainerPy.h.
Referenced by getTypeOfProperty(), and setCustomAttributes().