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 () | |
| PyObject * | getPyObject (void) |
| void | setPyObject (PyObject *obj) |
| virtual | ~FeaturePythonT () |
Access properties | |
| virtual void | addDynamicProperties (const PropertyContainer *cont) |
| Property * | 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) |
| Property * | getDynamicPropertyByName (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 Property * | getPropertyByName (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 DocumentObjectExecReturn * | execute (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 |
Generic Python feature class which allows to behave every DocumentObject derived class as Python feature -- simply by subclassing.
Definition at line 62 of file FeaturePython.h.
| App::FeaturePythonT< FeatureT >::FeaturePythonT | ( | ) | [inline] |
Definition at line 67 of file FeaturePython.h.
References ADD_PROPERTY.
| virtual App::FeaturePythonT< FeatureT >::~FeaturePythonT | ( | ) | [inline, virtual] |
Definition at line 73 of file FeaturePython.h.
| virtual void App::FeaturePythonT< FeatureT >::addDynamicProperties | ( | const PropertyContainer * | cont | ) | [inline, virtual] |
Definition at line 109 of file FeaturePython.h.
References App::DynamicProperty::addDynamicProperties().
| 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] |
Definition at line 97 of file FeaturePython.h.
References App::DynamicProperty::addDynamicProperty(), and group.
Referenced by Part::FeaturePythonPy::addProperty().
| virtual DocumentObjectExecReturn* App::FeaturePythonT< FeatureT >::execute | ( | void | ) | [inline, virtual] |
recalculate the Feature
Definition at line 86 of file FeaturePython.h.
References App::FeaturePythonImp::execute().
| Property* App::FeaturePythonT< FeatureT >::getDynamicPropertyByName | ( | const char * | name | ) | const [inline] |
Definition at line 106 of file FeaturePython.h.
References App::DynamicProperty::getDynamicPropertyByName().
Referenced by Part::FeaturePythonPy::getCustomAttributes(), and Part::FeaturePythonPy::setCustomAttributes().
| std::vector<std::string> App::FeaturePythonT< FeatureT >::getDynamicPropertyNames | ( | ) | const [inline] |
Definition at line 103 of file FeaturePython.h.
References App::DynamicProperty::getDynamicPropertyNames().
Referenced by Part::FeaturePythonPy::getCustomAttributes().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| PyObject* App::FeaturePythonT< FeatureT >::getPyObject | ( | void | ) | [inline] |
Definition at line 185 of file FeaturePython.h.
References Py::_None(), App::FeaturePythonT< FeatureT >::FeaturePythonPy, and Py::new_reference_to().
Referenced by Part::FeatureExt::init().
| 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().
| 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().
| 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().
| 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().
| 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().
| short App::FeaturePythonT< FeatureT >::mustExecute | ( | void | ) | const [inline] |
Definition at line 80 of file FeaturePython.h.
| virtual void App::FeaturePythonT< FeatureT >::onChanged | ( | const Property * | prop | ) | [inline, protected, virtual] |
Definition at line 202 of file FeaturePython.h.
References App::FeaturePythonImp::onChanged().
| void App::FeaturePythonT< FeatureT >::Restore | ( | Base::XMLReader & | reader | ) | [inline] |
Definition at line 180 of file FeaturePython.h.
References App::DynamicProperty::Restore().
| 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().
| void App::FeaturePythonT< FeatureT >::setPyObject | ( | PyObject * | obj | ) | [inline] |
Definition at line 192 of file FeaturePython.h.
References Sketcher::None.
friend class FeaturePythonPy [friend] |
Definition at line 199 of file FeaturePython.h.
Referenced by App::FeaturePythonT< FeatureT >::getPyObject().
1.6.1