Base::PlacementPy Class Reference

The python export class for Placement. More...

#include <PlacementPy.h>

Inheritance diagram for Base::PlacementPy:
Base::PyObjectBase

List of all members.

Public Types

typedef PlacementPointerType

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)
PlacementgetPlacementPtr (void) const
 getter for the object handled by this class
virtual PyTypeObject * GetType (void)
 PlacementPy (Placement *pcObject, PyTypeObject *T=&Type)
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)
 ~PlacementPy ()

Static Public Member Functions

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

Static Public Attributes

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

callbacks and implementers for the python object methods



PyObjectcopy (PyObject *args)
 implementer for the copy() method
PyObjectinverse (PyObject *args)
 implementer for the inverse() method
PyObjectmove (PyObject *args)
 implementer for the move() method
PyObjectmultiply (PyObject *args)
 implementer for the multiply() method
PyObjectmultVec (PyObject *args)
 implementer for the multVec() method
PyObjecttoMatrix (PyObject *args)
 implementer for the toMatrix() method
static PyObjectstaticCallback_copy (PyObject *self, PyObject *args)
 callback for the copy() method
static PyObjectstaticCallback_inverse (PyObject *self, PyObject *args)
 callback for the inverse() method
static PyObjectstaticCallback_move (PyObject *self, PyObject *args)
 callback for the move() method
static PyObjectstaticCallback_multiply (PyObject *self, PyObject *args)
 callback for the multiply() method
static PyObjectstaticCallback_multVec (PyObject *self, PyObject *args)
 callback for the multVec() method
static PyObjectstaticCallback_toMatrix (PyObject *self, PyObject *args)
 callback for the toMatrix() method

callbacks and implementers for the python object attributes



Py::Object getBase (void) const
 getter for the Base attribute
Py::Object getRotation (void) const
 getter for the Rotation attribute
void setBase (Py::Object arg)
 setter for the Base attribute
void setRotation (Py::Object arg)
 setter for the Rotation attribute
static PyObjectstaticCallback_getBase (PyObject *self, void *closure)
 getter callback for the Base attribute
static PyObjectstaticCallback_getRotation (PyObject *self, void *closure)
 getter callback for the Rotation attribute
static int staticCallback_setBase (PyObject *self, PyObject *value, void *closure)
 setter callback for the Base attribute
static int staticCallback_setRotation (PyObject *self, PyObject *value, void *closure)
 setter callback for the Rotation attribute

Detailed Description

The python export class for Placement.

Definition at line 20 of file PlacementPy.h.


Member Typedef Documentation

Reimplemented from Base::PyObjectBase.

Definition at line 36 of file PlacementPy.h.


Constructor & Destructor Documentation

