Part::TopoShapeSolidPy Class Reference

The python export class for TopoShape. More...

#include <TopoShapeSolidPy.h>

Inheritance diagram for Part::TopoShapeSolidPy:
Part::TopoShapePy Data::ComplexGeoDataPy Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef TopoShapePointerType

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.
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
virtual PyParentObjectGetParents (void)
TopoShapegetTopoShapePtr (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)
 TopoShapeSolidPy (TopoShape *pcObject, PyTypeObject *T=&Type)
 ~TopoShapeSolidPy ()

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of TopoShapeSolidPy.
static PyMethodDef Methods []
 Methods structure of TopoShapeSolidPy.
static PyParentObject Parents [] = { PARENTSPartTopoShapeSolidPy }
static PyTypeObject Type
 Type structure of TopoShapeSolidPy.

callbacks and implementers for the python object attributes



Py::Object getCenterOfMass (void) const
 getter for the CenterOfMass attribute
Py::Object getOuterShell (void) const
 getter for the OuterShell attribute
static PyObjectstaticCallback_getCenterOfMass (PyObject *self, void *closure)
 getter callback for the CenterOfMass attribute
static PyObjectstaticCallback_getOuterShell (PyObject *self, void *closure)
 getter callback for the OuterShell attribute
static int staticCallback_setCenterOfMass (PyObject *self, PyObject *value, void *closure)
 setter callback for the CenterOfMass attribute
static int staticCallback_setOuterShell (PyObject *self, PyObject *value, void *closure)
 setter callback for the OuterShell attribute

Detailed Description

The python export class for TopoShape.

Definition at line 20 of file TopoShapeSolidPy.h.


Member Typedef Documentation

Reimplemented from Part::TopoShapePy.

Definition at line 36 of file TopoShapeSolidPy.h.


Constructor & Destructor Documentation

TopoShapeSolidPy::TopoShapeSolidPy ( TopoShape pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 171 of file TopoShapeSolidPy.cpp.

Referenced by PyMake().

TopoShapeSolidPy::~TopoShapeSolidPy (  ) 

Definition at line 180 of file TopoShapeSolidPy.cpp.


Member Function Documentation

PyObject * TopoShapeSolidPy::_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 195 of file TopoShapeSolidPy.cpp.

References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().

PyObject * TopoShapeSolidPy::_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 187 of file TopoShapeSolidPy.cpp.

References representation().

int TopoShapeSolidPy::_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 263 of file TopoShapeSolidPy.cpp.

References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().

Py::Object TopoShapeSolidPy::getCenterOfMass ( void   )  const

getter for the CenterOfMass attribute

Definition at line 94 of file TopoShapeSolidPyImp.cpp.

References getTopoShapePtr().

Referenced by staticCallback_getCenterOfMass().

PyObject * TopoShapeSolidPy::getCustomAttributes ( const char *  attr  )  const

getter method for special attributes (e.g. dynamic ones)

Reimplemented from Part::TopoShapePy.

Definition at line 111 of file TopoShapeSolidPyImp.cpp.

Referenced by _getattr().

Py::Object TopoShapeSolidPy::getOuterShell ( void   )  const

getter for the OuterShell attribute

Definition at line 102 of file TopoShapeSolidPyImp.cpp.

References Part::TopoShape::_Shape, getTopoShapePtr(), and Mesh2Shape::shell.

Referenced by staticCallback_getOuterShell().

virtual PyParentObject* Part::TopoShapeSolidPy::GetParents ( void   )  [inline, virtual]

Reimplemented from Part::TopoShapePy.

Definition at line 28 of file TopoShapeSolidPy.h.

TopoShape * TopoShapeSolidPy::getTopoShapePtr ( void   )  const

getter for the object handled by this class

Reimplemented from Part::TopoShapePy.

Definition at line 322 of file TopoShapeSolidPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by getCenterOfMass(), getOuterShell(), PyInit(), and representation().

virtual PyTypeObject* Part::TopoShapeSolidPy::GetType ( void   )  [inline, virtual]

Reimplemented from Part::TopoShapePy.

Definition at line 27 of file TopoShapeSolidPy.h.

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

PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).

