Points::PointsPy Class Reference

The python export class for PointKernel. More...

#include <PointsPy.h>

Inheritance diagram for Points::PointsPy:
Data::ComplexGeoDataPy Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef PointKernelPointerType

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)
PointKernelgetPointKernelPtr (void) const
 getter for the object handled by this class
virtual PyTypeObject * GetType (void)
 PointsPy (PointKernel *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)
 ~PointsPy ()

Static Public Member Functions

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

Static Public Attributes

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

callbacks and implementers for the python object methods



PyObjectaddPoints (PyObject *args)
 implementer for the addPoints() method
PyObjectcopy (PyObject *args)
 implementer for the copy() method
PyObjectread (PyObject *args)
 implementer for the read() method
PyObjectwrite (PyObject *args)
 implementer for the write() method
PyObjectwriteInventor (PyObject *args)
 implementer for the writeInventor() method
static PyObjectstaticCallback_addPoints (PyObject *self, PyObject *args)
 callback for the addPoints() method
static PyObjectstaticCallback_copy (PyObject *self, PyObject *args)
 callback for the copy() method
static PyObjectstaticCallback_read (PyObject *self, PyObject *args)
 callback for the read() method
static PyObjectstaticCallback_write (PyObject *self, PyObject *args)
 callback for the write() method
static PyObjectstaticCallback_writeInventor (PyObject *self, PyObject *args)
 callback for the writeInventor() method

callbacks and implementers for the python object attributes



Py::Int getCountPoints (void) const
 getter for the CountPoints attribute
Py::List getPoints (void) const
 getter for the Points attribute
static PyObjectstaticCallback_getCountPoints (PyObject *self, void *closure)
 getter callback for the CountPoints attribute
static PyObjectstaticCallback_getPoints (PyObject *self, void *closure)
 getter callback for the Points attribute
static int staticCallback_setCountPoints (PyObject *self, PyObject *value, void *closure)
 setter callback for the CountPoints attribute
static int staticCallback_setPoints (PyObject *self, PyObject *value, void *closure)
 setter callback for the Points attribute

Detailed Description

The python export class for PointKernel.

Definition at line 20 of file PointsPy.h.


Member Typedef Documentation

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 36 of file PointsPy.h.


Constructor & Destructor Documentation

