The python export class for Constraint. More...
#include <ConstraintPy.h>
Public Types | |
typedef Constraint * | 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. | |
ConstraintPy (Constraint *pcObject, PyTypeObject *T=&Type) | |
Constraint * | getConstraintPtr (void) const |
getter for the object handled by this class | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
virtual PyParentObject * | GetParents (void) |
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) | |
~ConstraintPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of ConstraintPy. | |
static PyMethodDef | Methods [] |
Methods structure of ConstraintPy. | |
static PyParentObject | Parents [] = { PARENTSSketcherConstraintPy } |
static PyTypeObject | Type |
Type structure of ConstraintPy. | |
callbacks and implementers for the python object attributes | |
| |
Py::Int | getFirst (void) const |
getter for the First attribute | |
Py::Int | getSecond (void) const |
getter for the Second attribute | |
void | setFirst (Py::Int arg) |
setter for the First attribute | |
void | setSecond (Py::Int arg) |
setter for the Second attribute | |
static PyObject * | staticCallback_getFirst (PyObject *self, void *closure) |
getter callback for the First attribute | |
static PyObject * | staticCallback_getSecond (PyObject *self, void *closure) |
getter callback for the Second attribute | |
static int | staticCallback_setFirst (PyObject *self, PyObject *value, void *closure) |
setter callback for the First attribute | |
static int | staticCallback_setSecond (PyObject *self, PyObject *value, void *closure) |
setter callback for the Second attribute |
The python export class for Constraint.
Definition at line 20 of file ConstraintPy.h.
Reimplemented from Base::PersistencePy.
Definition at line 36 of file ConstraintPy.h.
ConstraintPy::ConstraintPy | ( | Constraint * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 195 of file ConstraintPy.cpp.
Referenced by PyMake().
ConstraintPy::~ConstraintPy | ( | ) |
Definition at line 204 of file ConstraintPy.cpp.
PyObject * ConstraintPy::_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::PersistencePy.
Definition at line 219 of file ConstraintPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * ConstraintPy::_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::PersistencePy.
Definition at line 211 of file ConstraintPy.cpp.
References representation().
int ConstraintPy::_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::PersistencePy.
Definition at line 287 of file ConstraintPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
Constraint * ConstraintPy::getConstraintPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 346 of file ConstraintPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by Sketcher::SketchPy::addConstraint(), getFirst(), getSecond(), PyInit(), representation(), setFirst(), Sketcher::PropertyConstraintList::setPyObject(), and setSecond().
PyObject * ConstraintPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 334 of file ConstraintPyImp.cpp.
Referenced by _getattr().
Py::Int ConstraintPy::getFirst | ( | void | ) | const |
getter for the First attribute
Definition at line 314 of file ConstraintPyImp.cpp.
References getConstraintPtr().
Referenced by staticCallback_getFirst().
virtual PyParentObject* Sketcher::ConstraintPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 28 of file ConstraintPy.h.
Py::Int ConstraintPy::getSecond | ( | void | ) | const |
getter for the Second attribute
Definition at line 324 of file ConstraintPyImp.cpp.
References getConstraintPtr().
Referenced by staticCallback_getSecond().
virtual PyTypeObject* Sketcher::ConstraintPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 27 of file ConstraintPy.h.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PersistencePy.
Definition at line 40 of file ConstraintPyImp.cpp.
References Sketcher::Angle, Sketcher::Coincident, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::Equal, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Sketcher::Constraint::GeoUndef, getConstraintPtr(), Sketcher::Horizontal, Sketcher::none, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Radius, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::Symmetric, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::Type, Sketcher::Constraint::Value, and Sketcher::Vertical.
Reimplemented from Base::PersistencePy.
Definition at line 33 of file ConstraintPyImp.cpp.
References ConstraintPy().
std::string ConstraintPy::representation | ( | void | ) | const |
Reimplemented from Base::PersistencePy.
Definition at line 294 of file ConstraintPyImp.cpp.
References Sketcher::Angle, Sketcher::Coincident, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::Constraint::First, getConstraintPtr(), Sketcher::Horizontal, Sketcher::None, Sketcher::Parallel, result, Sketcher::Tangent, Type, and Sketcher::Vertical.
Referenced by _repr().
int ConstraintPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 339 of file ConstraintPyImp.cpp.
Referenced by _setattr().
void ConstraintPy::setFirst | ( | Py::Int | arg | ) |
setter for the First attribute
Definition at line 319 of file ConstraintPyImp.cpp.
References Sketcher::Constraint::First, and getConstraintPtr().
void ConstraintPy::setSecond | ( | Py::Int | arg | ) |
setter for the Second attribute
Definition at line 329 of file ConstraintPyImp.cpp.
References getConstraintPtr(), and Sketcher::Constraint::Second.
getter callback for the First attribute
Definition at line 100 of file ConstraintPy.cpp.
References getFirst(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Second attribute
Definition at line 144 of file ConstraintPy.cpp.
References getSecond(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
int ConstraintPy::staticCallback_setFirst | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the First attribute
Definition at line 118 of file ConstraintPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int ConstraintPy::staticCallback_setSecond | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Second attribute
Definition at line 162 of file ConstraintPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
PyGetSetDef ConstraintPy::GetterSetter [static] |
{ {"First", (getter) staticCallback_getFirst, (setter) staticCallback_setFirst, "First geometry index the Constraint referse to", NULL }, {"Second", (getter) staticCallback_getSecond, (setter) staticCallback_setSecond, "Second geometry index the Constraint referse to", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of ConstraintPy.
Reimplemented from Base::PersistencePy.
Definition at line 25 of file ConstraintPy.h.
PyMethodDef ConstraintPy::Methods [static] |
{ {NULL, NULL, 0, NULL} }
Methods structure of ConstraintPy.
Reimplemented from Base::PersistencePy.
Definition at line 24 of file ConstraintPy.h.
Referenced by _getattr().
PyParentObject ConstraintPy::Parents = { PARENTSSketcherConstraintPy } [static] |
Reimplemented from Base::PersistencePy.
Definition at line 26 of file ConstraintPy.h.
PyTypeObject ConstraintPy::Type [static] |
Type structure of ConstraintPy.
Reimplemented from Base::PersistencePy.
Definition at line 23 of file ConstraintPy.h.
Referenced by Sketcher::SketchPy::addConstraint(), Sketcher::SketchObjectPy::addConstraint(), initSketcher(), representation(), and Sketcher::PropertyConstraintList::setPyObject().