App::FeatureCustomT< FeatureT > Class Template Reference

FeatureCustomT is a template class to be used with DocumentObject or any of its subclasses as template parameter. More...

#include <FeatureCustom.h>

Public Member Functions

 FeatureCustomT ()
 
PyObjectgetPyObject (void)
 
void setPyObject (PyObject *obj)
 
virtual ~FeatureCustomT ()
 
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 ()
 
virtual void onSettingDocument ()
 

Detailed Description

template<class FeatureT>
class App::FeatureCustomT< FeatureT >

FeatureCustomT is a template class to be used with DocumentObject or any of its subclasses as template parameter.

FeatureCustomT offers a way to add or remove a property at runtime. This class is similar to FeaturePythonT with the difference that it has no support for in Python written feature classes.

Author
Werner Mayer

Constructor & Destructor Documentation

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

Member Function Documentation

template<class FeatureT >
virtual void App::FeatureCustomT< FeatureT >::addDynamicProperties ( const PropertyContainer cont)
inlinevirtual
template<class FeatureT >
Property* App::FeatureCustomT< 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::FeatureCustomT< FeatureT >::getDynamicPropertyByName ( const char *  name) const
inline
template<class FeatureT >
std::vector<std::string> App::FeatureCustomT< FeatureT >::getDynamicPropertyNames ( ) const
inline
template<class FeatureT >
virtual Property* App::FeatureCustomT< FeatureT >::getPropertyByName ( const char *  name) const
inlinevirtual

find a property by its name

References App::DynamicProperty::getPropertyByName().

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

get the Documentation of a Property

References App::DynamicProperty::getPropertyDocumentation().

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

get the Group of a named Property

References App::DynamicProperty::getPropertyDocumentation().

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

get the Group of a Property

References App::DynamicProperty::getPropertyGroup().

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

get the Group of a named Property

References App::DynamicProperty::getPropertyGroup().

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

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

References App::DynamicProperty::getPropertyList().

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

get all properties of the class (including parent)

References App::DynamicProperty::getPropertyMap().

template<class FeatureT >
virtual const char* App::FeatureCustomT< FeatureT >::getPropertyName ( const Property prop) const
inlinevirtual
template<class FeatureT >
short App::FeatureCustomT< FeatureT >::getPropertyType ( const Property prop) const
inline
template<class FeatureT >
short App::FeatureCustomT< FeatureT >::getPropertyType ( const char *  name) const
inline

get the Type of a named Property

References App::DynamicProperty::getPropertyType().

template<class FeatureT >
PyObject* App::FeatureCustomT< FeatureT >::getPyObject ( void  )
inline
template<class FeatureT >
virtual const char* App::FeatureCustomT< FeatureT >::getViewProviderName ( void  ) const
inlinevirtual

returns the type name of the ViewProvider

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

The documentation for this class was generated from the following file:
  • src/src/App/FeatureCustom.h