The python export class for PointKernel. More...
#include <PointsPy.h>
Public Types | |
typedef PointKernel * | 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) |
PointKernel * | getPointKernelPtr (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 PyObject * | PyMake (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 | |
| |
PyObject * | addPoints (PyObject *args) |
implementer for the addPoints() method | |
PyObject * | copy (PyObject *args) |
implementer for the copy() method | |
PyObject * | read (PyObject *args) |
implementer for the read() method | |
PyObject * | write (PyObject *args) |
implementer for the write() method | |
PyObject * | writeInventor (PyObject *args) |
implementer for the writeInventor() method | |
static PyObject * | staticCallback_addPoints (PyObject *self, PyObject *args) |
callback for the addPoints() method | |
static PyObject * | staticCallback_copy (PyObject *self, PyObject *args) |
callback for the copy() method | |
static PyObject * | staticCallback_read (PyObject *self, PyObject *args) |
callback for the read() method | |
static PyObject * | staticCallback_write (PyObject *self, PyObject *args) |
callback for the write() method | |
static PyObject * | staticCallback_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 PyObject * | staticCallback_getCountPoints (PyObject *self, void *closure) |
getter callback for the CountPoints attribute | |
static PyObject * | staticCallback_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 |
The python export class for PointKernel.
Definition at line 20 of file PointsPy.h.
typedef PointKernel* Points::PointsPy::PointerType |
Reimplemented from Data::ComplexGeoDataPy.
Definition at line 36 of file PointsPy.h.
PointsPy::PointsPy | ( | PointKernel * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 560 of file PointsPy.cpp.
PointsPy::~PointsPy | ( | ) |
Definition at line 569 of file PointsPy.cpp.
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().
implementer for the addPoints() method
Definition at line 128 of file PointsPyImp.cpp.
References Py::SeqBase< T >::begin(), Py::SeqBase< T >::end(), getPointKernelPtr(), PyType_Object::o, draftTools::p, Points::PointKernel::push_back(), Py_Return, Py::Vector::toVector(), Base::VectorPy::Type, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by PyInit().
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.
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.
Reimplemented from Data::ComplexGeoDataPy.
Definition at line 43 of file PointsPyImp.cpp.
References PointsPy().
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().
callback for the addPoints() method
Definition at line 413 of file PointsPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the copy() method
Definition at line 130 of file PointsPy.cpp.
References Base::Console(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
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().
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().
callback for the read() method
Definition at line 199 of file PointsPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
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().
callback for the write() method
Definition at line 275 of file PointsPy.cpp.
References Base::Console(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the writeInventor() method
Definition at line 344 of file PointsPy.cpp.
References Base::Console(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
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().
implementer for the writeInventor() method
Definition at line 111 of file PointsPyImp.cpp.
References Base::InventorBuilder::addPoint(), Points::PointKernel::begin(), Base::InventorBuilder::beginPoints(), Base::InventorBuilder::close(), Points::PointKernel::end(), Base::InventorBuilder::endPoints(), getPointKernelPtr(), Py::new_reference_to(), and result.
PyGetSetDef PointsPy::GetterSetter [static] |
{ {"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] |
{ {"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().