#include <Link.h>
Classes | |
struct PropInfo | |
Public Types | |
enum { LinkModeNone, LinkModeAutoDelete, LinkModeAutoLink, LinkModeAutoUnlink } | |
Public Member Functions | |
LinkBaseExtension () | |
virtual ~LinkBaseExtension () | |
![]() | |
DocumentObjectExtension () | |
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 onExtendedSettingDocument () | |
get called after setting the document More... | |
virtual void onExtendedSetupObject () | |
get called after a brand new object was created More... | |
virtual ~DocumentObjectExtension () | |
![]() | |
Extension () | |
App::ExtensionContainer * getExtendedContainer () | |
const App::ExtensionContainer * getExtendedContainer () const | |
virtual void initExtension (App::ExtensionContainer *obj) | |
bool isPythonExtension () | |
std::string name () const | |
virtual ~Extension () | |
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 | |
Parameter definition | |
Parameter definition (Name, Type, Property Type, Default, Document). The variadic is here so that the parameter can be extended by adding extra fields. See LINK_PARAM_EXT() for an example | |
enum PropIndex { PropMax } | |
typedef std::map< std::string, PropInfo > PropInfoMap | |
typedef std::map< const Property *, std::pair< LinkBaseExtension *, int > > LinkPropMap | |
std::vector< Property * > props | |
std::unordered_set< const App::DocumentObject * > myHiddenElements | |
std::vector< std::string > mySubElements | |
std::string mySubName | |
std::unordered_map< const App::DocumentObject *, boost::signals2::scoped_connection > plainGroupConns | |
long myOwner | |
std::unordered_map< std::string, int > myLabelCache | |
bool enableLabelCache | |
bool hasOldSubElement | |
virtual void setProperty (int idx, Property *prop) | |
Property * getProperty (int idx) | |
Property * getProperty (const char *) | |
virtual const std::vector< PropInfo > & getPropertyInfo () const | |
virtual const PropInfoMap & getPropertyInfoMap () const | |
std::vector< DocumentObject * > getLinkedChildren (bool filter=true) const | |
const char * flattenSubname (const char *subname) const | |
void expandSubname (std::string &subname) const | |
DocumentObject * getLink (int depth=0) const | |
Base::Matrix4D getTransform (bool transform) const | |
Base::Vector3d getScaleVector () const | |
App::GroupExtension * linkedPlainGroup () const | |
bool linkTransform () const | |
const char * getSubName () const | |
const std::vector< std::string > & getSubElements () const | |
bool extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj=0, Base::Matrix4D *mat=0, bool transform=false, int depth=0) const override | |
Get the sub object by name. More... | |
bool extensionGetSubObjects (std::vector< std::string > &ret, int reason) const override | |
Get name references of all sub objects. More... | |
bool extensionGetLinkedObject (DocumentObject *&ret, bool recurse, Base::Matrix4D *mat, bool transform, int depth) const override | |
Get the linked object. More... | |
virtual App::DocumentObjectExecReturn * extensionExecute (void) override | |
virtual short extensionMustExecute (void) override | |
virtual void extensionOnChanged (const Property *p) override | |
virtual void onExtendedUnsetupObject () override | |
get called when object is going to be removed from the document More... | |
virtual void onExtendedDocumentRestored () override | |
get called after a document has been fully restored More... | |
virtual int extensionSetElementVisible (const char *, bool) override | |
virtual int extensionIsElementVisible (const char *) override | |
virtual bool extensionHasChildElement () const override | |
virtual PyObject * getExtensionPyObject (void) override | |
virtual Property * extensionGetPropertyByName (const char *name) const override | |
find a property by its name More... | |
int getElementIndex (const char *subname, const char **psubname=0) const | |
void elementNameFromIndex (int idx, std::ostream &ss) const | |
DocumentObject * getContainer () | |
const DocumentObject * getContainer () const | |
void setLink (int index, DocumentObject *obj, const char *subname=0, const std::vector< std::string > &subs=std::vector< std::string >()) | |
DocumentObject * getTrueLinkedObject (bool recurse, Base::Matrix4D *mat=0, int depth=0, bool noElement=false) const | |
bool hasPlacement () const | |
void cacheChildLabel (int enable=-1) const | |
static int getArrayIndex (const char *subname, const char **psubname=0) | |
void parseSubName () const | |
void update (App::DocumentObject *parent, const Property *prop) | |
void syncElementList () | |
void detachElement (App::DocumentObject *obj) | |
void checkGeoElementMap (const App::DocumentObject *obj, const App::DocumentObject *linked, PyObject **pyObj, const char *postfix) const | |
void updateGroup () | |
void slotChangedPlainGroup (const App::DocumentObject &, const App::Property &) | |
Additional Inherited Members | |
![]() | |
void initExtensionType (Base::Type type) | |
![]() | |
static void initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=0) | |
![]() | |
bool m_isPythonExtension = false | |
Py::Object ExtensionPythonObject | |
Member Typedef Documentation
◆ LinkPropMap
typedef std::map<const Property*,std::pair<LinkBaseExtension*,int> > App::LinkBaseExtension::LinkPropMap |
◆ PropInfoMap
typedef std::map<std::string, PropInfo> App::LinkBaseExtension::PropInfoMap |
Member Enumeration Documentation
◆ anonymous enum
◆ PropIndex
Constructor & Destructor Documentation
◆ LinkBaseExtension()
LinkBaseExtension::LinkBaseExtension | ( | ) |
References App::Prop_Hidden, App::Prop_NoPersist, and App::Prop_ReadOnly.
◆ ~LinkBaseExtension()
|
virtual |
Member Function Documentation
◆ cacheChildLabel()
void LinkBaseExtension::cacheChildLabel | ( | int | enable = -1 | ) | const |
References enableLabelCache, and myLabelCache.
Referenced by App::LinkBaseExtensionPy::cacheChildLabel(), and getElementIndex().
◆ checkGeoElementMap()
|
protected |
References App::DocumentObject::getDocument(), and Data::ComplexGeoDataPy::Type.
Referenced by extensionGetSubObject().
◆ detachElement()
|
protected |
References getContainer(), LinkModeAutoDelete, and LinkModeAutoUnlink.
Referenced by onExtendedUnsetupObject(), and setLink().
◆ elementNameFromIndex()
void LinkBaseExtension::elementNameFromIndex | ( | int | idx, |
std::ostream & | ss | ||
) | const |
References App::GroupExtension::getGroupOfObject().
Referenced by expandSubname().
◆ expandSubname()
void LinkBaseExtension::expandSubname | ( | std::string & | subname | ) | const |
References elementNameFromIndex(), and getElementIndex().
Referenced by App::LinkBaseExtensionPy::expandSubname().
◆ extensionExecute()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References App::DocumentObjectExtension::extensionExecute(), getContainer(), App::DocumentObject::getDocument(), App::Document::getObjectByID(), App::ExtensionContainer::getPropertyByName(), App::DocumentObject::getPyObject(), getTrueLinkedObject(), App::PropertyPythonObject::getValue(), and myOwner.
◆ extensionGetLinkedObject()
|
overridevirtual |
Get the linked object.
- Returns
- Return turn if handled, the linked object is returned in
ret
Reimplemented from App::DocumentObjectExtension.
References getContainer(), getTransform(), and getTrueLinkedObject().
◆ extensionGetPropertyByName()
|
overridevirtual |
find a property by its name
Reimplemented from App::Extension.
References App::Extension::extensionGetPropertyByName(), getContainer(), and getTrueLinkedObject().
◆ 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.
References checkGeoElementMap(), getContainer(), getElementIndex(), getScaleVector(), App::DocumentObject::getSubObject(), getTransform(), getTrueLinkedObject(), Data::ComplexGeoData::indexPostfix(), Data::ComplexGeoData::isMappedElement(), mySubElements, and Base::Matrix4D::scale().
Referenced by flattenSubname().
◆ 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.
References App::DocumentObject::getSubObjects(), getTrueLinkedObject(), mySubElements, and App::Extension::name().
◆ extensionHasChildElement()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References getTrueLinkedObject(), and App::DocumentObject::hasChildElement().
◆ extensionIsElementVisible()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References getArrayIndex(), getElementIndex(), getTrueLinkedObject(), and App::DocumentObject::isElementVisible().
◆ extensionMustExecute()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References getLink().
◆ extensionOnChanged()
|
overridevirtual |
Reimplemented from App::Extension.
References App::Extension::extensionOnChanged(), getContainer(), App::Property::testStatus(), update(), and App::Property::User3.
◆ extensionSetElementVisible()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References getArrayIndex(), getElementIndex(), getTrueLinkedObject(), myHiddenElements, App::DocumentObject::setElementVisible(), and App::Property::User3.
◆ flattenSubname()
const char * LinkBaseExtension::flattenSubname | ( | const char * | subname | ) | const |
References extensionGetSubObject().
◆ getArrayIndex()
|
static |
◆ getContainer() [1/2]
DocumentObject * LinkBaseExtension::getContainer | ( | ) |
References Base::Persistence::getClassTypeId(), and App::Extension::getExtendedContainer().
Referenced by App::LinkElement::canDelete(), detachElement(), extensionExecute(), extensionGetLinkedObject(), extensionGetPropertyByName(), extensionGetSubObject(), extensionOnChanged(), getElementIndex(), onExtendedDocumentRestored(), setLink(), syncElementList(), and update().
◆ getContainer() [2/2]
const DocumentObject* App::LinkBaseExtension::getContainer | ( | ) | const |
◆ getElementIndex()
int LinkBaseExtension::getElementIndex | ( | const char * | subname, |
const char ** | psubname = 0 |
||
) | const |
References cacheChildLabel(), enableLabelCache, getArrayIndex(), getContainer(), getTrueLinkedObject(), Data::ComplexGeoData::isMappedElement(), myLabelCache, and App::Extension::name().
Referenced by expandSubname(), extensionGetSubObject(), extensionIsElementVisible(), and extensionSetElementVisible().
◆ getExtensionPyObject()
|
overridevirtual |
Reimplemented from App::DocumentObjectExtension.
References App::Extension::ExtensionPythonObject.
◆ getLink()
DocumentObject * LinkBaseExtension::getLink | ( | int | depth = 0 | ) | const |
References App::Application::checkLinkDepth(), and App::GetApplication().
Referenced by extensionMustExecute(), getTrueLinkedObject(), and TechDraw::ShapeExtractor::getXShapes().
◆ getLinkedChildren()
std::vector< App::DocumentObject * > LinkBaseExtension::getLinkedChildren | ( | bool | filter = true | ) | const |
Referenced by TechDraw::ShapeExtractor::getXShapes().
◆ getProperty() [1/2]
Property * LinkBaseExtension::getProperty | ( | const char * | name | ) |
References getProperty(), and getPropertyInfoMap().
◆ getProperty() [2/2]
Property * LinkBaseExtension::getProperty | ( | int | idx | ) |
◆ getPropertyInfo()
|
virtual |
Referenced by getPropertyInfoMap(), and setProperty().
◆ getPropertyInfoMap()
|
virtual |
References getPropertyInfo().
Referenced by getProperty().
◆ getScaleVector()
Base::Vector3d LinkBaseExtension::getScaleVector | ( | ) | const |
Referenced by extensionGetSubObject(), and getTransform().
◆ getSubElements()
const std::vector<std::string>& App::LinkBaseExtension::getSubElements | ( | ) | const |
◆ getSubName()
const char* App::LinkBaseExtension::getSubName | ( | ) | const |
Referenced by getTrueLinkedObject().
◆ getTransform()
Base::Matrix4D LinkBaseExtension::getTransform | ( | bool | transform | ) | const |
References getScaleVector(), and Base::Matrix4D::scale().
Referenced by extensionGetLinkedObject(), and extensionGetSubObject().
◆ getTrueLinkedObject()
DocumentObject * LinkBaseExtension::getTrueLinkedObject | ( | bool | recurse, |
Base::Matrix4D * | mat = 0 , |
||
int | depth = 0 , |
||
bool | noElement = false |
||
) | const |
References App::Extension::extensionIsDerivedFrom(), getLink(), getSubName(), and linkTransform().
Referenced by extensionExecute(), extensionGetLinkedObject(), extensionGetPropertyByName(), extensionGetSubObject(), extensionGetSubObjects(), extensionHasChildElement(), extensionIsElementVisible(), extensionSetElementVisible(), getElementIndex(), and linkedPlainGroup().
◆ hasPlacement()
bool App::LinkBaseExtension::hasPlacement | ( | ) | const |
Referenced by TechDraw::ShapeExtractor::getXShapes().
◆ linkedPlainGroup()
App::GroupExtension * LinkBaseExtension::linkedPlainGroup | ( | ) | const |
References getTrueLinkedObject(), and mySubElements.
Referenced by update(), and updateGroup().
◆ linkTransform()
bool LinkBaseExtension::linkTransform | ( | ) | const |
Referenced by getTrueLinkedObject().
◆ onExtendedDocumentRestored()
|
overridevirtual |
get called after a document has been fully restored
Reimplemented from App::DocumentObjectExtension.
Reimplemented in App::LinkExtension.
References Data::ComplexGeoData::findElementName(), getContainer(), hasOldSubElement, myHiddenElements, mySubElements, App::DocumentObjectExtension::onExtendedDocumentRestored(), and update().
◆ onExtendedUnsetupObject()
|
overridevirtual |
get called when object is going to be removed from the document
Reimplemented from App::DocumentObjectExtension.
References detachElement().
◆ parseSubName()
|
protected |
References Data::ComplexGeoData::findElementName(), mySubElements, and mySubName.
Referenced by update().
◆ setLink()
void LinkBaseExtension::setLink | ( | int | index, |
DocumentObject * | obj, | ||
const char * | subname = 0 , |
||
const std::vector< std::string > & | subs = std::vector<std::string>() |
||
) |
◆ setProperty()
|
virtual |
References App::Extension::extensionGetPropertyName(), Base::Persistence::getClassTypeId(), App::Property::getContainer(), Base::Type::getName(), App::Property::getName(), getPropertyInfo(), App::Property::Hidden, App::Property::Immutable, Base::BaseClass::isDerivedFrom(), App::Property::LockDynamic, and App::Property::setStatus().
◆ slotChangedPlainGroup()
|
protected |
References updateGroup().
Referenced by updateGroup().
◆ syncElementList()
|
protected |
References getContainer(), App::Property::Hidden, and App::Property::Immutable.
Referenced by update().
◆ update()
|
protected |
References App::Document::addObject(), enableLabelCache, getContainer(), App::DocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), App::Property::Hidden, App::Document::isPerformingTransaction(), linkedPlainGroup(), myHiddenElements, myLabelCache, parseSubName(), syncElementList(), App::Property::testStatus(), updateGroup(), and App::Property::User3.
Referenced by ArchAxis.AxisSystemTaskPanel::addElement(), ArchSectionPlane.SectionPlaneTaskPanel::addElement(), ArchComponent.ComponentTaskPanel::addElement(), DraftGui.FacebinderTaskPanel::addElement(), femtaskpanels.task_result_mechanical._TaskPanel::calculate(), Spreadsheet_legacy.SpreadsheetView::changeCell(), draftguitools.gui_edit.Edit::endEditing(), extensionOnChanged(), draftguitools.gui_trackers.boxTracker::height(), ArchAxis.CommandArchGrid::IsActive(), onExtendedDocumentRestored(), draftguitools.gui_trackers.rectangleTracker::p3(), Plot.Plot::plot(), Spreadsheet_legacy.SpreadsheetView::recompute(), ArchAxis.AxisSystemTaskPanel::removeElement(), ArchSectionPlane.SectionPlaneTaskPanel::removeElement(), ArchComponent.ComponentTaskPanel::removeElement(), DraftGui.FacebinderTaskPanel::removeElement(), draftguitools.gui_trackers.gridTracker::reset(), ArchNesting.Nester::run(), and draftguitools.gui_edit.Edit::update_object().
◆ updateGroup()
|
protected |
References App::DocumentObjectExtension::getExtendedObject(), App::DocumentObject::getFullName(), linkedPlainGroup(), plainGroupConns, and slotChangedPlainGroup().
Referenced by slotChangedPlainGroup(), and update().
Member Data Documentation
◆ enableLabelCache
|
mutableprotected |
Referenced by cacheChildLabel(), getElementIndex(), and update().
◆ hasOldSubElement
|
protected |
Referenced by onExtendedDocumentRestored().
◆ myHiddenElements
|
protected |
Referenced by extensionSetElementVisible(), onExtendedDocumentRestored(), and update().
◆ myLabelCache
|
mutableprotected |
Referenced by cacheChildLabel(), getElementIndex(), and update().
◆ myOwner
|
protected |
Referenced by App::LinkElement::canDelete(), extensionExecute(), and setLink().
◆ mySubElements
|
mutableprotected |
Referenced by extensionGetSubObject(), extensionGetSubObjects(), linkedPlainGroup(), onExtendedDocumentRestored(), and parseSubName().
◆ mySubName
|
mutableprotected |
Referenced by parseSubName().
◆ plainGroupConns
|
protected |
Referenced by updateGroup().
◆ props
|
protected |
The documentation for this class was generated from the following files:
- src/App/Link.h
- src/App/Link.cpp