The python export class for Document. More...
#include <DocumentPy.h>
Public Types | |
typedef Document * | 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. | |
DocumentPy (Document *pcObject, PyTypeObject *T=&Type) | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
Document * | getDocumentPtr (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) | |
~DocumentPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of DocumentPy. | |
static PyMethodDef | Methods [] |
Methods structure of DocumentPy. | |
static PyParentObject | Parents [] = { PARENTSGuiDocumentPy } |
static PyTypeObject | Type |
Type structure of DocumentPy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | activeObject (PyObject *args) |
implementer for the activeObject() method | |
PyObject * | activeView (PyObject *args) |
implementer for the activeView() method | |
PyObject * | addAnnotation (PyObject *args) |
implementer for the addAnnotation() method | |
PyObject * | getObject (PyObject *args) |
implementer for the getObject() method | |
PyObject * | hide (PyObject *args) |
implementer for the hide() method | |
PyObject * | resetEdit (PyObject *args) |
implementer for the resetEdit() method | |
PyObject * | setEdit (PyObject *args) |
implementer for the setEdit() method | |
PyObject * | setPos (PyObject *args) |
implementer for the setPos() method | |
PyObject * | show (PyObject *args) |
implementer for the show() method | |
PyObject * | update (PyObject *args) |
implementer for the update() method | |
static PyObject * | staticCallback_activeObject (PyObject *self, PyObject *args) |
callback for the activeObject() method | |
static PyObject * | staticCallback_activeView (PyObject *self, PyObject *args) |
callback for the activeView() method | |
static PyObject * | staticCallback_addAnnotation (PyObject *self, PyObject *args) |
callback for the addAnnotation() method | |
static PyObject * | staticCallback_getObject (PyObject *self, PyObject *args) |
callback for the getObject() method | |
static PyObject * | staticCallback_hide (PyObject *self, PyObject *args) |
callback for the hide() method | |
static PyObject * | staticCallback_resetEdit (PyObject *self, PyObject *args) |
callback for the resetEdit() method | |
static PyObject * | staticCallback_setEdit (PyObject *self, PyObject *args) |
callback for the setEdit() method | |
static PyObject * | staticCallback_setPos (PyObject *self, PyObject *args) |
callback for the setPos() method | |
static PyObject * | staticCallback_show (PyObject *self, PyObject *args) |
callback for the show() method | |
static PyObject * | staticCallback_update (PyObject *self, PyObject *args) |
callback for the update() method | |
callbacks and implementers for the python object attributes | |
| |
Py::Object | getActiveObject (void) const |
getter for the ActiveObject attribute | |
Py::Object | getActiveView (void) const |
getter for the ActiveView attribute | |
Py::Object | getDocument (void) const |
getter for the Document attribute | |
void | setActiveObject (Py::Object arg) |
setter for the ActiveObject attribute | |
void | setActiveView (Py::Object arg) |
setter for the ActiveView attribute | |
static PyObject * | staticCallback_getActiveObject (PyObject *self, void *closure) |
getter callback for the ActiveObject attribute | |
static PyObject * | staticCallback_getActiveView (PyObject *self, void *closure) |
getter callback for the ActiveView attribute | |
static PyObject * | staticCallback_getDocument (PyObject *self, void *closure) |
getter callback for the Document attribute | |
static int | staticCallback_setActiveObject (PyObject *self, PyObject *value, void *closure) |
setter callback for the ActiveObject attribute | |
static int | staticCallback_setActiveView (PyObject *self, PyObject *value, void *closure) |
setter callback for the ActiveView attribute | |
static int | staticCallback_setDocument (PyObject *self, PyObject *value, void *closure) |
setter callback for the Document attribute |
The python export class for Document.
Definition at line 20 of file Gui/DocumentPy.h.
typedef Document* Gui::DocumentPy::PointerType |
Reimplemented from Base::PersistencePy.
Definition at line 36 of file Gui/DocumentPy.h.
Definition at line 1043 of file Gui/DocumentPy.cpp.
DocumentPy::~DocumentPy | ( | ) |
Definition at line 1064 of file Gui/DocumentPy.cpp.
PyObject * DocumentPy::_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.
Definition at line 1079 of file Gui/DocumentPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * DocumentPy::_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.
Definition at line 1071 of file Gui/DocumentPy.cpp.
References representation().
int DocumentPy::_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.
Definition at line 1147 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the activeObject() method
Definition at line 172 of file Gui/DocumentPyImp.cpp.
References App::Document::getActiveObject(), Gui::Document::getDocument(), getDocumentPtr(), Gui::ViewProvider::getPyObject(), Gui::Document::getViewProvider(), PY_CATCH, Py_Return, and PY_TRY.
implementer for the activeView() method
Definition at line 188 of file Gui/DocumentPyImp.cpp.
References Gui::Document::getActiveView(), getDocumentPtr(), Base::BaseClass::getPyObject(), PY_CATCH, Py_Return, and PY_TRY.
implementer for the addAnnotation() method
Definition at line 126 of file Gui/DocumentPyImp.cpp.
References Gui::ViewProviderExtern::adjustDocumentName(), getDocument(), getDocumentPtr(), PY_CATCH, Py_Return, PY_TRY, Gui::Document::setAnnotationViewProvider(), and Gui::ViewProviderExtern::setModeByFile().
Py::Object DocumentPy::getActiveObject | ( | void | ) | const |
getter for the ActiveObject attribute
Definition at line 204 of file Gui/DocumentPyImp.cpp.
References App::Document::getActiveObject(), Gui::Document::getDocument(), getDocumentPtr(), Gui::ViewProvider::getPyObject(), Gui::Document::getViewProvider(), and Sketcher::None.
Referenced by staticCallback_getActiveObject().
Py::Object DocumentPy::getActiveView | ( | void | ) | const |
getter for the ActiveView attribute
Definition at line 220 of file Gui/DocumentPyImp.cpp.
References Gui::Document::getActiveView(), getDocumentPtr(), Base::BaseClass::getPyObject(), and Sketcher::None.
Referenced by staticCallback_getActiveView().
PyObject * DocumentPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 247 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), Gui::ViewProvider::getPyObject(), and Gui::Document::getViewProviderByName().
Referenced by _getattr().
Py::Object DocumentPy::getDocument | ( | void | ) | const |
getter for the Document attribute
Definition at line 236 of file Gui/DocumentPyImp.cpp.
References Gui::Document::getDocument(), getDocumentPtr(), App::Document::getPyObject(), and Sketcher::None.
Referenced by addAnnotation(), and staticCallback_getDocument().
Document * DocumentPy::getDocumentPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 1206 of file Gui/DocumentPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by activeObject(), activeView(), addAnnotation(), getActiveObject(), getActiveView(), getCustomAttributes(), getDocument(), getObject(), hide(), representation(), resetEdit(), setCustomAttributes(), setEdit(), setPos(), show(), and update().
implementer for the getObject() method
Definition at line 156 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), Gui::ViewProvider::getPyObject(), Gui::Document::getViewProviderByName(), PY_CATCH, Py_Return, and PY_TRY.
virtual PyParentObject* Gui::DocumentPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 28 of file Gui/DocumentPy.h.
virtual PyTypeObject* Gui::DocumentPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 27 of file Gui/DocumentPy.h.
implementer for the hide() method
Definition at line 65 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), PY_CATCH, Py_Return, PY_TRY, and Gui::Document::setHide().
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PersistencePy.
Definition at line 1056 of file Gui/DocumentPy.cpp.
Reimplemented from Base::PersistencePy.
Definition at line 1048 of file Gui/DocumentPy.cpp.
std::string DocumentPy::representation | ( | void | ) | const |
Reimplemented from Base::PersistencePy.
Definition at line 44 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr().
Referenced by _repr().
implementer for the resetEdit() method
Definition at line 117 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), Py_Return, and Gui::Document::resetEdit().
void DocumentPy::setActiveObject | ( | Py::Object | arg | ) |
setter for the ActiveObject attribute
Definition at line 215 of file Gui/DocumentPyImp.cpp.
void DocumentPy::setActiveView | ( | Py::Object | arg | ) |
setter for the ActiveView attribute
Definition at line 231 of file Gui/DocumentPyImp.cpp.
int DocumentPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 265 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), and Gui::Document::getViewProviderByName().
Referenced by _setattr().
implementer for the setEdit() method
Definition at line 95 of file Gui/DocumentPyImp.cpp.
References Gui::Document::getDocument(), getDocumentPtr(), App::Document::getObject(), Py_Return, and Gui::Document::setEdit().
implementer for the setPos() method
Definition at line 77 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), PY_CATCH, Py_Return, PY_TRY, Gui::Document::setPos(), Base::MatrixPy::Type, and Py::value().
implementer for the show() method
Definition at line 53 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), PY_CATCH, Py_Return, PY_TRY, and Gui::Document::setShow().
callback for the activeObject() method
Definition at line 764 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the activeView() method
Definition at line 840 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the addAnnotation() method
Definition at line 536 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
getter callback for the ActiveObject attribute
Definition at line 916 of file Gui/DocumentPy.cpp.
References getActiveObject(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the ActiveView attribute
Definition at line 960 of file Gui/DocumentPy.cpp.
References getActiveView(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Document attribute
Definition at line 1004 of file Gui/DocumentPy.cpp.
References getDocument(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
callback for the getObject() method
Definition at line 688 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the hide() method
Definition at line 232 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the resetEdit() method
Definition at line 460 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int DocumentPy::staticCallback_setActiveObject | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the ActiveObject attribute
Definition at line 934 of file Gui/DocumentPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentPy::staticCallback_setActiveView | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the ActiveView attribute
Definition at line 978 of file Gui/DocumentPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int DocumentPy::staticCallback_setDocument | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Document attribute
Definition at line 1022 of file Gui/DocumentPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the setEdit() method
Definition at line 384 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the setPos() method
Definition at line 308 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the show() method
Definition at line 156 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the update() method
Definition at line 612 of file Gui/DocumentPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the update() method
Definition at line 145 of file Gui/DocumentPyImp.cpp.
References getDocumentPtr(), Gui::Document::onUpdate(), PY_CATCH, Py_Return, and PY_TRY.
PyGetSetDef DocumentPy::GetterSetter [static] |
{ {"ActiveObject", (getter) staticCallback_getActiveObject, (setter) staticCallback_setActiveObject, "The active object of the document", NULL }, {"ActiveView", (getter) staticCallback_getActiveView, (setter) staticCallback_setActiveView, "The active view of the document", NULL }, {"Document", (getter) staticCallback_getDocument, (setter) staticCallback_setDocument, "The related App document to this Gui document", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of DocumentPy.
Reimplemented from Base::PersistencePy.
Definition at line 25 of file Gui/DocumentPy.h.
PyMethodDef DocumentPy::Methods [static] |
Methods structure of DocumentPy.
Reimplemented from Base::PersistencePy.
Definition at line 24 of file Gui/DocumentPy.h.
Referenced by _getattr().
PyParentObject DocumentPy::Parents = { PARENTSGuiDocumentPy } [static] |
Reimplemented from Base::PersistencePy.
Definition at line 26 of file Gui/DocumentPy.h.
PyTypeObject DocumentPy::Type [static] |
Type structure of DocumentPy.
Reimplemented from Base::PersistencePy.
Definition at line 23 of file Gui/DocumentPy.h.