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>

Public Member Functions

 FeaturePythonT ()
 
PyObjectgetPyObject (void)
 
void setPyObject (PyObject *obj)
 
virtual ~FeaturePythonT ()
 
methods override DocumentObject
short mustExecute () const
 
virtual DocumentObjectExecReturnexecute (void)
 recalculate the Feature More...
 
virtual const char * getViewProviderName (void) const
 returns the type name of the ViewProvider More...
 
Access properties
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)
 
virtual bool removeDynamicProperty (const char *name)
 
std::vector< std::string > getDynamicPropertyNames () const
 
PropertygetDynamicPropertyByName (const char *name) const
 
virtual void addDynamicProperties (const PropertyContainer *cont)
 
virtual void getPropertyList (std::vector< Property * > &List) const
 get all properties of the class (including properties of the parent) More...
 
void getPropertyMap (std::map< std::string, Property * > &Map) const
 get all properties of the class (including parent) More...
 
virtual PropertygetPropertyByName (const char *name) const
 find a property by its name More...
 
virtual const char * getPropertyName (const Property *prop) const
 get the name of a property More...
 
Property attributes
short getPropertyType (const Property *prop) const
 get the Type of a Property More...
 
short getPropertyType (const char *name) const
 get the Type of a named Property More...
 
const char * getPropertyGroup (const Property *prop) const
 get the Group of a Property More...
 
const char * getPropertyGroup (const char *name) const
 get the Group of a named Property More...
 
const char * getPropertyDocumentation (const Property *prop) const
 get the Documentation of a Property More...
 
const char * getPropertyDocumentation (const char *name) const
 get the Group of a named Property More...
 
Property serialization
void Save (Base::Writer &writer) const
 
void Restore (Base::XMLReader &reader)
 

Protected Member Functions

virtual void onBeforeChange (const Property *prop)
 
virtual void onChanged (const Property *prop)
 
virtual void onDocumentRestored ()
 

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

Constructor & Destructor Documentation

template<class FeatureT >
App::FeaturePythonT< FeatureT >::FeaturePythonT ( )
inline
template<class FeatureT >
virtual App::FeaturePythonT< FeatureT >::~FeaturePythonT ( )
inlinevirtual

Member Function Documentation

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::addDynamicProperties ( const PropertyContainer cont)
inlinevirtual
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 >
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 Property* App::FeaturePythonT< FeatureT >::getPropertyByName ( const char *  name) const
inlinevirtual
template<class FeatureT >
const char* App::FeaturePythonT< FeatureT >::getPropertyDocumentation ( const Property prop) const
inline

get the Documentation of a Property

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

get the Group of a named Property

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

get the Group of a Property

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

get the Group of a named Property

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

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

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

get all properties of the class (including parent)

template<class FeatureT >
virtual const char* App::FeaturePythonT< FeatureT >::getPropertyName ( const Property prop) const
inlinevirtual

get the name of a property

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

get the Type of a Property

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

get the Type of a named Property

const char * App::GeometryPython::getViewProviderName ( void  ) const
inlinevirtual
template<class FeatureT >
short App::FeaturePythonT< FeatureT >::mustExecute ( void  ) const
inline
template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onBeforeChange ( const Property prop)
inlineprotectedvirtual
template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onChanged ( const Property prop)
inlineprotectedvirtual
template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onDocumentRestored ( )
inlineprotectedvirtual
template<class FeatureT >
virtual bool App::FeaturePythonT< FeatureT >::removeDynamicProperty ( const char *  name)
inlinevirtual
template<class FeatureT >
void App::FeaturePythonT< FeatureT >::Restore ( Base::XMLReader reader)
inline
template<class FeatureT >
void App::FeaturePythonT< FeatureT >::Save ( Base::Writer writer) const
inline
template<class FeatureT >
void App::FeaturePythonT< FeatureT >::setPyObject ( PyObject obj)
inline

The documentation for this class was generated from the following files:
  • src/src/App/FeaturePython.h
  • src/src/App/FeaturePython.cpp