App::FeaturePythonT< FeatureT > Class Template Reference

Generic Python feature class which allows to behave every DocumentObject derived class as Python feature -- simply by subclassing. More...

#include <FeaturePython.h>

List of all members.

Public Member Functions

 FeaturePythonT ()
PyObjectgetPyObject (void)
void setPyObject (PyObject *obj)
virtual ~FeaturePythonT ()
Access properties



virtual void addDynamicProperties (const PropertyContainer *cont)
PropertyaddDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false)
PropertygetDynamicPropertyByName (const char *name) const
std::vector< std::string > getDynamicPropertyNames () const
virtual const char * getName (const Property *prop) const
 get the name of a property
virtual PropertygetPropertyByName (const char *name) const
 find a property by its name
virtual void getPropertyList (std::vector< Property * > &List) const
 get all properties of the class (including properties of the parent)
void getPropertyMap (std::map< std::string, Property * > &Map) const
 get all properties of the class (including parent)
methods override DocumentObject



virtual DocumentObjectExecReturnexecute (void)
 recalculate the Feature
virtual const char * getViewProviderName (void) const
 returns the type name of the ViewProvider
short mustExecute () const
Property attributes



const char * getPropertyDocumentation (const char *name) const
 get the Group of a named Property
const char * getPropertyDocumentation (const Property *prop) const
 get the Group of a Property
const char * getPropertyGroup (const char *name) const
 get the Group of a named Property
const char * getPropertyGroup (const Property *prop) const
 get the Group of a Property
short getPropertyType (const char *name) const
 get the Type of a named Property
short getPropertyType (const Property *prop) const
 get the Type of a Property
bool isHidden (const char *name) const
 check if the named property is hidden
bool isHidden (const Property *prop) const
 check if the property is hidden
bool isReadOnly (const char *name) const
 check if the nameed property is read-only
bool isReadOnly (const Property *prop) const
 check if the property is read-only
Property serialization



void Restore (Base::XMLReader &reader)
void Save (Base::Writer &writer) const

Protected Member Functions

virtual void onChanged (const Property *prop)

Friends

class FeaturePythonPy

Detailed Description

template<class FeatureT>
class App::FeaturePythonT< FeatureT >

Generic Python feature class which allows to behave every DocumentObject derived class as Python feature -- simply by subclassing.

Author:
Werner Mayer

Definition at line 62 of file FeaturePython.h.


Constructor & Destructor Documentation

template<class FeatureT >
App::FeaturePythonT< FeatureT >::FeaturePythonT (  )  [inline]

Definition at line 67 of file FeaturePython.h.

References ADD_PROPERTY.

template<class FeatureT >
virtual App::FeaturePythonT< FeatureT >::~FeaturePythonT (  )  [inline, virtual]

Definition at line 73 of file FeaturePython.h.


Member Function Documentation

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::addDynamicProperties ( const PropertyContainer cont  )  [inline, virtual]

Definition at line 109 of file FeaturePython.h.

References App::DynamicProperty::addDynamicProperties().

template<class FeatureT >
Property* App::FeaturePythonT< FeatureT >::addDynamicProperty ( const char *  type,
const char *  name = 0,
const char *  group = 0,
const char *  doc = 0,
short  attr = 0,
bool  ro = false,
bool  hidden = false 
) [inline]
template<class FeatureT >
virtual DocumentObjectExecReturn* App::FeaturePythonT< FeatureT >::execute ( void   )  [inline, virtual]

recalculate the Feature

Definition at line 86 of file FeaturePython.h.

References App::FeaturePythonImp::execute().

template<class FeatureT >
Property* App::FeaturePythonT< FeatureT >::getDynamicPropertyByName ( const char *  name  )  const [inline]
template<class FeatureT >
std::vector<std::string> App::FeaturePythonT< FeatureT >::getDynamicPropertyNames (  )  const [inline]
template<class FeatureT >
virtual const char* App::FeaturePythonT< FeatureT >::getName ( const Property prop  )  const [inline, virtual]

get the name of a property

Definition at line 125 of file FeaturePython.h.

References App::DynamicProperty::getName().

template<class FeatureT >
virtual Property* App::FeaturePythonT< FeatureT >::getPropertyByName ( const char *  name  )  const [inline, virtual]

find a property by its name

Definition at line 121 of file FeaturePython.h.

References App::DynamicProperty::getPropertyByName().

template<class FeatureT >
const char* App::FeaturePythonT< FeatureT >::getPropertyDocumentation ( const char *  name  )  const [inline]

