App::MaterialPy Class Reference

The python export class for Material. More...

#include <MaterialPy.h>

Inheritance diagram for App::MaterialPy:
Base::PyObjectBase

List of all members.

Public Types

typedef MaterialPointerType

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)
MaterialgetMaterialPtr (void) const
 getter for the object handled by this class
virtual PyParentObjectGetParents (void)
virtual PyTypeObject * GetType (void)
 MaterialPy (Material *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)
 ~MaterialPy ()

Static Public Member Functions

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

Static Public Attributes

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

callbacks and implementers for the python object attributes



Py::Tuple getAmbientColor (void) const
 getter for the AmbientColor attribute
Py::Tuple getDiffuseColor (void) const
 getter for the DiffuseColor attribute
Py::Tuple getEmissiveColor (void) const
 getter for the EmissiveColor attribute
Py::Float getShininess (void) const
 getter for the Shininess attribute
Py::Tuple getSpecularColor (void) const
 getter for the SpecularColor attribute
Py::Float getTransparency (void) const
 getter for the Transparency attribute
void setAmbientColor (Py::Tuple arg)
 setter for the AmbientColor attribute
void setDiffuseColor (Py::Tuple arg)
 setter for the DiffuseColor attribute
void setEmissiveColor (Py::Tuple arg)
 setter for the EmissiveColor attribute
void setShininess (Py::Float arg)
 setter for the Shininess attribute
void setSpecularColor (Py::Tuple arg)
 setter for the SpecularColor attribute
void setTransparency (Py::Float arg)
 setter for the Transparency attribute
static PyObjectstaticCallback_getAmbientColor (PyObject *self, void *closure)
 getter callback for the AmbientColor attribute
static PyObjectstaticCallback_getDiffuseColor (PyObject *self, void *closure)
 getter callback for the DiffuseColor attribute
static PyObjectstaticCallback_getEmissiveColor (PyObject *self, void *closure)
 getter callback for the EmissiveColor attribute
static PyObjectstaticCallback_getShininess (PyObject *self, void *closure)
 getter callback for the Shininess attribute
static PyObjectstaticCallback_getSpecularColor (PyObject *self, void *closure)
 getter callback for the SpecularColor attribute
static PyObjectstaticCallback_getTransparency (PyObject *self, void *closure)
 getter callback for the Transparency attribute
static int staticCallback_setAmbientColor (PyObject *self, PyObject *value, void *closure)
 setter callback for the AmbientColor attribute
static int staticCallback_setDiffuseColor (PyObject *self, PyObject *value, void *closure)
 setter callback for the DiffuseColor attribute
static int staticCallback_setEmissiveColor (PyObject *self, PyObject *value, void *closure)
 setter callback for the EmissiveColor attribute
static int staticCallback_setShininess (PyObject *self, PyObject *value, void *closure)
 setter callback for the Shininess attribute
static int staticCallback_setSpecularColor (PyObject *self, PyObject *value, void *closure)
 setter callback for the SpecularColor attribute
static int staticCallback_setTransparency (PyObject *self, PyObject *value, void *closure)
 setter callback for the Transparency attribute

callbacks and implementers for the python object methods



PyObjectset (PyObject *args)
 implementer for the set() method
static PyObjectstaticCallback_set (PyObject *self, PyObject *args)
 callback for the set() method

Detailed Description

The python export class for Material.

Definition at line 20 of file MaterialPy.h.


Member Typedef Documentation

Reimplemented from Base::PyObjectBase.

Definition at line 36 of file MaterialPy.h.


Constructor & Destructor Documentation