PlacementPy::PlacementPy ( Placement pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 692 of file PlacementPy.cpp.

Referenced by copy(), inverse(), multiply(), and PyMake().

PlacementPy::~PlacementPy (  ) 

Definition at line 701 of file PlacementPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.


Member Function Documentation

PyObject * PlacementPy::_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::PyObjectBase.

Definition at line 719 of file PlacementPy.cpp.

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

PyObject * PlacementPy::_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::PyObjectBase.

Definition at line 711 of file PlacementPy.cpp.

References representation().

int PlacementPy::_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::PyObjectBase.

Definition at line 787 of file PlacementPy.cpp.

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

PyObject * PlacementPy::copy ( PyObject args  ) 

implementer for the copy() method

Definition at line 149 of file PlacementPyImp.cpp.

References getPlacementPtr(), and PlacementPy().

Py::Object PlacementPy::getBase ( void   )  const

getter for the Base attribute

Definition at line 172 of file PlacementPyImp.cpp.

References getPlacementPtr().

Referenced by staticCallback_getBase().

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

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

Definition at line 208 of file PlacementPyImp.cpp.

Referenced by _getattr().

virtual PyParentObject* Base::PlacementPy::GetParents ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 28 of file PlacementPy.h.

Placement * PlacementPy::getPlacementPtr ( void   )  const

getter for the object handled by this class

Definition at line 846 of file PlacementPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by copy(), getBase(), getRotation(), inverse(), move(), multiply(), multVec(), PyInit(), setBase(), setRotation(), Gui::ViewProviderPy::setTransformation(), and toMatrix().

Py::Object PlacementPy::getRotation ( void   )  const

getter for the Rotation attribute

Definition at line 182 of file PlacementPyImp.cpp.

References getPlacementPtr().

Referenced by staticCallback_getRotation().

virtual PyTypeObject* Base::PlacementPy::GetType ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 27 of file PlacementPy.h.

PyObject * PlacementPy::inverse ( PyObject args  ) 

implementer for the inverse() method

Definition at line 164 of file PlacementPyImp.cpp.

References getPlacementPtr(), Base::Placement::inverse(), draftTools::p, and PlacementPy().

PyObject * PlacementPy::move ( PyObject args  ) 
PyObject * PlacementPy::multiply ( PyObject args  ) 

implementer for the multiply() method

Definition at line 130 of file PlacementPyImp.cpp.

References getPlacementPtr(), PlacementPy(), and Type.

PyObject * PlacementPy::multVec ( PyObject args  ) 
int PlacementPy::PyInit ( PyObject ,
PyObject  
) [virtual]

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

Reimplemented from Base::PyObjectBase.

Definition at line 61 of file PlacementPyImp.cpp.

References draftlibs::fcvec::angle(), D_PI, Base::Placement::fromMatrix(), getPlacementPtr(), draftTools::p, RobotExample::pos, Base::Placement::setPosition(), Base::Placement::setRotation(), Base::RotationPy::Type, Base::VectorPy::Type, Type, Base::MatrixPy::Type, and Py::value().

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

Definition at line 54 of file PlacementPyImp.cpp.

References PlacementPy().

std::string PlacementPy::representation ( void   )  const
void PlacementPy::setBase ( Py::Object  arg  ) 

setter for the Base attribute

Definition at line 177 of file PlacementPyImp.cpp.

References getPlacementPtr(), Base::Placement::setPosition(), and Base::toVector().

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

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

Definition at line 213 of file PlacementPyImp.cpp.

Referenced by _setattr().

void PlacementPy::setRotation ( Py::Object  arg  ) 
PyObject * PlacementPy::staticCallback_copy ( PyObject self,
PyObject args 
) [static]
PyObject * PlacementPy::staticCallback_getBase ( PyObject self,
void *  closure 
) [static]

getter callback for the Base attribute

Definition at line 597 of file PlacementPy.cpp.

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

PyObject * PlacementPy::staticCallback_getRotation ( PyObject self,
void *  closure 
) [static]

getter callback for the Rotation attribute

Definition at line 641 of file PlacementPy.cpp.

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

PyObject * PlacementPy::staticCallback_inverse ( PyObject self,
PyObject args 
) [static]
PyObject * PlacementPy::staticCallback_move ( PyObject self,
PyObject args 
) [static]
PyObject * PlacementPy::staticCallback_multiply ( PyObject self,
PyObject args 
) [static]
PyObject * PlacementPy::staticCallback_multVec ( PyObject self,
PyObject args 
) [static]
int PlacementPy::staticCallback_setBase ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Base attribute

Definition at line 615 of file PlacementPy.cpp.

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

int PlacementPy::staticCallback_setRotation ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Rotation attribute

Definition at line 659 of file PlacementPy.cpp.

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

PyObject * PlacementPy::staticCallback_toMatrix ( PyObject self,
PyObject args 
) [static]
PyObject * PlacementPy::toMatrix ( PyObject args  ) 

implementer for the toMatrix() method

Definition at line 156 of file PlacementPyImp.cpp.

References getPlacementPtr(), and Base::Placement::toMatrix().


Member Data Documentation

PyGetSetDef PlacementPy::GetterSetter [static]
Initial value:
 {
    {"Base",
        (getter) staticCallback_getBase,
        (setter) staticCallback_setBase, 
        "Vector to the Base Position of the Placement",
        NULL
    },
    {"Rotation",
        (getter) staticCallback_getRotation,
        (setter) staticCallback_setRotation, 
        "Orientation of the placement expressed as rotation",
        NULL
    },
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of PlacementPy.

Definition at line 25 of file PlacementPy.h.

PyMethodDef PlacementPy::Methods [static]

Methods structure of PlacementPy.

Reimplemented from Base::PyObjectBase.

Definition at line 24 of file PlacementPy.h.

Referenced by _getattr().

PyParentObject PlacementPy::Parents = { PARENTSBasePlacementPy } [static]

Reimplemented from Base::PyObjectBase.

Definition at line 26 of file PlacementPy.h.

PyTypeObject PlacementPy::Type [static]

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

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