The python export class for DocumentObject. More...
#include <DocumentObjectPy.h>
Public Types | |
typedef DocumentObject * | 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. | |
DocumentObjectPy (DocumentObject *pcObject, PyTypeObject *T=&Type) | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
DocumentObject * | getDocumentObjectPtr (void) const |
getter for the object handled by this class | |
virtual PyParentObject * | GetParents (void) |
virtual PyTypeObject * | GetType (void) |
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) | |
~DocumentObjectPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of DocumentObjectPy. | |
static PyMethodDef | Methods [] |
Methods structure of DocumentObjectPy. | |
static PyParentObject | Parents [] = { PARENTSAppDocumentObjectPy } |
static PyTypeObject | Type |
Type structure of DocumentObjectPy. | |
callbacks and implementers for the python object attributes | |
| |
Py::Object | getDocument (void) const |
getter for the Document attribute | |
Py::List | getInList (void) const |
getter for the InList attribute | |
Py::String | getName (void) const |
getter for the Name attribute | |
Py::List | getOutList (void) const |
getter for the OutList attribute | |
Py::List | getState (void) const |
getter for the State attribute | |
Py::Object | getViewObject (void) const |
getter for the ViewObject attribute | |
static PyObject * | staticCallback_getDocument (PyObject *self, void *closure) |
getter callback for the Document attribute | |
static PyObject * | staticCallback_getInList (PyObject *self, void *closure) |
getter callback for the InList attribute | |
static PyObject * | staticCallback_getName (PyObject *self, void *closure) |
getter callback for the Name attribute | |
static PyObject * | staticCallback_getOutList (PyObject *self, void *closure) |
getter callback for the OutList attribute | |
static PyObject * | staticCallback_getState (PyObject *self, void *closure) |
getter callback for the State attribute | |
static PyObject * | staticCallback_getViewObject (PyObject *self, void *closure) |
getter callback for the ViewObject attribute | |
static int | staticCallback_setDocument (PyObject *self, PyObject *value, void *closure) |
setter callback for the Document attribute | |
static int | staticCallback_setInList (PyObject *self, PyObject *value, void *closure) |
setter callback for the InList attribute | |
static int | staticCallback_setName (PyObject *self, PyObject *value, void *closure) |
setter callback for the Name attribute | |
static int | staticCallback_setOutList (PyObject *self, PyObject *value, void *closure) |
setter callback for the OutList attribute | |
static int | staticCallback_setState (PyObject *self, PyObject *value, void *closure) |
setter callback for the State attribute | |
static int | staticCallback_setViewObject (PyObject *self, PyObject *value, void *closure) |
setter callback for the ViewObject attribute | |
callbacks and implementers for the python object methods | |
| |
PyObject * | purgeTouched (PyObject *args) |
implementer for the purgeTouched() method | |
PyObject * | touch (PyObject *args) |
implementer for the touch() method | |
static PyObject * | staticCallback_purgeTouched (PyObject *self, PyObject *args) |
callback for the purgeTouched() method | |
static PyObject * | staticCallback_touch (PyObject *self, PyObject *args) |
callback for the touch() method |
The python export class for DocumentObject.
Definition at line 20 of file DocumentObjectPy.h.
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 36 of file DocumentObjectPy.h.
DocumentObjectPy::DocumentObjectPy | ( | DocumentObject * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 485 of file DocumentObjectPy.cpp.
DocumentObjectPy::~DocumentObjectPy | ( | ) |
Definition at line 506 of file DocumentObjectPy.cpp.
PyObject * DocumentObjectPy::_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 App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 521 of file DocumentObjectPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * DocumentObjectPy::_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 App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 513 of file DocumentObjectPy.cpp.
References representation().
int DocumentObjectPy::_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 App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 589 of file DocumentObjectPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
PyObject * DocumentObjectPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 143 of file DocumentObjectPyImp.cpp.
Referenced by _getattr().
Py::Object DocumentObjectPy::getDocument | ( | void | ) | const |
getter for the Document attribute
Definition at line 50 of file DocumentObjectPyImp.cpp.
References getDocumentObjectPtr(), App::Document::getPyObject(), and Sketcher::None.
Referenced by getViewObject(), and staticCallback_getDocument().
DocumentObject * DocumentObjectPy::getDocumentObjectPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 648 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by App::DocumentObjectGroupPy::addObject(), App::DocumentPy::copyObject(), Sandbox::DocumentObjectProtectorPy::DocumentObjectProtectorPy(), getDocument(), getInList(), getName(), getOutList(), getState(), getViewObject(), App::DocumentObjectGroupPy::hasObject(), App::DocumentPy::moveObject(), purgeTouched(), App::DocumentObjectGroupPy::removeObject(), Gui::SelectionSingleton::sAddSelection(), setCustomAttributes(), App::PropertyLinkSubList::setPyObject(), App::PropertyLinkList::setPyObject(), App::PropertyLinkSub::setPyObject(), App::PropertyLink::setPyObject(), Gui::SelectionSingleton::sIsSelected(), Gui::SelectionSingleton::sRemoveSelection(), Gui::SelectionFilterPy::test(), and touch().
Py::List DocumentObjectPy::getInList | ( | void | ) | const |
getter for the InList attribute
Definition at line 121 of file DocumentObjectPyImp.cpp.
References Py::List::append(), getDocumentObjectPtr(), and App::DocumentObject::getInList().
Referenced by staticCallback_getInList().
Py::String DocumentObjectPy::getName | ( | void | ) | const |
getter for the Name attribute
Definition at line 40 of file DocumentObjectPyImp.cpp.
References getDocumentObjectPtr().
Referenced by getViewObject(), and staticCallback_getName().
Py::List DocumentObjectPy::getOutList | ( | void | ) | const |
getter for the OutList attribute
Definition at line 132 of file DocumentObjectPyImp.cpp.
References Py::List::append(), getDocumentObjectPtr(), and App::DocumentObject::getOutList().
Referenced by staticCallback_getOutList().
virtual PyParentObject* App::DocumentObjectPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 28 of file DocumentObjectPy.h.
Py::List DocumentObjectPy::getState | ( | void | ) | const |
getter for the State attribute
Definition at line 78 of file DocumentObjectPyImp.cpp.
References Py::List::append(), getDocumentObjectPtr(), App::DocumentObject::isError(), and App::DocumentObject::isTouched().
Referenced by staticCallback_getState().
virtual PyTypeObject* App::DocumentObjectPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 27 of file DocumentObjectPy.h.
Py::Object DocumentObjectPy::getViewObject | ( | void | ) | const |
getter for the ViewObject attribute
Definition at line 97 of file DocumentObjectPyImp.cpp.
References Py::Exception::clear(), Py::Object::getAttr(), getDocument(), getDocumentObjectPtr(), getName(), and Sketcher::None.
Referenced by staticCallback_getViewObject().
implementer for the purgeTouched() method
Definition at line 70 of file DocumentObjectPyImp.cpp.
References getDocumentObjectPtr(), App::DocumentObject::purgeTouched(), and Py_Return.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 498 of file DocumentObjectPy.cpp.
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 490 of file DocumentObjectPy.cpp.
std::string DocumentObjectPy::representation | ( | void | ) | const |
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 35 of file DocumentObjectPyImp.cpp.
Referenced by _repr().
int DocumentObjectPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 148 of file DocumentObjectPyImp.cpp.
References getDocumentObjectPtr(), App::PropertyContainer::getPropertyByName(), App::PropertyContainer::getPropertyType(), App::Prop_ReadOnly, Base::BaseClass::setPyObject(), and Type.
Referenced by _setattr().
PyObject * DocumentObjectPy::staticCallback_getDocument | ( | PyObject * | self, | |
void * | closure | |||
) | [static] |
getter callback for the Document attribute
Definition at line 382 of file DocumentObjectPy.cpp.
References getDocument(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the InList attribute
Definition at line 318 of file DocumentObjectPy.cpp.
References getInList(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Name attribute
Definition at line 350 of file DocumentObjectPy.cpp.
References getName(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the OutList attribute
Definition at line 286 of file DocumentObjectPy.cpp.
References getOutList(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the State attribute
Definition at line 414 of file DocumentObjectPy.cpp.
References getState(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
PyObject * DocumentObjectPy::staticCallback_getViewObject | ( | PyObject * | self, | |
void * | closure | |||
) | [static] |
getter callback for the ViewObject attribute
Definition at line 446 of file DocumentObjectPy.cpp.
References getViewObject(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
PyObject * DocumentObjectPy::staticCallback_purgeTouched | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the purgeTouched() method
Definition at line 210 of file DocumentObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int DocumentObjectPy::staticCallback_setDocument | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Document attribute
Definition at line 400 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentObjectPy::staticCallback_setInList | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the InList attribute
Definition at line 336 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentObjectPy::staticCallback_setName | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Name attribute
Definition at line 368 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentObjectPy::staticCallback_setOutList | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the OutList attribute
Definition at line 304 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentObjectPy::staticCallback_setState | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the State attribute
Definition at line 432 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentObjectPy::staticCallback_setViewObject | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the ViewObject attribute
Definition at line 464 of file DocumentObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the touch() method
Definition at line 134 of file DocumentObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the touch() method
Definition at line 62 of file DocumentObjectPyImp.cpp.
References getDocumentObjectPtr(), Py_Return, and App::DocumentObject::touch().
PyGetSetDef DocumentObjectPy::GetterSetter [static] |
Attribute structure of DocumentObjectPy.
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 25 of file DocumentObjectPy.h.
PyMethodDef DocumentObjectPy::Methods [static] |
{ {"touch", (PyCFunction) staticCallback_touch, METH_VARARGS, "Mark the object as changed (touched)" }, {"purgeTouched", (PyCFunction) staticCallback_purgeTouched, METH_VARARGS, "Mark the object as unchanged" }, {NULL, NULL, 0, NULL} }
Methods structure of DocumentObjectPy.
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 24 of file DocumentObjectPy.h.
Referenced by _getattr().
PyParentObject DocumentObjectPy::Parents = { PARENTSAppDocumentObjectPy } [static] |
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 26 of file DocumentObjectPy.h.
PyTypeObject DocumentObjectPy::Type [static] |
Type structure of DocumentObjectPy.
Reimplemented from App::PropertyContainerPy.
Reimplemented in App::DocumentObjectGroupPy, App::FeaturePythonPy, Mesh::FeaturePythonPy, Mesh::MeshFeaturePy, Part::FeaturePythonPy, Part::Part2DObjectPy, Part::PartFeaturePy, Robot::RobotObjectPy, Sketcher::SketchObjectPy, and Sketcher::SketchObjectSFPy.
Definition at line 23 of file DocumentObjectPy.h.
Referenced by App::DocumentObjectGroupPy::addObject(), Gui::ViewProviderPythonFeatureImp::claimChildren(), App::DocumentPy::copyObject(), exporter(), Gui::FreeCADGui_subgraphFromObject(), App::DocumentObjectGroupPy::hasObject(), App::DocumentPy::moveObject(), App::DocumentObjectGroupPy::removeObject(), Gui::SelectionSingleton::sAddSelection(), setCustomAttributes(), App::PropertyLinkSubList::setPyObject(), App::PropertyLinkList::setPyObject(), App::PropertyLinkSub::setPyObject(), App::PropertyLink::setPyObject(), Gui::Application::sExport(), Gui::Application::sHideObject(), Gui::SelectionSingleton::sIsSelected(), Gui::SelectionSingleton::sRemoveSelection(), Gui::Application::sShowObject(), and Gui::SelectionFilterPy::test().