Reimplemented from Part::TopoShapePy.

Definition at line 63 of file TopoShapeSolidPyImp.cpp.

References Part::TopoShape::_Shape, RobotExampleTrajectoryOutOfShapes::count, getTopoShapePtr(), and Part::TopoShapePy::Type.

PyObject * TopoShapeSolidPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]

Reimplemented from Part::TopoShapePy.

Definition at line 56 of file TopoShapeSolidPyImp.cpp.

References TopoShapeSolidPy().

std::string TopoShapeSolidPy::representation ( void   )  const

Reimplemented from Part::TopoShapePy.

Definition at line 48 of file TopoShapeSolidPyImp.cpp.

References getTopoShapePtr().

Referenced by _repr().

int TopoShapeSolidPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

setter for special attributes (e.g. dynamic ones)

Reimplemented from Part::TopoShapePy.

Definition at line 116 of file TopoShapeSolidPyImp.cpp.

Referenced by _setattr().

PyObject * TopoShapeSolidPy::staticCallback_getCenterOfMass ( PyObject self,
void *  closure 
) [static]

getter callback for the CenterOfMass attribute

Definition at line 100 of file TopoShapeSolidPy.cpp.

References getCenterOfMass(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().

PyObject * TopoShapeSolidPy::staticCallback_getOuterShell ( PyObject self,
void *  closure 
) [static]

getter callback for the OuterShell attribute

Definition at line 132 of file TopoShapeSolidPy.cpp.

References getOuterShell(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().

int TopoShapeSolidPy::staticCallback_setCenterOfMass ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the CenterOfMass attribute

Definition at line 118 of file TopoShapeSolidPy.cpp.

References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().

int TopoShapeSolidPy::staticCallback_setOuterShell ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the OuterShell attribute

Definition at line 150 of file TopoShapeSolidPy.cpp.

References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().


Member Data Documentation

PyGetSetDef TopoShapeSolidPy::GetterSetter [static]
Initial value:
 {
    {"CenterOfMass",
        (getter) staticCallback_getCenterOfMass,
        (setter) staticCallback_setCenterOfMass, 
        "Returns the center of mass of the current system.\nIf the gravitational field is uniform, it is the center of gravity.\nThe coordinates returned for the center of mass are expressed in the\nabsolute Cartesian coordinate system.",
        NULL
    },
    {"OuterShell",
        (getter) staticCallback_getOuterShell,
        (setter) staticCallback_setOuterShell, 
        "\nReturns the outer most shell of this solid or an null\nshape if the solid has no shells",
        NULL
    },
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of TopoShapeSolidPy.

Reimplemented from Part::TopoShapePy.

Definition at line 25 of file TopoShapeSolidPy.h.

PyMethodDef TopoShapeSolidPy::Methods [static]
Initial value:
 {
    {NULL, NULL, 0, NULL}               
}

Methods structure of TopoShapeSolidPy.

Reimplemented from Part::TopoShapePy.

Definition at line 24 of file TopoShapeSolidPy.h.

Referenced by _getattr().

PyParentObject TopoShapeSolidPy::Parents = { PARENTSPartTopoShapeSolidPy } [static]

Reimplemented from Part::TopoShapePy.

Definition at line 26 of file TopoShapeSolidPy.h.

PyTypeObject TopoShapeSolidPy::Type [static]

Type structure of TopoShapeSolidPy.

Reimplemented from Part::TopoShapePy.

Definition at line 23 of file TopoShapeSolidPy.h.

Referenced by Part::TopoShapeCompSolidPy::add(), initPart(), and Part::TopoShapeCompSolidPy::PyInit().


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

Generated on Wed Nov 23 19:02:37 2011 for FreeCAD by  doxygen 1.6.1