#include <GroupExtension.h>
Public Member Functions | |
GroupExtension (void) | |
Constructor. More... | |
virtual | ~GroupExtension () |
Public Member Functions inherited from App::DocumentObjectExtension | |
DocumentObjectExtension () | |
virtual bool | extensionGetLinkedObject (DocumentObject *&ret, bool recursive, Base::Matrix4D *mat, bool transform, int depth) const |
Get the linked object. More... | |
virtual bool | extensionHasChildElement () const |
virtual int | extensionIsElementVisible (const char *) |
virtual short | extensionMustExecute (void) |
virtual int | extensionSetElementVisible (const char *, bool) |
App::DocumentObject * | getExtendedObject () |
const App::DocumentObject * | getExtendedObject () const |
virtual const char * | getViewProviderExtensionName (void) const |
returns the type name of the ViewProviderExtension which is automatically attached to the viewprovider object when it is initiated More... | |
virtual void | onExtendedDocumentRestored () |
get called after a document has been fully restored More... | |
virtual void | onExtendedSettingDocument () |
get called after setting the document More... | |
virtual void | onExtendedSetupObject () |
get called after a brand new object was created More... | |
virtual void | onExtendedUnsetupObject () |
get called when object is going to be removed from the document More... | |
virtual | ~DocumentObjectExtension () |
Public Member Functions inherited from App::Extension | |
Extension () | |
App::ExtensionContainer * | getExtendedContainer () |
const App::ExtensionContainer * | getExtendedContainer () const |
virtual void | initExtension (App::ExtensionContainer *obj) |
bool | isPythonExtension () |
std::string | name () const |
virtual | ~Extension () |
virtual Property * | extensionGetPropertyByName (const char *name) const |
find a property by its name More... | |
virtual const char * | extensionGetPropertyName (const Property *prop) const |
get the name of a property More... | |
virtual void | extensionGetPropertyMap (std::map< std::string, Property * > &Map) const |
get all properties of the class (including properties of the parent) More... | |
virtual void | extensionGetPropertyList (std::vector< Property * > &List) const |
get all properties of the class (including properties of the parent) More... | |
virtual short | extensionGetPropertyType (const Property *prop) const |
get the Type of a Property More... | |
virtual short | extensionGetPropertyType (const char *name) const |
get the Type of a named Property More... | |
virtual const char * | extensionGetPropertyGroup (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyGroup (const char *name) const |
get the Group of a named Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const char *name) const |
get the Group of a named Property More... | |
virtual void | extensionSave (Base::Writer &) const |
virtual void | extensionRestore (Base::XMLReader &) |
bool | extensionIsDerivedFrom (const Base::Type type) const |
Object handling | |
PropertyLinkList | Group |
Properties. More... | |
virtual DocumentObject * | addObject (const char *sType, const char *pObjectName) |
Adds an object of sType with pObjectName to the document this group belongs to and append it to this group as well. More... | |
virtual std::vector< DocumentObject * > | addObject (DocumentObject *obj) |
virtual std::vector< DocumentObject * > | addObjects (std::vector< DocumentObject * > obj) |
virtual std::vector< DocumentObject * > | setObjects (std::vector< DocumentObject * > obj) |
virtual bool | allowObject (DocumentObject *) |
virtual std::vector< DocumentObject * > | removeObject (DocumentObject *obj) |
Removes an object from this group. More... | |
virtual std::vector< DocumentObject * > | removeObjects (std::vector< DocumentObject * > obj) |
Removes objects from this group. More... | |
virtual void | removeObjectsFromDocument () |
Removes all children objects from this group and the document. More... | |
DocumentObject * | getObject (const char *Name) const |
Returns the object of this group with Name. More... | |
virtual bool | hasObject (const DocumentObject *obj, bool recursive=false) const |
Checks whether the object obj is part of this group. More... | |
bool | isChildOf (const GroupExtension *group, bool recursive=true) const |
Checks whether this group object is a child (or sub-child if enabled) of the given group object. More... | |
const std::vector< DocumentObject * > & | getObjects () const |
Returns a list of all objects this group does have. More... | |
std::vector< DocumentObject * > | getObjectsOfType (const Base::Type &typeId) const |
Returns a list of all objects of typeId this group does have. More... | |
int | countObjectsOfType (const Base::Type &typeId) const |
Returns the number of objects of typeId this group does have. More... | |
virtual PyObject * | getExtensionPyObject (void) override |
virtual void | extensionOnChanged (const Property *p) override |
virtual bool | extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override |
Get the sub object by name. More... | |
virtual bool | extensionGetSubObjects (std::vector< std::string > &ret, int reason) const override |
Get name references of all sub objects. More... | |
virtual App::DocumentObjectExecReturn * | extensionExecute (void) override |
std::vector< DocumentObject * > | getAllChildren () const |
void | getAllChildren (std::vector< DocumentObject * > &, std::set< DocumentObject * > &) const |
static DocumentObject * | getGroupOfObject (const DocumentObject *obj) |
Returns the object group of the document which the given object obj is part of. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from App::Extension | |
void | initExtensionType (Base::Type type) |
Static Protected Member Functions inherited from App::Extension | |
static void | initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=0) |
Protected Attributes inherited from App::Extension | |
bool | m_isPythonExtension = false |
Py::Object | ExtensionPythonObject |
Constructor & Destructor Documentation
◆ GroupExtension()
GroupExtension::GroupExtension | ( | void | ) |
Constructor.
References Group, App::Extension::initExtensionType(), App::Prop_Hidden, App::Prop_None, and App::Prop_Transient.
Referenced by PartDesign::Body::addObject().
◆ ~GroupExtension()
|
virtual |
Member Function Documentation
◆ addObject() [1/2]
|
virtual |
Adds an object of sType with pObjectName to the document this group belongs to and append it to this group as well.
References App::Document::addObject(), allowObject(), App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), and App::Document::removeObject().
Referenced by App::GroupExtensionPy::addObject(), addObjects(), Gui::Document::addRootObjectsToGroup(), ArchPanel.NestTaskPanel::getContainer(), ArchPanel.NestTaskPanel::getShapes(), and App::GroupExtensionPy::newObject().
◆ addObject() [2/2]
|
virtual |
Reimplemented in PartDesign::Body.
References addObjects().
Referenced by ArchPanel.NestTaskPanel::getContainer(), and ArchPanel.NestTaskPanel::getShapes().
◆ addObjects()
|
virtual |
Reimplemented in App::GeoFeatureGroupExtension, and App::OriginGroupExtension.
References addObject(), allowObject(), App::DocumentObjectExtension::getExtendedObject(), App::GeoFeatureGroupExtension::getGroupOfObject(), getGroupOfObject(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Group, hasObject(), removeObject(), and App::PropertyLinkList::setValues().
Referenced by addObject(), App::GroupExtensionPy::addObjects(), and setObjects().
◆ allowObject()
|
virtual |
Referenced by addObject(), addObjects(), and App::GeoFeatureGroupExtension::addObjects().
◆ countObjectsOfType()
int GroupExtension::countObjectsOfType | ( | const Base::Type & | typeId | ) | const |
Returns the number of objects of typeId this group does have.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
◆ extensionExecute()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::OriginGroupExtension.
References App::DocumentObjectExtension::extensionExecute().
Referenced by App::OriginGroupExtension::extensionExecute().
◆ extensionGetSubObject()
|
overridevirtual |
Get the sub object by name.
- See also
- DocumentObject::getSubObject()
- Returns
- Return turn if handled, the sub object is returned in
ret
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::GeoFeatureGroupExtension, and App::OriginGroupExtension.
References App::PropertyLinkList::find(), App::Extension::getExtendedContainer(), App::DocumentObject::getSubObject(), App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
◆ extensionGetSubObjects()
|
overridevirtual |
Get name references of all sub objects.
- See also
- DocumentObject::getSubObjects()
- Returns
- Return turn if handled, the sub object is returned in
ret
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::GeoFeatureGroupExtension.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
◆ extensionOnChanged()
|
overridevirtual |
Reimplemented from App::Extension.
Reimplemented in App::GeoFeatureGroupExtension.
References App::Extension::extensionOnChanged(), App::DocumentObjectExtension::getExtendedObject(), App::PropertyListsT< T, ListT, ParentT >::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Group, App::PropertyLinkList::setValues(), App::Property::testStatus(), and App::Property::User3.
Referenced by App::GeoFeatureGroupExtension::extensionOnChanged().
◆ getAllChildren() [1/2]
std::vector< App::DocumentObject * > GroupExtension::getAllChildren | ( | ) | const |
Referenced by Mod.Show.Containers.Container::hasObject().
◆ getAllChildren() [2/2]
void GroupExtension::getAllChildren | ( | std::vector< DocumentObject * > & | res, |
std::set< DocumentObject * > & | rset | ||
) | const |
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
Referenced by Mod.Show.Containers.Container::hasObject().
◆ getExtensionPyObject()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References App::Extension::ExtensionPythonObject.
◆ getGroupOfObject()
|
static |
Returns the object group of the document which the given object obj is part of.
In case this object is not part of a group 0 is returned.
- Note
- This only returns objects that are normal groups, not any special derived type like GeoFeatureGroups or OriginGroups. To retrieve those please use their appropriate functions
Referenced by PartDesign::Body::addObject(), addObjects(), App::LinkBaseExtension::elementNameFromIndex(), App::DocumentObjectPy::getParentGroup(), PartDesignGui::ViewProviderDatum::getRelevantBoundBox(), and Gui::LinkView::setChildren().
◆ getObject()
DocumentObject * GroupExtension::getObject | ( | const char * | Name | ) | const |
Returns the object of this group with Name.
If the group doesn't have such an object 0 is returned.
- Note
- This method might return 0 even if the document this group belongs to contains an object with this name.
References App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), App::Document::getObject(), and hasObject().
Referenced by App::GroupExtensionPy::getObject(), and Gui::DocumentObjectItem::testStatus().
◆ getObjects()
const std::vector< DocumentObject * > & GroupExtension::getObjects | ( | ) | const |
Returns a list of all objects this group does have.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
Referenced by Gui::ViewProviderDocumentObjectGroup::getViewProviders().
◆ getObjectsOfType()
std::vector< DocumentObject * > GroupExtension::getObjectsOfType | ( | const Base::Type & | typeId | ) | const |
Returns a list of all objects of typeId this group does have.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
◆ hasObject()
|
virtual |
Checks whether the object obj is part of this group.
- Parameters
-
obj the object to check for. recursive if true check also if the obj is child of some sub group (default is false).
Reimplemented in App::OriginGroupExtension.
References App::DocumentObjectExtension::getExtendedObject(), App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
Referenced by App::GroupExtensionPy::addObject(), addObjects(), App::GeoFeatureGroupExtension::addObjects(), getObject(), App::GroupExtensionPy::hasObject(), and App::OriginGroupExtension::hasObject().
◆ isChildOf()
bool GroupExtension::isChildOf | ( | const GroupExtension * | group, |
bool | recursive = true |
||
) | const |
Checks whether this group object is a child (or sub-child if enabled) of the given group object.
References App::DocumentObjectExtension::getExtendedObject().
◆ removeObject()
|
virtual |
Removes an object from this group.
Returns all objects that have been removed.
References removeObjects().
Referenced by addObjects(), App::GeoFeatureGroupExtension::addObjects(), and App::GroupExtensionPy::removeObject().
◆ removeObjects()
|
virtual |
Removes objects from this group.
Returns all objects that have been removed.
Reimplemented in App::GeoFeatureGroupExtension.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), Group, and App::PropertyLinkList::setValues().
Referenced by removeObject(), and App::GroupExtensionPy::removeObjects().
◆ removeObjectsFromDocument()
|
virtual |
Removes all children objects from this group and the document.
References App::PropertyListsT< T, ListT, ParentT >::getSize(), App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
Referenced by App::GroupExtensionPy::removeObjectsFromDocument().
◆ setObjects()
|
virtual |
References addObjects(), Group, and App::PropertyLinkList::setValues().
Referenced by PartDesignGui::TaskBooleanParameters::onSelectionChanged(), and App::GroupExtensionPy::setObjects().
Member Data Documentation
◆ Group
PropertyLinkList App::GroupExtension::Group |
Properties.
Referenced by ReverseEngineeringGui::Segmentation::accept(), PartDesign::Body::addObject(), addObjects(), App::GeoFeatureGroupExtension::addObjects(), countObjectsOfType(), PartDesignGui::ViewProviderBody::dropObject(), PartDesign::Boolean::execute(), Drawing::FeaturePage::execute(), Import::ExportOCAF::exportObject(), Gui::ViewProviderGeoFeatureGroupExtension::extensionClaimChildren(), extensionGetSubObject(), App::GeoFeatureGroupExtension::extensionGetSubObject(), extensionGetSubObjects(), App::GeoFeatureGroupExtension::extensionGetSubObjects(), App::GeoFeatureGroupExtension::extensionOnChanged(), extensionOnChanged(), getAllChildren(), PartDesign::Body::getNextSolidFeature(), getObjects(), getObjectsOfType(), PartDesign::Body::getPrevSolidFeature(), TechDraw::ShapeExtractor::getShapes2d(), TechDraw::ShapeExtractor::getShapesFromObject(), PartDesign::Body::getSubObject(), GroupExtension(), PartDesign::Boolean::handleChangedPropertyName(), hasObject(), PartDesign::Body::insertObject(), PartDesign::Boolean::mustExecute(), Drawing::FeaturePage::onBeforeChange(), Part::BodyBase::onBeforeChange(), PartDesignGui::ViewProvider::onChanged(), Drawing::FeaturePage::onChanged(), PartDesign::Body::onChanged(), PartDesignGui::ViewProviderBoolean::onDelete(), PartDesign::Body::onDocumentRestored(), PartDesignGui::TaskBooleanParameters::onSelectionChanged(), PartDesign::Body::removeObject(), removeObjects(), App::GeoFeatureGroupExtension::removeObjects(), removeObjectsFromDocument(), setObjects(), PartDesignGui::ViewProviderBody::setVisualBodyMode(), PartDesignGui::TaskBooleanParameters::TaskBooleanParameters(), FemGui::TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(), PartDesignGui::ViewProviderBody::unifyVisualProperty(), and PartDesignGui::ViewProviderBody::updateData().
The documentation for this class was generated from the following files:
- src/App/GroupExtension.h
- src/App/GroupExtension.cpp