MaterialPy::MaterialPy ( Material pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 476 of file MaterialPy.cpp.

MaterialPy::~MaterialPy (  ) 

Definition at line 497 of file MaterialPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.


Member Function Documentation

PyObject * MaterialPy::_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 515 of file MaterialPy.cpp.

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

PyObject * MaterialPy::_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 507 of file MaterialPy.cpp.

References representation().

int MaterialPy::_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 583 of file MaterialPy.cpp.

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

Py::Tuple MaterialPy::getAmbientColor ( void   )  const

getter for the AmbientColor attribute

Definition at line 51 of file MaterialPyImp.cpp.

References getMaterialPtr(), and Py::Tuple::setItem().

Referenced by staticCallback_getAmbientColor().

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

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

Definition at line 155 of file MaterialPyImp.cpp.

Referenced by _getattr().

Py::Tuple MaterialPy::getDiffuseColor ( void   )  const

getter for the DiffuseColor attribute

Definition at line 72 of file MaterialPyImp.cpp.

References getMaterialPtr(), and Py::Tuple::setItem().

Referenced by staticCallback_getDiffuseColor().

Py::Tuple MaterialPy::getEmissiveColor ( void   )  const

getter for the EmissiveColor attribute

Definition at line 93 of file MaterialPyImp.cpp.

References getMaterialPtr(), and Py::Tuple::setItem().

Referenced by staticCallback_getEmissiveColor().

Material * MaterialPy::getMaterialPtr ( void   )  const
virtual PyParentObject* App::MaterialPy::GetParents ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 28 of file MaterialPy.h.

Py::Float MaterialPy::getShininess ( void   )  const

getter for the Shininess attribute

Definition at line 135 of file MaterialPyImp.cpp.

References getMaterialPtr().

Referenced by staticCallback_getShininess().

Py::Tuple MaterialPy::getSpecularColor ( void   )  const

getter for the SpecularColor attribute

Definition at line 114 of file MaterialPyImp.cpp.

References getMaterialPtr(), and Py::Tuple::setItem().

Referenced by staticCallback_getSpecularColor().

Py::Float MaterialPy::getTransparency ( void   )  const

getter for the Transparency attribute

Definition at line 145 of file MaterialPyImp.cpp.

References getMaterialPtr().

Referenced by staticCallback_getTransparency().

virtual PyTypeObject* App::MaterialPy::GetType ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 27 of file MaterialPy.h.

int MaterialPy::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 489 of file MaterialPy.cpp.

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

Definition at line 481 of file MaterialPy.cpp.

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

Definition at line 35 of file MaterialPyImp.cpp.

Referenced by _repr().

PyObject * MaterialPy::set ( PyObject args  ) 

implementer for the set() method

Definition at line 40 of file MaterialPyImp.cpp.

References getMaterialPtr(), Py_Return, and App::Material::set().

void MaterialPy::setAmbientColor ( Py::Tuple  arg  ) 
int MaterialPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

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

Definition at line 160 of file MaterialPyImp.cpp.

Referenced by _setattr().

void MaterialPy::setDiffuseColor ( Py::Tuple  arg  ) 
void MaterialPy::setEmissiveColor ( Py::Tuple  arg  ) 
void MaterialPy::setShininess ( Py::Float  arg  ) 

setter for the Shininess attribute

Definition at line 140 of file MaterialPyImp.cpp.

References getMaterialPtr(), and App::Material::shininess.

void MaterialPy::setSpecularColor ( Py::Tuple  arg  ) 
void MaterialPy::setTransparency ( Py::Float  arg  ) 

setter for the Transparency attribute

Definition at line 150 of file MaterialPyImp.cpp.

References getMaterialPtr(), and App::Material::transparency.

PyObject * MaterialPy::staticCallback_getAmbientColor ( PyObject self,
void *  closure 
) [static]

getter callback for the AmbientColor attribute

Definition at line 205 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_getDiffuseColor ( PyObject self,
void *  closure 
) [static]

getter callback for the DiffuseColor attribute

Definition at line 249 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_getEmissiveColor ( PyObject self,
void *  closure 
) [static]

getter callback for the EmissiveColor attribute

Definition at line 293 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_getShininess ( PyObject self,
void *  closure 
) [static]

getter callback for the Shininess attribute

Definition at line 381 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_getSpecularColor ( PyObject self,
void *  closure 
) [static]

getter callback for the SpecularColor attribute

Definition at line 337 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_getTransparency ( PyObject self,
void *  closure 
) [static]

getter callback for the Transparency attribute

Definition at line 425 of file MaterialPy.cpp.

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

PyObject * MaterialPy::staticCallback_set ( PyObject self,
PyObject args 
) [static]
int MaterialPy::staticCallback_setAmbientColor ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the AmbientColor attribute

Definition at line 223 of file MaterialPy.cpp.

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

int MaterialPy::staticCallback_setDiffuseColor ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the DiffuseColor attribute

Definition at line 267 of file MaterialPy.cpp.

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

int MaterialPy::staticCallback_setEmissiveColor ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the EmissiveColor attribute

Definition at line 311 of file MaterialPy.cpp.

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

int MaterialPy::staticCallback_setShininess ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Shininess attribute

Definition at line 399 of file MaterialPy.cpp.

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

int MaterialPy::staticCallback_setSpecularColor ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the SpecularColor attribute

Definition at line 355 of file MaterialPy.cpp.

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

int MaterialPy::staticCallback_setTransparency ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Transparency attribute

Definition at line 443 of file MaterialPy.cpp.

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


Member Data Documentation

PyGetSetDef MaterialPy::GetterSetter [static]

Attribute structure of MaterialPy.

Definition at line 25 of file MaterialPy.h.

PyMethodDef MaterialPy::Methods [static]
Initial value:
 {
    {"set",
        (PyCFunction) staticCallback_set,
        METH_VARARGS,
        "\nSet(string) -- Set the material.\n\nThe material must be one of the following values:\nBrass, Bronze, Copper, Gold, Pewter, Plaster, Plastic, Silver, Steel, Stone, Shiny plastic,\nSatin, Metalized, Neon GNC, Chrome, Aluminium, Obsidian, Neon PHC, Jade, Ruby or Emerald.\n                      "
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of MaterialPy.

Reimplemented from Base::PyObjectBase.

Definition at line 24 of file MaterialPy.h.

Referenced by _getattr().

PyParentObject MaterialPy::Parents = { PARENTSAppMaterialPy } [static]

Reimplemented from Base::PyObjectBase.

Definition at line 26 of file MaterialPy.h.

PyTypeObject MaterialPy::Type [static]

Type structure of MaterialPy.

Reimplemented from Base::PyObjectBase.

Definition at line 23 of file MaterialPy.h.

Referenced by App::PropertyMaterial::setPyObject().


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

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