Sketcher::ConstraintPy Class Reference

The python export class for Constraint. More...

#include <ConstraintPy.h>

Inheritance diagram for Sketcher::ConstraintPy:
Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef ConstraintPointerType

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)
ConstraintgetConstraintPtr (void) const
 getter for the object handled by this class
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
virtual PyParentObjectGetParents (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 PyObjectPyMake (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 PyObjectstaticCallback_getFirst (PyObject *self, void *closure)
 getter callback for the First attribute
static PyObjectstaticCallback_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

Detailed Description

The python export class for Constraint.

Definition at line 20 of file ConstraintPy.h.


Member Typedef Documentation

Reimplemented from Base::PersistencePy.

Definition at line 36 of file ConstraintPy.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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
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.

int ConstraintPy::PyInit ( PyObject ,
PyObject  
) [virtual]
PyObject * ConstraintPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]

Reimplemented from Base::PersistencePy.

Definition at line 33 of file ConstraintPyImp.cpp.

References ConstraintPy().

std::string ConstraintPy::representation ( void   )  const
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.

PyObject * ConstraintPy::staticCallback_getFirst ( PyObject self,
void *  closure 
) [static]

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().

PyObject * ConstraintPy::staticCallback_getSecond ( PyObject self,
void *  closure 
) [static]

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().


Member Data Documentation

PyGetSetDef ConstraintPy::GetterSetter [static]
Initial value:
 {
    {"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]
Initial value:
 {
    {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]

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

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