App::DocumentObjectPy Class Reference

The python export class for DocumentObject. More...

#include <DocumentObjectPy.h>

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

List of all members.

Public Types

typedef DocumentObjectPointerType

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)
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
DocumentObjectgetDocumentObjectPtr (void) const
 getter for the object handled by this class
virtual PyParentObjectGetParents (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 PyObjectPyMake (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 PyObjectstaticCallback_getDocument (PyObject *self, void *closure)
 getter callback for the Document attribute
static PyObjectstaticCallback_getInList (PyObject *self, void *closure)
 getter callback for the InList attribute
static PyObjectstaticCallback_getName (PyObject *self, void *closure)
 getter callback for the Name attribute
static PyObjectstaticCallback_getOutList (PyObject *self, void *closure)
 getter callback for the OutList attribute
static PyObjectstaticCallback_getState (PyObject *self, void *closure)
 getter callback for the State attribute
static PyObjectstaticCallback_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



PyObjectpurgeTouched (PyObject *args)
 implementer for the purgeTouched() method
PyObjecttouch (PyObject *args)
 implementer for the touch() method
static PyObjectstaticCallback_purgeTouched (PyObject *self, PyObject *args)
 callback for the purgeTouched() method
static PyObjectstaticCallback_touch (PyObject *self, PyObject *args)
 callback for the touch() method

Detailed Description

The python export class for DocumentObject.

Definition at line 20 of file DocumentObjectPy.h.


Member Typedef Documentation


Constructor & Destructor Documentation

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.


Member Function Documentation

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
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
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]
Py::List DocumentObjectPy::getState ( void   )  const
virtual PyTypeObject* App::DocumentObjectPy::GetType ( void   )  [inline, virtual]
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().

PyObject * DocumentObjectPy::purgeTouched ( PyObject args  ) 

implementer for the purgeTouched() method

Definition at line 70 of file DocumentObjectPyImp.cpp.

References getDocumentObjectPtr(), App::DocumentObject::purgeTouched(), and Py_Return.

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

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.

PyObject * DocumentObjectPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]
std::string DocumentObjectPy::representation ( void   )  const
int DocumentObjectPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)
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().

PyObject * DocumentObjectPy::staticCallback_getInList ( PyObject self,
void *  closure 
) [static]

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

PyObject * DocumentObjectPy::staticCallback_getName ( PyObject self,
void *  closure 
) [static]

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

PyObject * DocumentObjectPy::staticCallback_getOutList ( PyObject self,
void *  closure 
) [static]

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

PyObject * DocumentObjectPy::staticCallback_getState ( PyObject self,
void *  closure 
) [static]

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

PyObject * DocumentObjectPy::staticCallback_touch ( PyObject self,
PyObject args 
) [static]
PyObject * DocumentObjectPy::touch ( PyObject args  ) 

implementer for the touch() method

Definition at line 62 of file DocumentObjectPyImp.cpp.

References getDocumentObjectPtr(), Py_Return, and App::DocumentObject::touch().


Member Data Documentation

PyGetSetDef DocumentObjectPy::GetterSetter [static]
PyMethodDef DocumentObjectPy::Methods [static]
Initial value:
 {
    {"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]
PyTypeObject DocumentObjectPy::Type [static]

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

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