#include <GroupExtension.h>
Public Member Functions | |
GroupExtension (void) | |
Constructor. More... | |
virtual | ~GroupExtension () |
Public Member Functions inherited from App::DocumentObjectExtension | |
DocumentObjectExtension () | |
virtual App::DocumentObjectExecReturn * | extensionExecute () |
virtual bool | extensionGetLinkedObject (DocumentObject *&ret, bool recursive, Base::Matrix4D *mat, bool transform, int depth) const |
Get the linked object. More... | |
virtual bool | extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const |
Get the sub object by name. More... | |
virtual bool | extensionGetSubObjects (std::vector< std::string > &ret, int reason) const |
Get name references of all sub objects. More... | |
virtual bool | extensionHasChildElement () const |
virtual int | extensionIsElementVisible (const char *) |
virtual short | extensionMustExecute () |
virtual int | extensionSetElementVisible (const char *, bool) |
App::DocumentObject * | getExtendedObject () |
const App::DocumentObject * | getExtendedObject () const |
virtual PyObject * | getExtensionPyObject () override |
virtual const char * | getViewProviderExtensionName () 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 PyObject * | getExtensionPyObject () |
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 <br> | |
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=nullptr) |
Protected Attributes inherited from App::Extension | |
bool | m_isPythonExtension = false |
Py::SmartPtr | ExtensionPythonObject |
GroupExtension::GroupExtension | ( | void | ) |
Constructor.
References Group, App::Extension::initExtensionType(), App::Prop_Hidden, App::Prop_None, and App::Prop_Transient.
Referenced by PartDesign::Body::addObject().
|
virtual |
|
virtual |
Adds an object of sType with pObjectName to the document this group belongs to and append it to this group as well.
References addObject(), App::Document::addObject(), allowObject(), App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), and App::Document::removeObject().
Referenced by addObject(), addObjects(), ArchBuildingPart.BuildingPart::autogroup(), ArchPanel.NestTaskPanel::getContainer(), and ArchPanel.NestTaskPanel::getShapes().
|
virtual |
Reimplemented in PartDesign::Body.
References addObjects(), and draftgeoutils.general::vec().
Referenced by ArchBuildingPart.BuildingPart::autogroup(), ArchPanel.NestTaskPanel::getContainer(), and ArchPanel.NestTaskPanel::getShapes().
|
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(), and setObjects().
|
virtual |
Referenced by addObject(), addObjects(), and App::GeoFeatureGroupExtension::addObjects().
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.
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::OriginGroupExtension.
References App::DocumentObjectExtension::extensionExecute().
Referenced by App::OriginGroupExtension::extensionExecute().
|
overridevirtual |
Get the sub object by name.
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.
|
overridevirtual |
Get name references of all sub objects.
ret
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::GeoFeatureGroupExtension.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and Group.
|
overridevirtual |
Reimplemented from App::Extension.
Reimplemented in App::GeoFeatureGroupExtension, and App::OriginGroupExtension.
References draftgeoutils.faces::bind(), 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().
std::vector< App::DocumentObject * > GroupExtension::getAllChildren | ( | ) | const |
References getAllChildren().
Referenced by getAllChildren(), and Mod.Show.Containers.Container::hasObject().
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().
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References App::Extension::ExtensionPythonObject.
|
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.
Referenced by PartDesign::Body::addObject(), addObjects(), App::LinkBaseExtension::elementNameFromIndex(), PartDesignGui::ViewProviderDatum::getRelevantBoundBox(), and Gui::LinkView::setChildren().
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.
References App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), App::Document::getObject(), and hasObject().
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.
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.
|
virtual |
Checks whether the object obj is part of this group.
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 addObjects(), App::GeoFeatureGroupExtension::addObjects(), getObject(), and App::OriginGroupExtension::hasObject().
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().
|
virtual |
Removes an object from this group.
Returns all objects that have been removed.
References removeObjects(), and draftgeoutils.general::vec().
Referenced by addObjects(), and App::GeoFeatureGroupExtension::addObjects().
|
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 ReverseEngineeringGui::Segmentation::accept(), and removeObject().
|
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.
|
virtual |
References addObjects(), Group, and App::PropertyLinkList::setValues().
Referenced by PartDesignGui::TaskBooleanParameters::onSelectionChanged().
PropertyLinkList App::GroupExtension::Group | ( | void | ) |
Properties.
Referenced by ReverseEngineeringGui::Segmentation::accept(), PartDesign::Body::addObject(), addObjects(), App::GeoFeatureGroupExtension::addObjects(), countObjectsOfType(), PartDesignGui::ViewProviderBody::dropObject(), Drawing::FeatureClip::execute(), Drawing::FeaturePage::execute(), Raytracing::LuxProject::execute(), Raytracing::RayProject::execute(), PartDesign::Boolean::execute(), Import::ExportOCAF::exportObject(), Gui::ViewProviderGeoFeatureGroupExtension::extensionClaimChildren(), App::GeoFeatureGroupExtension::extensionGetSubObject(), extensionGetSubObject(), App::GeoFeatureGroupExtension::extensionGetSubObjects(), extensionGetSubObjects(), App::GeoFeatureGroupExtension::extensionOnChanged(), extensionOnChanged(), getAllChildren(), PartDesign::Body::getNextSolidFeature(), getObjects(), getObjectsOfType(), PartDesign::Body::getPrevSolidFeature(), TechDraw::ShapeExtractor::getShapes2d(), TechDraw::ShapeExtractor::getShapesFromObject(), PartDesign::Body::getSubObject(), GroupExtension(), Fem::FemAnalysis::handleChangedPropertyName(), Part::BodyBase::handleChangedPropertyName(), PartDesign::Boolean::handleChangedPropertyName(), hasObject(), PartDesign::Body::insertObject(), Part::BodyBase::isAfter(), PartDesign::Boolean::mustExecute(), Drawing::FeaturePage::onBeforeChange(), Drawing::FeaturePage::onChanged(), PartDesign::Body::onChanged(), PartDesignGui::ViewProvider::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().