PointsPy::PointsPy ( PointKernel pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 560 of file PointsPy.cpp.

Referenced by copy(), and PyMake().

PointsPy::~PointsPy (  ) 

Definition at line 569 of file PointsPy.cpp.


Member Function Documentation

PyObject * PointsPy::_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 Data::ComplexGeoDataPy.

Definition at line 584 of file PointsPy.cpp.

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

PyObject * PointsPy::_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 Data::ComplexGeoDataPy.

Definition at line 576 of file PointsPy.cpp.

References representation().

int PointsPy::_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 Data::ComplexGeoDataPy.

Definition at line 652 of file PointsPy.cpp.

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

PyObject * PointsPy::addPoints ( PyObject args  ) 
PyObject * PointsPy::copy ( PyObject args  ) 

implementer for the copy() method

Definition at line 74 of file PointsPyImp.cpp.

References getPointKernelPtr(), and PointsPy().

Py::Int PointsPy::getCountPoints ( void   )  const

getter for the CountPoints attribute

Definition at line 164 of file PointsPyImp.cpp.

References getPointKernelPtr().

Referenced by staticCallback_getCountPoints().

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

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

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 179 of file PointsPyImp.cpp.

Referenced by _getattr().

virtual PyParentObject* Points::PointsPy::GetParents ( void   )  [inline, virtual]

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 28 of file PointsPy.h.

PointKernel * PointsPy::getPointKernelPtr ( void   )  const

getter for the object handled by this class

Definition at line 711 of file PointsPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by addPoints(), copy(), getCountPoints(), getPoints(), PyInit(), read(), Points::PropertyPointKernel::setPyObject(), show(), write(), and writeInventor().

Py::List PointsPy::getPoints ( void   )  const

getter for the Points attribute

Definition at line 169 of file PointsPyImp.cpp.

References Py::List::append(), Points::PointKernel::begin(), Points::PointKernel::end(), and getPointKernelPtr().

Referenced by staticCallback_getPoints().

virtual PyTypeObject* Points::PointsPy::GetType ( void   )  [inline, virtual]

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 27 of file PointsPy.h.

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

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

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 50 of file PointsPyImp.cpp.

References addPoints(), getPointKernelPtr(), Points::PointKernel::load(), and Type.

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

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 43 of file PointsPyImp.cpp.

References PointsPy().

PyObject * PointsPy::read ( PyObject args  ) 

implementer for the read() method

Definition at line 85 of file PointsPyImp.cpp.

References getPointKernelPtr(), Points::PointKernel::load(), PY_CATCH, Py_Return, and PY_TRY.

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

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 38 of file PointsPyImp.cpp.

Referenced by _repr().

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

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

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 184 of file PointsPyImp.cpp.

Referenced by _setattr().

PyObject * PointsPy::staticCallback_addPoints ( PyObject self,
PyObject args 
) [static]
PyObject * PointsPy::staticCallback_copy ( PyObject self,
PyObject args 
) [static]
PyObject * PointsPy::staticCallback_getCountPoints ( PyObject self,
void *  closure 
) [static]

getter callback for the CountPoints attribute

Definition at line 489 of file PointsPy.cpp.

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

PyObject * PointsPy::staticCallback_getPoints ( PyObject self,
void *  closure 
) [static]

getter callback for the Points attribute

Definition at line 521 of file PointsPy.cpp.

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

PyObject * PointsPy::staticCallback_read ( PyObject self,
PyObject args 
) [static]
int PointsPy::staticCallback_setCountPoints ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the CountPoints attribute

Definition at line 507 of file PointsPy.cpp.

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

int PointsPy::staticCallback_setPoints ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Points attribute

Definition at line 539 of file PointsPy.cpp.

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

PyObject * PointsPy::staticCallback_write ( PyObject self,
PyObject args 
) [static]
PyObject * PointsPy::staticCallback_writeInventor ( PyObject self,
PyObject args 
) [static]
PyObject * PointsPy::write ( PyObject args  ) 

implementer for the write() method

Definition at line 98 of file PointsPyImp.cpp.

References getPointKernelPtr(), PY_CATCH, Py_Return, PY_TRY, and Points::PointKernel::save().

PyObject * PointsPy::writeInventor ( PyObject args  ) 

Member Data Documentation

PyGetSetDef PointsPy::GetterSetter [static]
Initial value:
 {
    {"CountPoints",
        (getter) staticCallback_getCountPoints,
        (setter) staticCallback_setCountPoints, 
        "Return the number of vertices of the points object.",
        NULL
    },
    {"Points",
        (getter) staticCallback_getPoints,
        (setter) staticCallback_setPoints, 
        "A collection of points\nWith this attribute it is possible to get access to the points of the object\n\nfor p in pnt.Points:\n print p\n\n                             ",
        NULL
    },
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of PointsPy.

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 25 of file PointsPy.h.

PyMethodDef PointsPy::Methods [static]
Initial value:
 {
    {"copy",
        (PyCFunction) staticCallback_copy,
        METH_VARARGS,
        "Create a copy of this points object"
    },
    {"read",
        (PyCFunction) staticCallback_read,
        METH_VARARGS,
        "Read in a points object from file."
    },
    {"write",
        (PyCFunction) staticCallback_write,
        METH_VARARGS,
        "Write the points object into file."
    },
    {"writeInventor",
        (PyCFunction) staticCallback_writeInventor,
        METH_VARARGS,
        "Write the points in OpenInventor format to a string."
    },
    {"addPoints",
        (PyCFunction) staticCallback_addPoints,
        METH_VARARGS,
        "add one or more (list of) points to the object"
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of PointsPy.

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 24 of file PointsPy.h.

Referenced by _getattr().

PyParentObject PointsPy::Parents = { PARENTSPointsPointsPy } [static]

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 26 of file PointsPy.h.

PyTypeObject PointsPy::Type [static]

Type structure of PointsPy.

Reimplemented from Data::ComplexGeoDataPy.

Definition at line 23 of file PointsPy.h.

Referenced by initPoints(), PyInit(), and Points::PropertyPointKernel::setPyObject().


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

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