The python export class for TopoShape. More...
#include <TopoShapeCompoundPy.h>
Public Types | |
typedef TopoShape * | 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) |
TopoShape * | getTopoShapePtr (void) const |
getter for the object handled by this class | |
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) | |
TopoShapeCompoundPy (TopoShape *pcObject, PyTypeObject *T=&Type) | |
~TopoShapeCompoundPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of TopoShapeCompoundPy. | |
static PyMethodDef | Methods [] |
Methods structure of TopoShapeCompoundPy. | |
static PyParentObject | Parents [] = { PARENTSPartTopoShapeCompoundPy } |
static PyTypeObject | Type |
Type structure of TopoShapeCompoundPy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | add (PyObject *args) |
implementer for the add() method | |
static PyObject * | staticCallback_add (PyObject *self, PyObject *args) |
callback for the add() method |
The python export class for TopoShape.
Definition at line 20 of file TopoShapeCompoundPy.h.
Reimplemented from Part::TopoShapePy.
Definition at line 36 of file TopoShapeCompoundPy.h.
Definition at line 176 of file TopoShapeCompoundPy.cpp.
Referenced by PyMake().
TopoShapeCompoundPy::~TopoShapeCompoundPy | ( | ) |
Definition at line 185 of file TopoShapeCompoundPy.cpp.
PyObject * TopoShapeCompoundPy::_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 Part::TopoShapePy.
Definition at line 200 of file TopoShapeCompoundPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * TopoShapeCompoundPy::_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 Part::TopoShapePy.
Definition at line 192 of file TopoShapeCompoundPy.cpp.
References representation().
int TopoShapeCompoundPy::_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 Part::TopoShapePy.
Definition at line 268 of file TopoShapeCompoundPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the add() method
Definition at line 81 of file TopoShapeCompoundPyImp.cpp.
References Part::TopoShape::_Shape, getTopoShapePtr(), Py_Return, and Part::TopoShapePy::Type.
PyObject * TopoShapeCompoundPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Part::TopoShapePy.
Definition at line 105 of file TopoShapeCompoundPyImp.cpp.
Referenced by _getattr().
virtual PyParentObject* Part::TopoShapeCompoundPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Part::TopoShapePy.
Definition at line 28 of file TopoShapeCompoundPy.h.
TopoShape * TopoShapeCompoundPy::getTopoShapePtr | ( | void | ) | const |
getter for the object handled by this class
Reimplemented from Part::TopoShapePy.
Definition at line 327 of file TopoShapeCompoundPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by add(), PyInit(), and representation().
virtual PyTypeObject* Part::TopoShapeCompoundPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Part::TopoShapePy.
Definition at line 27 of file TopoShapeCompoundPy.h.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Part::TopoShapePy.
Definition at line 50 of file TopoShapeCompoundPyImp.cpp.
References Part::TopoShape::_Shape, Py::SeqBase< T >::begin(), Py::SeqBase< T >::end(), getTopoShapePtr(), and Part::TopoShapePy::Type.
Reimplemented from Part::TopoShapePy.
Definition at line 44 of file TopoShapeCompoundPyImp.cpp.
References TopoShapeCompoundPy().
std::string TopoShapeCompoundPy::representation | ( | void | ) | const |
Reimplemented from Part::TopoShapePy.
Definition at line 37 of file TopoShapeCompoundPyImp.cpp.
References getTopoShapePtr().
Referenced by _repr().
int TopoShapeCompoundPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Part::TopoShapePy.
Definition at line 110 of file TopoShapeCompoundPyImp.cpp.
Referenced by _setattr().
callback for the add() method
Definition at line 93 of file TopoShapeCompoundPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyGetSetDef TopoShapeCompoundPy::GetterSetter [static] |
{ {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of TopoShapeCompoundPy.
Reimplemented from Part::TopoShapePy.
Definition at line 25 of file TopoShapeCompoundPy.h.
PyMethodDef TopoShapeCompoundPy::Methods [static] |
{ {"add", (PyCFunction) staticCallback_add, METH_VARARGS, "Add a shape to the compound." }, {NULL, NULL, 0, NULL} }
Methods structure of TopoShapeCompoundPy.
Reimplemented from Part::TopoShapePy.
Definition at line 24 of file TopoShapeCompoundPy.h.
Referenced by _getattr().
PyParentObject TopoShapeCompoundPy::Parents = { PARENTSPartTopoShapeCompoundPy } [static] |
Reimplemented from Part::TopoShapePy.
Definition at line 26 of file TopoShapeCompoundPy.h.
PyTypeObject TopoShapeCompoundPy::Type [static] |
Type structure of TopoShapeCompoundPy.
Reimplemented from Part::TopoShapePy.
Definition at line 23 of file TopoShapeCompoundPy.h.
Referenced by initPart().