get the Group of a named Property

Definition at line 153 of file FeaturePython.h.

References App::DynamicProperty::getPropertyDocumentation().

template<class FeatureT >
const char* App::FeaturePythonT< FeatureT >::getPropertyDocumentation ( const Property prop  )  const [inline]

get the Group of a Property

Definition at line 149 of file FeaturePython.h.

References App::DynamicProperty::getPropertyDocumentation().

template<class FeatureT >
const char* App::FeaturePythonT< FeatureT >::getPropertyGroup ( const char *  name  )  const [inline]

get the Group of a named Property

Definition at line 145 of file FeaturePython.h.

References App::DynamicProperty::getPropertyGroup().

template<class FeatureT >
const char* App::FeaturePythonT< FeatureT >::getPropertyGroup ( const Property prop  )  const [inline]

get the Group of a Property

Definition at line 141 of file FeaturePython.h.

References App::DynamicProperty::getPropertyGroup().

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::getPropertyList ( std::vector< Property * > &  List  )  const [inline, virtual]

get all properties of the class (including properties of the parent)

Definition at line 113 of file FeaturePython.h.

References App::DynamicProperty::getPropertyList().

template<class FeatureT >
void App::FeaturePythonT< FeatureT >::getPropertyMap ( std::map< std::string, Property * > &  Map  )  const [inline]

get all properties of the class (including parent)

Definition at line 117 of file FeaturePython.h.

References App::DynamicProperty::getPropertyMap().

template<class FeatureT >
short App::FeaturePythonT< FeatureT >::getPropertyType ( const char *  name  )  const [inline]

get the Type of a named Property

Definition at line 137 of file FeaturePython.h.

References App::DynamicProperty::getPropertyType().

template<class FeatureT >
short App::FeaturePythonT< FeatureT >::getPropertyType ( const Property prop  )  const [inline]

get the Type of a Property

Definition at line 133 of file FeaturePython.h.

References App::DynamicProperty::getPropertyType().

template<class FeatureT >
PyObject* App::FeaturePythonT< FeatureT >::getPyObject ( void   )  [inline]
const char * App::GeometryPython::getViewProviderName ( void   )  const [inline, virtual]

returns the type name of the ViewProvider

Definition at line 90 of file FeaturePython.h.

Referenced by Part::FeatureExt::init().

template<class FeatureT >
bool App::FeaturePythonT< FeatureT >::isHidden ( const char *  name  )  const [inline]

check if the named property is hidden

Definition at line 169 of file FeaturePython.h.

References App::DynamicProperty::isHidden().

template<class FeatureT >
bool App::FeaturePythonT< FeatureT >::isHidden ( const Property prop  )  const [inline]

check if the property is hidden

Definition at line 165 of file FeaturePython.h.

References App::DynamicProperty::isHidden().

template<class FeatureT >
bool App::FeaturePythonT< FeatureT >::isReadOnly ( const char *  name  )  const [inline]

check if the nameed property is read-only

Definition at line 161 of file FeaturePython.h.

References App::DynamicProperty::isReadOnly().

template<class FeatureT >
bool App::FeaturePythonT< FeatureT >::isReadOnly ( const Property prop  )  const [inline]

check if the property is read-only

Definition at line 157 of file FeaturePython.h.

References App::DynamicProperty::isReadOnly().

template<class FeatureT >
short App::FeaturePythonT< FeatureT >::mustExecute ( void   )  const [inline]

Definition at line 80 of file FeaturePython.h.

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onChanged ( const Property prop  )  [inline, protected, virtual]

Definition at line 202 of file FeaturePython.h.

References App::FeaturePythonImp::onChanged().

template<class FeatureT >
void App::FeaturePythonT< FeatureT >::Restore ( Base::XMLReader reader  )  [inline]

Definition at line 180 of file FeaturePython.h.

References App::DynamicProperty::Restore().

template<class FeatureT >
void App::FeaturePythonT< FeatureT >::Save ( Base::Writer writer  )  const [inline]

Definition at line 176 of file FeaturePython.h.

References Base::Writer::ObjectName, and App::DynamicProperty::Save().

template<class FeatureT >
void App::FeaturePythonT< FeatureT >::setPyObject ( PyObject obj  )  [inline]

Definition at line 192 of file FeaturePython.h.

References Sketcher::None.


Friends And Related Function Documentation

template<class FeatureT >
friend class FeaturePythonPy [friend]

Definition at line 199 of file FeaturePython.h.

Referenced by App::FeaturePythonT< FeatureT >::getPyObject().


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