App::DocumentObject Class Reference

Base class of all Classes handled in the Document. More...

#include <DocumentObject.h>

Public Types

enum  GSReason { GS_DEFAULT , GS_SELECT }
 reason of calling getSubObjects() More...
 
enum  OutListOption { OutListNoExpression = 1 , OutListNoHidden = 2 , OutListNoXLinked = 4 }
 DAG handling This part of the interface deals with viewing the document as a DAG (directed acyclic graph). More...
 
- Public Types inherited from App::ExtensionContainer
typedef std::map< Base::Type, App::Extension * >::iterator ExtensionIterator
 

Public Member Functions

virtual App::PropertyaddDynamicProperty (const char *type, const char *name=nullptr, const char *group=nullptr, const char *doc=nullptr, short attr=0, bool ro=false, bool hidden=false) override
 
virtual bool adjustRelativeLinks (const std::set< App::DocumentObject * > &inList, std::set< App::DocumentObject * > *visited=nullptr)
 Called to adjust link properties to avoid cyclic links. More...
 
virtual bool allowDuplicateLabel () const
 
virtual bool canLinkProperties () const
 
virtual int canLoadPartial () const
 allow partial loading of dependent objects More...
 
void clearExpression (const ObjectIdentifier &path)
 
void clearOutListCache () const
 clear internal out list cache More...
 
virtual const char * detachFromDocument () override
 
 DocumentObject (void)
 Constructor. More...
 
void enforceRecompute ()
 Enforce this document object to be recomputed. More...
 
App::DocumentgetDocument (void) const
 gets the document in which this Object is handled More...
 
std::string getExportName (bool forced=false) const
 returns the name that is safe to be exported to other document More...
 
virtual const PropertyExpressionEngine::ExpressionInfo getExpression (const ObjectIdentifier &path) const
 
virtual std::string getFullName () const override
 Return the object full name of the form DocName::ObjName. More...
 
DocumentObjectGroupgetGroup () const
 get group if object is part of a group, otherwise 0 is returned More...
 
long getID () const
 Return the object ID that is unique within its owner document. More...
 
const std::vector< App::DocumentObject * > & getInList (void) const
 
std::set< App::DocumentObject * > getInListEx (bool recursive) const
 Return a set of all objects linking to this object, including possible external parent objects. More...
 
void getInListEx (std::set< App::DocumentObject * > &inSet, bool recursive, std::vector< App::DocumentObject * > *inList=nullptr) const
 Get a set of all objects linking to this object, including possible external parent objects. More...
 
std::vector< App::DocumentObject * > getInListRecursive (void) const
 get all objects link directly or indirectly to this object More...
 
virtual DocumentObjectgetLinkedObject (bool recurse=true, Base::Matrix4D *mat=nullptr, bool transform=false, int depth=0) const
 Return the linked object with optional transformation. More...
 
const char * getNameInDocument (void) const
 returns the name which is set in the document for this object (not the name property!) More...
 
const std::string & getOldLabel () const
 
const std::vector< App::DocumentObject * > & getOutList () const
 returns a list of objects this object is pointing to by Links More...
 
std::vector< App::DocumentObject * > getOutList (int option) const
 
void getOutList (int option, std::vector< App::DocumentObject * > &res) const
 
std::vector< App::DocumentObject * > getOutListOfProperty (App::Property *) const
 returns a list of objects linked by the property More...
 
std::vector< App::DocumentObject * > getOutListRecursive (void) const
 returns a list of objects this object is pointing to by Links and all further descended More...
 
std::vector< std::pair< App::DocumentObject *, std::string > > getParents (int depth=0) const
 Obtain top parents and subnames of this object using its InList. More...
 
std::vector< std::list< App::DocumentObject * > > getPathsByOutList (App::DocumentObject *to) const
 get all possible paths from this to another object following the OutList More...
 
virtual PyObjectgetPyObject (void) override
 This method returns the Python wrapper for a C++ object. More...
 
unsigned long getStatus () const
 return the status bits More...
 
const char * getStatusString (void) const
 get the status Message More...
 
virtual DocumentObjectgetSubObject (const char *subname, PyObject **pyObj=nullptr, Base::Matrix4D *mat=nullptr, bool transform=true, int depth=0) const
 Get the sub element/object by name. More...
 
std::vector< DocumentObject * > getSubObjectList (const char *subname) const
 Return a list of objects referenced by a given subname including this object. More...
 
virtual std::vector< std::string > getSubObjects (int reason=0) const
 Return name reference of all sub-objects. More...
 
virtual const char * getViewProviderName (void) const
 returns the type name of the ViewProvider More...
 
virtual const char * getViewProviderNameOverride () const
 This function is introduced to allow Python feature override its view provider. More...
 
const char * getViewProviderNameStored () const
 
virtual bool hasChildElement () const
 return true to activate tree view group object handling and element visibility More...
 
virtual bool isAttachedToDocument () const override
 
virtual int isElementVisible (const char *element) const
 Get sub-element visibility. More...
 
bool isError (void) const
 set this feature to error More...
 
int isExporting () const
 
bool isInInList (DocumentObject *objToTest) const
 test if this object is directly (non recursive) in the InList More...
 
bool isInInListRecursive (DocumentObject *objToTest) const
 test if this object is in the InList and recursive further down More...
 
bool isInOutList (DocumentObject *objToTest) const
 test if this object is directly (non recursive) in the OutList More...
 
bool isInOutListRecursive (DocumentObject *objToTest) const
 test if the given object is in the OutList and recursive further down More...
 
bool isRecomputing () const
 returns true if this objects is currently recomputing More...
 
bool isRemoving () const
 returns true if this objects is currently removed from the document More...
 
bool isRestoring () const
 returns true if this objects is currently restoring from file More...
 
bool isTouched (void) const
 test if this document object is touched More...
 
bool isValid (void) const
 
virtual short mustExecute (void) const
 mustExecute We call this method to check if the object was modified to be invoked. More...
 
bool mustRecompute (void) const
 Test if this document object must be recomputed. More...
 
virtual void onBeforeChangeLabel (std::string &newLabel)
 
virtual void onLostLinkToObject (DocumentObject *)
 Called in case of losing a link Get called by the document when a object got deleted a link property of this object ist pointing to. More...
 
virtual void onUpdateElementReference (const Property *)
 
void purgeError (void)
 remove the error from the object More...
 
void purgeTouched (void)
 reset this document object touched More...
 
bool recomputeFeature (bool recursive=false)
 Recompute only this feature. More...
 
virtual bool redirectSubName (std::ostringstream &ss, DocumentObject *topParent, DocumentObject *child) const
 Allow object to redirect a subname path. More...
 
virtual bool removeDynamicProperty (const char *prop) override
 
virtual void renameObjectIdentifiers (const std::map< App::ObjectIdentifier, App::ObjectIdentifier > &paths)
 
App::DocumentObjectresolve (const char *subname, App::DocumentObject **parent=nullptr, std::string *childName=nullptr, const char **subElement=nullptr, PyObject **pyObj=nullptr, Base::Matrix4D *mat=nullptr, bool transform=true, int depth=0) const
 Resolve the last document object referenced in the subname. More...
 
App::DocumentObjectresolveRelativeLink (std::string &subname, App::DocumentObject *&link, std::string &linkSub) const
 Resolve a link reference that is relative to this object reference. More...
 
virtual void Save (Base::Writer &writer) const override
 This method is used to save properties to an XML document. More...
 
virtual int setElementVisible (const char *element, bool visible)
 Child element handling. More...
 
virtual void setExpression (const ObjectIdentifier &path, std::shared_ptr< App::Expression > expr)
 
void setStatus (ObjectStatus pos, bool on)
 
bool testIfLinkDAGCompatible (App::PropertyLinkSub &linkTo) const
 
bool testIfLinkDAGCompatible (App::PropertyLinkSubList &linksTo) const
 
bool testIfLinkDAGCompatible (const std::vector< DocumentObject * > &linksTo) const
 
bool testIfLinkDAGCompatible (DocumentObject *linkTo) const
 testIfLinkIsDAG tests a link that is about to be created for circular references. More...
 
bool testStatus (ObjectStatus pos) const
 
void touch (bool noRecompute=false)
 Set the property touched -> changed, cause recomputation in Update() More...
 
virtual ~DocumentObject ()
 
- Public Member Functions inherited from App::TransactionalObject
virtual const char * detachFromDocument ()
 
virtual bool isAttachedToDocument () const
 
 TransactionalObject (void)
 Constructor. More...
 
virtual ~TransactionalObject ()
 
- Public Member Functions inherited from App::ExtensionContainer
ExtensionIterator extensionBegin ()
 
 ExtensionContainer ()
 
ExtensionIterator extensionEnd ()
 
App::ExtensiongetExtension (Base::Type, bool derived=true, bool no_except=false) const
 
App::ExtensiongetExtension (const std::string &name) const
 
template<typename ExtensionT >
ExtensionTgetExtensionByType (bool no_except=false, bool derived=true) const
 
std::vector< Extension * > getExtensionsDerivedFrom (Base::Type type) const
 
template<typename ExtensionT >
std::vector< ExtensionT * > getExtensionsDerivedFromType () const
 
bool hasExtension (Base::Type, bool derived=true) const
 
bool hasExtension (const std::string &name) const
 
bool hasExtensions () const
 
void registerExtension (Base::Type extension, App::Extension *ext)
 
virtual ~ExtensionContainer ()
 
virtual PropertygetPropertyByName (const char *name) const override
 find a property by its name More...
 
virtual const char * getPropertyName (const Property *prop) const override
 get the name of a property More...
 
virtual void getPropertyMap (std::map< std::string, Property * > &Map) const override
 get all properties of the class (including properties of the parent) More...
 
virtual void getPropertyList (std::vector< Property * > &List) const override
 get all properties of the class (including properties of the parent) More...
 
virtual short getPropertyType (const Property *prop) const override
 get the Type of a Property More...
 
virtual short getPropertyType (const char *name) const override
 get the Type of a named Property More...
 
virtual const char * getPropertyGroup (const Property *prop) const override
 get the Group of a Property More...
 
virtual const char * getPropertyGroup (const char *name) const override
 get the Group of a named Property More...
 
virtual const char * getPropertyDocumentation (const Property *prop) const override
 get the Group of a Property More...
 
virtual const char * getPropertyDocumentation (const char *name) const override
 get the Group of a named Property More...
 
virtual void Restore (Base::XMLReader &reader) override
 This method is used to restore properties from an XML document. More...
 
void saveExtensions (Base::Writer &writer) const
 
void restoreExtensions (Base::XMLReader &reader)
 
- Public Member Functions inherited from App::PropertyContainer
virtual App::PropertyaddDynamicProperty (const char *type, const char *name=nullptr, const char *group=nullptr, const char *doc=nullptr, short attr=0, bool ro=false, bool hidden=false)
 
bool changeDynamicProperty (const Property *prop, const char *group, const char *doc)
 
virtual void editProperty (const char *)
 
virtual App::PropertygetDynamicPropertyByName (const char *name) const
 
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const
 
virtual std::vector< std::string > getDynamicPropertyNames () const
 
virtual std::string getFullName () const
 
virtual unsigned int getMemSize (void) const
 This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More...
 
virtual PropertygetPropertyByName (const char *name) const
 find a property by its name More...
 
virtual const char * getPropertyDocumentation (const char *name) const
 get the Group of a named Property More...
 
virtual const char * getPropertyDocumentation (const Property *prop) const
 get the Group of a Property More...
 
virtual const char * getPropertyGroup (const char *name) const
 get the Group of a named Property More...
 
virtual const char * getPropertyGroup (const Property *prop) const
 get the Group of a Property More...
 
virtual void getPropertyList (std::vector< Property * > &List) const
 get all properties of the class (including properties of the parent) More...
 
virtual void getPropertyMap (std::map< std::string, Property * > &Map) const
 get all properties of the class (including properties of the parent) More...
 
virtual const char * getPropertyName (const Property *prop) const
 get the name of a property More...
 
virtual void getPropertyNamedList (std::vector< std::pair< const char *, Property * > > &List) const
 get all properties with their names, may contain duplicates and aliases More...
 
const char * getPropertyPrefix () const
 
virtual short getPropertyType (const char *name) const
 get the Type of a named Property More...
 
virtual short getPropertyType (const Property *prop) const
 get the Type of a Property More...
 
bool isHidden (const char *name) const
 check if the named property is hidden More...
 
bool isHidden (const Property *prop) const
 check if the property is hidden More...
 
bool isReadOnly (const char *name) const
 check if the named property is read-only More...
 
bool isReadOnly (const Property *prop) const
 check if the property is read-only More...
 
virtual void onPropertyStatusChanged (const Property &prop, unsigned long oldStatus)
 
 PropertyContainer ()
 A constructor. More...
 
virtual bool removeDynamicProperty (const char *name)
 
virtual void Restore (Base::XMLReader &reader)
 This method is used to restore properties from an XML document. More...
 
virtual void Save (Base::Writer &writer) const
 This method is used to save properties to an XML document. More...
 
void setPropertyPrefix (const char *prefix)
 
void setPropertyStatus (unsigned char bit, bool value)
 set the Status bit of all properties at once More...
 
virtual ~PropertyContainer ()
 A destructor. More...
 
- Public Member Functions inherited from Base::Persistence
void dumpToStream (std::ostream &stream, int compression)
 
virtual unsigned int getMemSize () const =0
 This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More...
 
virtual Base::Type getTypeId (void) const
 
virtual void Restore (XMLReader &)=0
 This method is used to restore properties from an XML document. More...
 
virtual void RestoreDocFile (Reader &)
 This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More...
 
void restoreFromStream (std::istream &stream)
 
virtual void Save (Writer &) const =0
 This method is used to save properties to an XML document. More...
 
virtual void SaveDocFile (Writer &) const
 This method is used to save large amounts of data to a binary file. More...
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
 BaseClass (const BaseClass &)=default
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (const BaseClass &)=default
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Static Public Member Functions

static const char * hasHiddenMarker (const char *subname)
 Check if the subname reference ends with hidden marker. More...
 
static const std::string & hiddenMarker ()
 Special marker to mark the object as hidden. More...
 
- Static Public Member Functions inherited from Base::Persistence
static void * create (void)
 
static std::string encodeAttribute (const std::string &)
 Encodes an attribute upon saving. More...
 
static Base::Type getClassTypeId (void)
 
static void init (void)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 

Public Attributes

PropertyExpressionEngine ExpressionEngine
 
PropertyString Label
 
PropertyString Label2
 
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalBeforeChange
 signal before changing a property of this object More...
 
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalChanged
 signal on changed property of this object More...
 
PropertyBool Visibility
 Allow control visibility status in App name space. More...
 

Static Public Attributes

static DocumentObjectExecReturnStdReturn
 

Protected Member Functions

virtual App::DocumentObjectExecReturnexecute (void)
 get called by the document to recompute this feature Normally this method get called in the processing of Document::recompute(). More...
 
App::DocumentObjectExecReturnexecuteExtensions ()
 Executes the extensions of a document object. More...
 
virtual void onBeforeChange (const Property *prop) override
 get called before the value is changed More...
 
virtual void onChanged (const Property *prop) override
 get called by the container when a property was changed More...
 
virtual void onDocumentRestored ()
 get called after a document has been fully restored More...
 
virtual void onPropertyStatusChanged (const Property &prop, unsigned long oldStatus) override
 get called when a property status has changed More...
 
virtual void onSettingDocument ()
 get called after setting the document More...
 
virtual void onUndoRedoFinished ()
 get called after an undo/redo transaction is finished More...
 
virtual App::DocumentObjectExecReturnrecompute (void)
 recompute only this object More...
 
void resetError (void)
 
void setDocument (App::Document *doc)
 
void setError (void)
 
virtual void setupObject ()
 get called after a brand new object was created More...
 
virtual void unsetupObject ()
 get called when object is going to be removed from the document More...
 
- Protected Member Functions inherited from App::TransactionalObject
void onBeforeChangeProperty (Document *doc, const Property *prop)
 
- Protected Member Functions inherited from App::PropertyContainer
virtual const PropertyDatagetPropertyData (void) const
 
virtual void handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName)
 PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More...
 
virtual void handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, Property *prop)
 PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More...
 
virtual void onBeforeChange (const Property *)
 get called before the value is changed More...
 
virtual void onChanged (const Property *)
 get called by the container when a property has changed More...
 

Protected Attributes

std::string oldLabel
 Old label; used for renaming expressions. More...
 
const std::string * pcNameInDocument
 
Py::SmartPtr PythonObject
 python object of this class and all descendent More...
 
std::bitset< 32 > StatusBits
 Status bits of the document object The first 8 bits are used for the base system the rest can be used in descendent classes to mark special statuses on the objects. More...
 
- Protected Attributes inherited from App::PropertyContainer
DynamicProperty dynamicProps
 

Friends

class Document
 
class ObjectExecution
 
class Transaction
 

Additional Inherited Members

- Static Protected Member Functions inherited from App::PropertyContainer
static const PropertyDatagetPropertyDataPtr (void)
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Detailed Description

Base class of all Classes handled in the Document.

Member Enumeration Documentation

◆ GSReason

reason of calling getSubObjects()

Enumerator
GS_DEFAULT 

default, mostly for exporting shape objects

GS_SELECT 

for element selection

◆ OutListOption

DAG handling This part of the interface deals with viewing the document as a DAG (directed acyclic graph).

OutList options

Enumerator
OutListNoExpression 

Do not include link from expression engine.

OutListNoHidden 

Do not hide any link (i.e. include links with LinkScopeHidden)

OutListNoXLinked 

Do not include link from PropertyXLink.

Constructor & Destructor Documentation

◆ DocumentObject()

App::DocumentObject::DocumentObject ( void  )

Constructor.

◆ ~DocumentObject()

virtual App::DocumentObject::~DocumentObject ( )
virtual

Member Function Documentation

◆ addDynamicProperty()

virtual App::Property * App::DocumentObject::addDynamicProperty ( const char *  type,
const char *  name = nullptr,
const char *  group = nullptr,
const char *  doc = nullptr,
short  attr = 0,
bool  ro = false,
bool  hidden = false 
)
overridevirtual

◆ adjustRelativeLinks()

virtual bool App::DocumentObject::adjustRelativeLinks ( const std::set< App::DocumentObject * > &  inList,
std::set< App::DocumentObject * > *  visited = nullptr 
)
virtual

Called to adjust link properties to avoid cyclic links.

Parameters
inListthe recursive in-list of the future parent object, including the parent itself.
visitedoptional set holding the visited objects. If null then only this object is adjusted, or else all object inside the out-list of this object will be checked.
Returns
Return whether the object has been modified

This function tries to adjust any relative link properties (i.e. link properties that can hold subnames) to avoid cyclic when added to the future parent.

◆ allowDuplicateLabel()

virtual bool App::DocumentObject::allowDuplicateLabel ( ) const
virtual

◆ canLinkProperties()

virtual bool App::DocumentObject::canLinkProperties ( ) const
virtual

◆ canLoadPartial()

virtual int App::DocumentObject::canLoadPartial ( ) const
virtual

allow partial loading of dependent objects

Returns
Returns 0 means do not support partial loading. 1 means allow dependent objects to be partially loaded, i.e. only create, but not restored. 2 means this object itself can be partially loaded.

Reimplemented in PartDesign::SubShapeBinder.

◆ clearExpression()

void App::DocumentObject::clearExpression ( const ObjectIdentifier path)

◆ clearOutListCache()

void App::DocumentObject::clearOutListCache ( ) const

clear internal out list cache

◆ detachFromDocument()

virtual const char * App::DocumentObject::detachFromDocument ( )
overridevirtual

Reimplemented from App::TransactionalObject.

◆ enforceRecompute()

void App::DocumentObject::enforceRecompute ( )

Enforce this document object to be recomputed.

Referenced by Gui::TreeWidget::onMarkRecompute(), and TechDraw::DrawViewDimExtent::unsetupObject().

◆ execute()

virtual App::DocumentObjectExecReturn * App::DocumentObject::execute ( void  )
protectedvirtual

get called by the document to recompute this feature Normally this method get called in the processing of Document::recompute().

In execute() the output properties get recomputed with the data from linked objects and objects own properties.

Reimplemented in Fem::Constraint, Mesh::Curvature, Mesh::FixDefects, Mesh::HarmonizeNormals, Mesh::FlipNormals, Mesh::FixNonManifolds, Mesh::FixDuplicatedFaces, Mesh::FixDuplicatedPoints, Mesh::FixDegenerations, Mesh::FixDeformations, Mesh::FixIndices, Mesh::FillHoles, Mesh::RemoveComponents, Mesh::Export, Mesh::Import, Mesh::SegmentByMesh, Mesh::SetOperations, Mesh::Sphere, Mesh::Ellipsoid, Mesh::Cylinder, Mesh::Cone, Mesh::Torus, Mesh::Cube, Mesh::Transform, Mesh::TransformDemolding, Mesh::Feature, PartDesign::Pad, PartDesign::Pocket, Points::Feature, Points::Structured, Part::Feature, PartDesign::FeaturePrimitive, App::FeatureTest, App::FeatureTestException, App::InventorObject, App::MeasureDistance, App::Origin, App::VRMLObject, Drawing::FeatureClip, Drawing::FeaturePage, Drawing::FeatureProjection, Drawing::FeatureView, Drawing::FeatureViewAnnotation, Drawing::FeatureViewPart, Drawing::FeatureViewSpreadsheet, Drawing::FeatureViewSymbol, Fem::ConstraintBearing, Fem::ConstraintContact, Fem::ConstraintDisplacement, Fem::ConstraintFixed, Fem::ConstraintFluidBoundary, Fem::ConstraintForce, Fem::ConstraintGear, Fem::ConstraintHeatflux, Fem::ConstraintInitialTemperature, Fem::ConstraintPlaneRotation, Fem::ConstraintPressure, Fem::ConstraintPulley, Fem::ConstraintSpring, Fem::ConstraintTemperature, Fem::ConstraintTransform, Fem::FemMeshObject, Fem::FemMeshShapeNetgenObject, Fem::FemMeshShapeObject, Fem::FemPostFilter, Fem::FemPostClipFilter, Fem::FemPostDataAlongLineFilter, Fem::FemPostDataAtPointFilter, Fem::FemPostScalarClipFilter, Fem::FemPostWarpVectorFilter, Fem::FemPostCutFilter, Fem::FemPostFunction, Fem::FemPostPipeline, Fem::FemResultObject, Fem::FemSetElementsObject, Fem::FemSetFacesObject, Fem::FemSetGeometryObject, Fem::FemSetNodesObject, Fem::FemSetObject, Fem::FemSolverObject, Inspection::Feature, Part::CustomFeature, Part::Chamfer, Part::Compound, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::FeatureReference, Part::RuledSurface, Part::Loft, Part::Sweep, Part::Thickness, Part::Refine, Part::Reverse, Part::Vertex, Part::Line, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Prism, Part::RegularPolygon, Part::Cone, Part::Torus, Part::Helix, Part::Spiral, Part::Wedge, Part::Ellipse, PartDesign::FeatureBase, PartDesign::Draft, PartDesign::Fillet, PartDesign::Groove, PartDesign::Helix, PartDesign::Hole, PartDesign::Loft, PartDesign::Pipe, PartDesign::Box, PartDesign::Cylinder, PartDesign::Sphere, PartDesign::Cone, PartDesign::Ellipsoid, PartDesign::Torus, PartDesign::Prism, PartDesign::Wedge, PartDesign::Revolution, PartDesign::Thickness, PartDesign::Transformed, Path::FeatureArea, Path::FeatureAreaView, Path::Feature, Path::FeatureCompound, Path::FeatureShape, Raytracing::LuxFeature, Raytracing::LuxProject, Raytracing::RayFeature, Raytracing::RayProject, Raytracing::RaySegment, Robot::Edge2TracObject, Robot::RobotObject, Robot::TrajectoryCompound, Robot::TrajectoryDressUpObject, Robot::TrajectoryObject, Sandbox::SandboxObject, Sketcher::SketchObjectSF, Spreadsheet::Sheet, Surface::Cut, Surface::Filling, Surface::GeomFillSurface, Surface::Sewing, TechDraw::DrawParametricTemplate, TechDraw::DrawRichAnno, TechDraw::DrawSVGTemplate, TechDraw::DrawTemplate, TechDraw::DrawTile, TechDraw::DrawTileWeld, TechDraw::DrawViewAnnotation, TechDraw::DrawViewClip, TechDraw::DrawViewCollection, TechDraw::DrawViewDimExtent, TechDraw::DrawViewSpreadsheet, TechDraw::DrawWeldSymbol, TechDraw::FeatureProjection, Part::Extrusion, Part::Face, Part::Offset, Part::Offset2D, Part::Revolution, Part::Part2DObject, Part::Primitive, PartDesign::Body, PartDesign::Boolean, PartDesign::Chamfer, PartDesign::ShapeBinder, PartDesign::SubShapeBinder, Sketcher::SketchObject, Surface::Extend, Surface::Sections, TechDraw::DrawGeomHatch, TechDraw::DrawHatch, TechDraw::DrawLeaderLine, TechDraw::DrawPage, TechDraw::DrawProjGroup, TechDraw::DrawProjGroupItem, TechDraw::DrawView, TechDraw::DrawViewArch, TechDraw::DrawViewBalloon, TechDraw::DrawViewDetail, TechDraw::DrawViewDimension, TechDraw::DrawViewDraft, TechDraw::DrawViewImage, TechDraw::DrawViewMulti, TechDraw::DrawViewPart, TechDraw::DrawViewSection, TechDraw::DrawViewSymbol, and TechDraw::LandmarkDimension.

Referenced by draftobjects.facebinder.Facebinder::addSubobjects(), PathScripts.PathDressupDogbone.ObjectDressup::boneStateList(), ArchSite.Compass::buildCoordinates(), App::Origin::execute(), Fem::FemPostPipeline::execute(), TechDraw::DrawTemplate::execute(), TechDraw::DrawPage::execute(), TechDraw::DrawView::execute(), TechDraw::DrawViewBalloon::execute(), PathScripts.PathDressupHoldingTags.ObjectTagDressup::generateTags(), ArchPanel.PanelCut::getWires(), ArchSchedule.CommandArchSchedule::IsActive(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt::onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder::onChanged(), Mod.PartDesign.Scripts.Spring.MySpring::onChanged(), FeaturePython.DistanceBolt::onChanged(), PathScripts.PathStock.StockFromBase::onChanged(), PathScripts.PathStock.StockCreateBox::onChanged(), PathScripts.PathStock.StockCreateCylinder::onChanged(), draftobjects.draftlink.DraftLink::onDocumentRestored(), draftobjects.patharray.PathArray::onDocumentRestored(), and draftobjects.pathtwistedarray.PathTwistedArray::onDocumentRestored().

◆ executeExtensions()

App::DocumentObjectExecReturn * App::DocumentObject::executeExtensions ( )
protected

Executes the extensions of a document object.

◆ getDocument()

App::Document * App::DocumentObject::getDocument ( void  ) const

gets the document in which this Object is handled

Referenced by PartGui::FaceColors::accept(), PartDesignGui::TaskPipeParameters::accept(), PartDesignGui::TaskShapeBinder::accept(), PathGui::TaskDlgPathCompound::accept(), SpreadsheetGui::DlgBindSheet::accept(), TechDrawGui::TaskCenterLine::accept(), TechDrawGui::TaskCosVertex::accept(), TechDrawGui::TaskDetail::accept(), TechDrawGui::TaskLeaderLine::accept(), TechDrawGui::TaskLineDecor::accept(), TechDrawGui::TaskProjGroup::accept(), TechDrawGui::TaskRichAnno::accept(), Gui::TaskCSysDragger::accept(), PartGui::DlgPrimitives::accept(), PartDesignGui::TaskDressUpParameters::addAllEdges(), Gui::ViewProviderDocumentObject::addDynamicProperty(), Sketcher::SketchObject::addExternal(), PartDesignGui::ComboLinks::addLink(), App::GroupExtension::addObject(), App::Document::addObject(), TechDraw::DrawProjGroup::addProjection(), App::PropertyLinkSubList::adjustLink(), PartDesignGui::ReferenceSelection::allow(), Gui::ExpressionBinding::apply(), Gui::ViewProviderAnnotation::attach(), Gui::ViewProviderOriginFeature::attach(), MeshGui::ViewProviderMesh::attach(), PointsGui::ViewProviderScattered::attach(), PointsGui::ViewProviderStructured::attach(), PartDesignGui::ViewProviderBody::attach(), MeshGui::ViewProviderMeshCurvature::attach(), Gui::ViewProviderVRMLObject::attach(), RobotGui::ViewProviderRobotObject::attach(), RobotGui::ViewProviderTrajectory::attach(), Sketcher::SketchAnalysis::autoconstraint(), Gui::ExpressionBinding::bind(), Gui::ViewProviderLink::canDragAndDropObject(), Sketcher::SketchObject::carbonCopy(), App::LinkBaseExtension::checkCopyOnChange(), PartDesign::SubShapeBinder::checkCopyOnChange(), App::LinkBaseExtension::checkGeoElementMap(), App::ObjectIdentifier::String::checkImport(), SpreadsheetGui::SheetView::confirmAliasChanged(), Gui::TreeWidget::contextMenuEvent(), Gui::DAG::Model::contextMenuEvent(), App::PropertyXLink::copyTo(), TechDrawGui::TaskActiveView::createActiveView(), TechDrawGui::TaskRichAnno::createAnnoFeature(), TechDrawGui::QGSPage::createBalloon(), TechDrawGui::TaskHatch::createHatch(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::TaskWeldingSymbol::createWeldingSymbol(), Gui::ViewProviderIndex::data(), SpreadsheetGui::DlgBindSheet::DlgBindSheet(), Gui::TreeWidget::dropEvent(), PartDesignGui::ViewProviderBody::dropObject(), TechDraw::DrawViewDetail::execute(), TechDraw::DrawViewDimension::execute(), TechDraw::DrawViewPart::execute(), TechDraw::DrawViewSection::execute(), Gui::ViewProviderOriginGroupExtension::extensionAttach(), App::LinkBaseExtension::extensionExecute(), App::OriginGroupExtension::extensionOnChanged(), Gui::ViewProviderDocumentObject::findFrontRootOfType(), PartDesignGui::fixSketchSupport(), Gui::ViewProviderDocumentObject::getActiveView(), TechDraw::DrawViewDimension::getDimValue(), Gui::ViewProviderDocumentObject::getDocument(), Gui::ViewProviderDocumentObject::getEditingView(), PartDesignGui::TaskSketchBasedParameters::getFaceReference(), TechDrawGui::QGIView::getFrameState(), InspectionGui::ViewProviderInspection::getIcon(), Fem::FemPostFilter::getInputData(), Gui::ViewProviderDocumentObject::getInventorView(), PartDesignGui::TaskDraftParameters::getLine(), App::GroupExtension::getObject(), Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), App::OriginFeature::getOrigin(), PartDesignGui::getPartFor(), PartDesignGui::TaskDraftParameters::getPlane(), App::PropertyLinkSubList::getPyReprString(), App::PropertyXLinkSubList::getPyReprString(), PartDesignGui::TaskExtrudeParameters::getReferenceAxis(), PartDesignGui::TaskHelixParameters::getReferenceAxis(), PartDesignGui::TaskRevolutionParameters::getReferenceAxis(), PartDesignGui::getReferencedSelection(), PartDesignGui::ViewProviderDatum::getRelevantBoundBox(), TechDraw::DrawViewPart::getSourceShape(), TechDraw::DrawViewPart::getSourceShapeFused(), Gui::ViewProviderDocumentObject::getViewOfNode(), PartDesign::ProfileBased::handleChangedPropertyName(), App::Expression::importSubNames(), App::ObjectIdentifier::importSubNames(), PartDesignGui::TaskTransformedParameters::indexesMoved(), Spreadsheet::PropertySheet::insertColumns(), Spreadsheet::PropertySheet::insertRows(), PartDesignGui::isAnyNonPartDesignLinksTo(), Sketcher::SketchObject::isCarbonCopyAllowed(), Sketcher::SketchObject::isExternalAllowed(), Gui::SelectionSingleton::isSelected(), TechDrawGui::TaskLinkDim::loadAvailDims(), MeshGui::RemeshGmsh::loadOutput(), PartDesignGui::makeBodyActive(), App::LinkBaseExtension::makeCopyOnChange(), TechDraw::DrawDimHelper::makeDistDim(), TechDraw::DrawDimHelper::makeExtentDim(), Gui::DAG::Model::mouseDoubleClickEvent(), Gui::DAG::Model::mousePressEvent(), PartDesignGui::TaskSketchBasedParameters::objectNameByLabel(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemSelectionChanged(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemEntered(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemSelectionChanged(), MeshGui::DlgEvaluateMeshImp::on_repairAllTogether_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDegeneratedButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedFacesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedPointsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairFoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairIndicesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairNonmanifoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairOrientationButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairSelfIntersectionButton_clicked(), PartDesignGui::TaskSketchBasedParameters::onAddSelection(), PartDesignGui::TaskBoxPrimitives::onBoxHeightChanged(), PartDesignGui::TaskBoxPrimitives::onBoxLengthChanged(), PartDesignGui::TaskBoxPrimitives::onBoxWidthChanged(), FemGui::TaskFemConstraint::onButtonWizCancel(), Sketcher::SketchObject::onChanged(), Gui::ViewProviderOrigin::onChanged(), PartDesign::DressUp::onChanged(), TechDraw::DrawTileWeld::onChanged(), PartDesign::Body::onChanged(), TechDraw::DrawGeomHatch::onChanged(), TechDraw::DrawHatch::onChanged(), TechDraw::DrawViewImage::onChanged(), TechDraw::DrawViewSection::onChanged(), PartDesignGui::TaskBoxPrimitives::onConeAngleChanged(), PartDesignGui::TaskBoxPrimitives::onConeHeightChanged(), PartDesignGui::TaskBoxPrimitives::onConeRadius1Changed(), PartDesignGui::TaskBoxPrimitives::onConeRadius2Changed(), PartDesignGui::TaskBoxPrimitives::onCylinderAngleChanged(), PartDesignGui::TaskBoxPrimitives::onCylinderHeightChanged(), PartDesignGui::TaskBoxPrimitives::onCylinderRadiusChanged(), PartDesignGui::TaskBoxPrimitives::onCylinderXSkewChanged(), PartDesignGui::TaskBoxPrimitives::onCylinderYSkewChanged(), PartDesignGui::TaskBoxPrimitives::onEllipsoidAngle1Changed(), PartDesignGui::TaskBoxPrimitives::onEllipsoidAngle2Changed(), PartDesignGui::TaskBoxPrimitives::onEllipsoidAngle3Changed(), PartDesignGui::TaskBoxPrimitives::onEllipsoidRadius1Changed(), PartDesignGui::TaskBoxPrimitives::onEllipsoidRadius2Changed(), PartDesignGui::TaskBoxPrimitives::onEllipsoidRadius3Changed(), App::OriginGroupExtension::onExtendedSetupObject(), App::OriginGroupExtension::onExtendedUnsetupObject(), Gui::TreeWidget::onPreSelectTimer(), PartDesignGui::TaskBoxPrimitives::onPrismCircumradiusChanged(), PartDesignGui::TaskBoxPrimitives::onPrismHeightChanged(), PartDesignGui::TaskBoxPrimitives::onPrismPolygonChanged(), PartDesignGui::TaskBoxPrimitives::onPrismXSkewChanged(), PartDesignGui::TaskBoxPrimitives::onPrismYSkewChanged(), Gui::ViewProviderDocumentObject::onPropertyStatusChanged(), Gui::TreeWidget::onSelectDependents(), PartGui::FaceColors::onSelectionChanged(), PartDesignGui::TaskBooleanParameters::onSelectionChanged(), PartDesignGui::TaskDraftParameters::onSelectionChanged(), SketcherGui::TaskSketcherConstraints::onSelectionChanged(), SketcherGui::TaskSketcherElements::onSelectionChanged(), SketcherGui::DrawSketchHandlerCarbonCopy::onSelectionChanged(), SketcherGui::DrawSketchHandlerExternal::onSelectionChanged(), TechDraw::DrawWeldSymbol::onSettingDocument(), PartDesignGui::TaskBoxPrimitives::onSphereAngle1Changed(), PartDesignGui::TaskBoxPrimitives::onSphereAngle2Changed(), PartDesignGui::TaskBoxPrimitives::onSphereAngle3Changed(), PartDesignGui::TaskBoxPrimitives::onSphereRadiusChanged(), PartDesignGui::TaskBoxPrimitives::onTorusAngle1Changed(), PartDesignGui::TaskBoxPrimitives::onTorusAngle2Changed(), PartDesignGui::TaskBoxPrimitives::onTorusAngle3Changed(), PartDesignGui::TaskBoxPrimitives::onTorusRadius1Changed(), PartDesignGui::TaskBoxPrimitives::onTorusRadius2Changed(), PartDesignGui::TaskBoxPrimitives::onWedgeX2maxChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeX2minChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeXmaxChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeXminChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeYmaxChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeYminChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeZ2maxChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeZ2minChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeZmaxChanged(), PartDesignGui::TaskBoxPrimitives::onWedgeZminChanged(), PartGui::FaceColors::open(), PartDesignGui::TaskTransformedParameters::originalSelected(), TechDrawGui::MDIViewPage::preSelectionChanged(), Gui::ElementColors::Private::Private(), FemGui::TaskDlgPost::recompute(), TechDrawGui::TaskBalloon::recomputeFeature(), TechDrawGui::TaskDimension::recomputeFeature(), TechDrawGui::TaskLeaderLine::recomputeFeature(), PartDesignGui::ViewProviderTransformed::recomputeFeature(), PartDesignGui::TaskDressUpParameters::referenceSelected(), PartDesignGui::TaskPipeParameters::referenceSelected(), PartDesignGui::TaskPipeOrientation::referenceSelected(), PartDesignGui::TaskPipeScaling::referenceSelected(), PartGui::DlgPrimitives::reject(), PartGui::FaceColors::reject(), PartDesignGui::TaskDlgFeatureParameters::reject(), TechDrawGui::TaskCenterLine::reject(), TechDrawGui::TaskCosVertex::reject(), TechDrawGui::TaskDetail::reject(), TechDrawGui::TaskGeomHatch::reject(), TechDrawGui::TaskLeaderLine::reject(), TechDrawGui::TaskLineDecor::reject(), TechDrawGui::TaskProjGroup::reject(), TechDrawGui::TaskRichAnno::reject(), DrawSketchHandlerGenConstraint::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), PartDesignGui::relinkToBody(), Spreadsheet::PropertySheet::removeColumns(), Gui::ViewProviderDocumentObject::removeDynamicProperty(), TechDraw::DrawProjGroup::removeProjection(), Spreadsheet::PropertySheet::removeRows(), TechDraw::DrawPage::removeView(), App::ObjectIdentifier::replaceObject(), App::ObjectIdentifier::resolve(), App::ObjectIdentifier::resolveAmbiguity(), App::PropertyLink::Restore(), App::PropertyLinkList::Restore(), App::PropertyLinkSubList::Restore(), App::VRMLObject::RestoreDocFile(), Gui::SelectionSingleton::sAddSelection(), App::VRMLObject::SaveDocFile(), TechDrawGui::QGSPage::saveSvg(), Gui::SelectionObserver::SelectionObserver(), FemGui::ActiveAnalysisObserver::setActiveObject(), Spreadsheet::PropertySheet::setAlias(), App::ObjectIdentifier::setDocumentObjectName(), RaytracingGui::ViewProviderLux::setEdit(), RaytracingGui::ViewProviderPovray::setEdit(), TechDrawGui::ViewProviderViewPart::setEdit(), SurfaceGui::FillingPanel::setEditedObject(), SurfaceGui::FillingEdgePanel::setEditedObject(), SurfaceGui::FillingVertexPanel::setEditedObject(), SurfaceGui::GeomFillSurface::setEditedObject(), SurfaceGui::SectionsPanel::setEditedObject(), SketcherGui::ViewProviderSketch::setEditViewer(), App::LinkBaseExtension::setLink(), Spreadsheet::PropertySheet::setPathValue(), PartDesignGui::TaskDressUpParameters::setSelection(), TechDrawGui::ViewProviderPage::setTemplateMarkers(), TechDrawGui::MDIViewPage::setTreeToSceneSelect(), PartDesignGui::Workbench::setupContextMenu(), TechDraw::DrawHatch::setupFileIncluded(), TechDraw::DrawViewImage::setupImageIncluded(), App::Origin::setupObject(), TechDraw::DrawGeomHatch::setupPatIncluded(), TechDraw::DrawViewSection::setupPatIncluded(), TechDraw::DrawViewSection::setupSvgIncluded(), TechDraw::DrawTileWeld::setupSymbolIncluded(), PartDesignGui::TaskSketchBasedParameters::setUpToFace(), App::PropertyLink::setValue(), App::PropertyXLink::setValue(), App::PropertyLinkSub::setValue(), FemGui::FunctionWidget::setViewProvider(), PartDesignGui::ViewProviderBody::setVisualBodyMode(), MeshGui::Annotation::show(), DrawingGui::ViewProviderDrawingPage::showDrawingView(), TechDrawGui::ViewProviderPage::showMDIViewPage(), SpreadsheetGui::ViewProviderSheet::showSpreadsheetView(), Gui::SelectionSingleton::slotDeletedObject(), Gui::DocumentItem::slotExpandObject(), Gui::DocumentItem::slotHighlightObject(), Gui::SelectionSingleton::sRemoveSelection(), Gui::SelectionSingleton::sSetPreselection(), Gui::SelectionSingleton::sUpdateSelection(), App::LinkBaseExtension::syncCopyOnChange(), TechDrawGui::TaskCosVertex::TaskCosVertex(), TechDrawGui::TaskDetail::TaskDetail(), FemGui::TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(), TechDrawGui::TaskLeaderLine::TaskLeaderLine(), TechDrawGui::TaskProjGroup::TaskProjGroup(), TechDrawGui::TaskRichAnno::TaskRichAnno(), TechDrawGui::TaskSectionView::TaskSectionView(), PartDesignGui::ViewProviderBody::unifyVisualProperty(), PartDesignGui::ViewProvider::unsetEdit(), TechDraw::DrawViewCollection::unsetupObject(), TechDraw::DrawPage::unsetupObject(), TechDraw::DrawViewPart::unsetupObject(), App::LinkBaseExtension::update(), PartDesign::SubShapeBinder::update(), Gui::ViewProviderInventorObject::updateData(), DrawingGui::ViewProviderDrawingPage::updateData(), MeshGui::ViewProviderMeshCurvature::updateData(), TechDrawGui::TaskLinkDim::updateDims(), TechDrawGui::ViewProviderGeomHatch::updateGraphic(), PartDesignGui::ViewProviderBody::updateOriginDatumSize(), and PartGui::DlgExtrusion::writeParametersToFeature().

◆ getExportName()

std::string App::DocumentObject::getExportName ( bool  forced = false) const

returns the name that is safe to be exported to other document

◆ getExpression()

◆ getFullName()

◆ getGroup()

DocumentObjectGroup * App::DocumentObject::getGroup ( ) const

get group if object is part of a group, otherwise 0 is returned

Referenced by PartGui::DlgBooleanOperation::accept().

◆ getID()

long App::DocumentObject::getID ( ) const

Return the object ID that is unique within its owner document.

Referenced by Gui::DocumentItem::findRootIndex().

◆ getInList()

◆ getInListEx() [1/2]

std::set< App::DocumentObject * > App::DocumentObject::getInListEx ( bool  recursive) const

Return a set of all objects linking to this object, including possible external parent objects.

Parameters
recursive[in]: whether to obtain recursive in list

◆ getInListEx() [2/2]

void App::DocumentObject::getInListEx ( std::set< App::DocumentObject * > &  inSet,
bool  recursive,
std::vector< App::DocumentObject * > *  inList = nullptr 
) const

Get a set of all objects linking to this object, including possible external parent objects.

Parameters
inSet[out]: a set containing all objects linking to this object.
recursive[in]: whether to obtain recursive in list
inList[in, out]: optional pointer to a vector holding the output objects, with the furthest linking object ordered last.

Referenced by Gui::TreeWidget::dropEvent(), PartDesign::SubShapeBinder::setLinks(), and App::PropertyExpressionEngine::validateExpression().

◆ getInListRecursive()

std::vector< App::DocumentObject * > App::DocumentObject::getInListRecursive ( void  ) const

get all objects link directly or indirectly to this object

◆ getLinkedObject()

virtual DocumentObject * App::DocumentObject::getLinkedObject ( bool  recurse = true,
Base::Matrix4D mat = nullptr,
bool  transform = false,
int  depth = 0 
) const
virtual

Return the linked object with optional transformation.

Parameters
recurseIf false, return the immediate linked object, or else recursively call this function to return the final linked object.
matIf non zero, it is used as the current transformation matrix on input. And output as the accumulated transformation till the final linked object.
transformif false, then it will not accumulate the object's own placement into mat, which lets you override the object's placement.
Returns
Return the linked object. This function must return itself if the it is not a link or the link is invalid.

Referenced by Gui::ViewProviderLink::getElementColors(), Gui::ViewProviderLink::getLinkedView(), Gui::ViewProviderDocumentObject::getLinkedViewProvider(), Part::Feature::getShapeOwner(), Gui::DocumentObjectItem::isGroup(), Gui::DocumentObjectItem::isLink(), Gui::DocumentObjectItem::isLinkFinal(), Gui::DocumentItem::populateItem(), Gui::ViewProviderLink::startEditing(), and Gui::DocumentObjectItem::testStatus().

◆ getNameInDocument()

const char * App::DocumentObject::getNameInDocument ( void  ) const

returns the name which is set in the document for this object (not the name property!)

Referenced by FemGui::TaskDlgFemConstraint::accept(), FemGui::TaskDlgFemConstraintBearing::accept(), FemGui::TaskDlgFemConstraintContact::accept(), FemGui::TaskDlgFemConstraintDisplacement::accept(), FemGui::TaskDlgFemConstraintFixed::accept(), FemGui::TaskDlgFemConstraintFluidBoundary::accept(), FemGui::TaskDlgFemConstraintForce::accept(), FemGui::TaskDlgFemConstraintGear::accept(), FemGui::TaskDlgFemConstraintHeatflux::accept(), FemGui::TaskDlgFemConstraintInitialTemperature::accept(), FemGui::TaskDlgFemConstraintPlaneRotation::accept(), FemGui::TaskDlgFemConstraintPressure::accept(), FemGui::TaskDlgFemConstraintPulley::accept(), FemGui::TaskDlgFemConstraintSpring::accept(), FemGui::TaskDlgFemConstraintTemperature::accept(), FemGui::TaskDlgFemConstraintTransform::accept(), MeshGui::Segmentation::accept(), MeshGui::SegmentationBestFit::accept(), PartGui::DlgBooleanOperation::accept(), PartGui::DlgRevolution::accept(), ReverseEngineeringGui::Segmentation::accept(), PartGui::DlgPrimitives::accept(), TechDraw::DrawProjGroup::addProjection(), App::PropertyLinkSubList::adjustLink(), App::ObjectIdentifier::adjustLinks(), PartDesignGui::TaskChamferParameters::apply(), PartDesignGui::TaskFilletParameters::apply(), PartDesignGui::TaskScaledParameters::apply(), Gui::ExpressionBinding::apply(), TechDraw::DrawProjGroup::arrangeViewPointers(), Gui::ViewProviderAnnotation::attach(), Gui::ViewProviderOriginFeature::attach(), MeshGui::ViewProviderMesh::attach(), PointsGui::ViewProviderScattered::attach(), PointsGui::ViewProviderStructured::attach(), Gui::ViewProviderDocumentObject::attach(), Gui::ViewProviderVRMLObject::attach(), RobotGui::ViewProviderRobotObject::attach(), RobotGui::ViewProviderTrajectory::attach(), TechDraw::DrawViewPart::buildGeometryObject(), TechDraw::DrawProjGroup::calculateAutomaticScale(), TechDraw::DrawViewDimension::checkReferences2D(), TechDraw::DrawViewPart::checkXDirection(), Gui::DAG::Model::contextMenuEvent(), App::PropertyXLink::copyTo(), TechDrawGui::TaskActiveView::createActiveView(), TechDrawGui::TaskRichAnno::createAnnoFeature(), TechDrawGui::QGSPage::createBalloon(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::TaskWeldingSymbol::createWeldingSymbol(), SpreadsheetGui::SheetTableView::deleteSelection(), TechDraw::DrawViewDetail::detailExec(), Gui::DocumentObjectItem::displayStatusInfo(), Gui::TreeWidget::dropEvent(), Raytracing::LuxFeature::execute(), Raytracing::RayFeature::execute(), Sketcher::SketchObjectSF::execute(), TechDraw::DrawViewArch::execute(), TechDraw::DrawViewDetail::execute(), TechDraw::DrawViewDimension::execute(), TechDraw::DrawViewDraft::execute(), TechDraw::DrawViewMulti::execute(), TechDraw::DrawViewPart::execute(), TechDraw::DrawViewSection::execute(), TechDraw::DrawViewSymbol::execute(), PartDesignGui::TaskBooleanParameters::exitSelectionMode(), App::Document::exportGraphviz(), App::OriginGroupExtension::extensionGetSubObject(), TechDraw::DrawViewPart::extractFaces(), MeshGui::ViewProviderMesh::faceInfo(), TechDrawGui::DrawGuiUtil::findPage(), TechDrawGui::QGSPage::findParent(), Gui::DocumentItem::findRootIndex(), PartDesignGui::TaskSketchBasedParameters::finishReferenceSelection(), PartDesignGui::TaskHelixParameters::finishReferenceSelection(), TechDrawGui::MDIViewPage::fixOrphans(), TechDraw::DrawViewDimension::formatValue(), PartGui::getAutoGroupCommandStr(), TechDraw::DrawLeaderLine::getBaseScale(), TechDraw::DrawProjGroup::getBoundingBox(), TechDraw::DrawViewDimension::getDimValue(), TechDraw::DrawProjGroup::getDirsFromFront(), Gui::LinkInfo::getLinkedName(), Gui::ViewProviderDocumentObject::getLinkedViewProvider(), Gui::ViewProviderLink::getLinkExtension(), Gui::DocumentObjectItem::getName(), Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), TechDraw::DrawViewDimension::getPointsEdgeVert(), TechDraw::DrawViewDimension::getPointsOneEdge(), TechDraw::DrawViewDimension::getPointsTwoEdges(), TechDraw::DrawViewDimension::getPointsTwoVerts(), TechDraw::DrawViewDimension::getPrefixSuffixSpec(), TechDraw::DrawViewPart::getProjectionCS(), TechDraw::DrawProjGroup::getProjItem(), TechDraw::DrawProjGroup::getProjObj(), App::VRMLObject::getRelativePath(), TechDraw::DrawView::getScale(), TechDraw::DrawLeaderLine::getScale(), TechDraw::DrawProjGroupItem::getScale(), TechDraw::DrawViewSection::getSectionCS(), Gui::TreeWidget::getSelection(), TechDraw::ShapeExtractor::getShapesFromObject(), TechDraw::DrawViewSpreadsheet::getSheetImage(), Gui::LinkInfo::getSnapshot(), TechDraw::DrawViewPart::getSourceShape(), TechDraw::DrawViewPart::getSourceShapeFused(), TechDraw::DrawProjGroupItem::getViewAxis(), TechDraw::DrawProjGroup::getViewIndex(), TechDraw::DrawProjGroup::hasProjection(), App::PropertyExpressionEngine::hasSetValue(), Spreadsheet::PropertySheet::hasSetValue(), TechDrawGui::TaskLineDecor::initUi(), Gui::LinkInfo::isLinked(), Gui::SelectionSingleton::isSelected(), TechDrawGui::TaskLinkDim::loadToTree(), TechDraw::DrawDimHelper::makeDistDim(), TechDraw::DrawDimHelper::makeExtentDim(), TechDraw::DrawViewSection::makeLineSets(), Gui::DAG::Model::mousePressEvent(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemSelectionChanged(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemEntered(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemSelectionChanged(), MeshGui::DlgEvaluateMeshImp::on_repairAllTogether_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDegeneratedButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedFacesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedPointsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairFoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairIndicesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairNonmanifoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairOrientationButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairSelfIntersectionButton_clicked(), PartDesignGui::TaskSketchBasedParameters::onAddSelection(), FemGui::TaskFemConstraint::onButtonWizCancel(), TechDraw::DrawPage::onChanged(), TechDraw::DrawViewDimension::onChanged(), TechDraw::DrawViewSymbol::onChanged(), App::OriginGroupExtension::onExtendedUnsetupObject(), Gui::TreeWidget::onPreSelectTimer(), PartGui::FaceColors::onSelectionChanged(), PartDesignGui::TaskBooleanParameters::onSelectionChanged(), SketcherGui::TaskSketcherConstraints::onSelectionChanged(), SketcherGui::TaskSketcherElements::onSelectionChanged(), TechDrawGui::QGILeaderLine::onSourceChange(), App::DocumentObjectT::operator=(), TechDraw::DrawViewPart::partExec(), TechDrawGui::MDIViewPage::preSelectionChanged(), Gui::ElementColors::Private::Private(), TechDraw::DrawProjGroup::purgeProjections(), TechDrawGui::QGSPage::QGSPage(), TechDrawGui::QGVPage::QGVPage(), Attacher::AttachEngine::readLinks(), App::Document::recomputeFeature(), TechDrawGui::MDIViewPage::redraw1View(), PartDesignGui::TaskPipeParameters::referenceSelected(), PartDesignGui::TaskPipeOrientation::referenceSelected(), PartDesignGui::TaskPipeScaling::referenceSelected(), PartGui::ThicknessWidget::reject(), TechDrawGui::TaskGeomHatch::reject(), TechDrawGui::TaskProjGroup::reject(), TechDrawGui::TaskSectionView::reject(), DrawSketchHandlerGenConstraint::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), TechDrawGui::TaskLeaderLine::removeFeature(), TechDrawGui::TaskRichAnno::removeFeature(), App::Document::removeObject(), TechDraw::DrawProjGroup::removeProjection(), TechDraw::DrawPage::removeView(), Gui::ViewProviderPythonFeatureImp::replaceObject(), Gui::ViewProviderDocumentObject::replaceObject(), App::ObjectIdentifier::resolve(), App::ObjectIdentifier::resolveAmbiguity(), App::VRMLObject::RestoreDocFile(), Gui::SelectionSingleton::sAddSelection(), App::Document::save(), TechDrawGui::MDIViewPage::saveDXF(), TechDrawGui::QGSPage::saveSvg(), TechDrawGui::TaskProjGroup::scaleManuallyChanged(), TechDraw::DrawViewSection::sectionExec(), Gui::SelectionObserver::SelectionObserver(), PartGui::DlgExtrusion::setAxisLink(), PartGui::DlgRevolution::setAxisLink(), SpreadsheetGui::WorkbenchHelper::setBackgroundColor(), App::ObjectIdentifier::setDocumentObjectName(), PartDesignGui::setEdit(), PartDesignGui::ViewProviderDressUp::setEdit(), TechDrawGui::ViewProviderViewPart::setEdit(), SketcherGui::ViewProviderSketch::setEditViewer(), TechDrawGui::QGIWeldSymbol::setFeature(), SpreadsheetGui::WorkbenchHelper::setForegroundColor(), PartDesignGui::TaskDressUpParameters::setSelection(), TechDrawGui::MDIViewPage::setTreeToSceneSelect(), TechDrawGui::TaskSectionView::setUiEdit(), TechDrawGui::TaskCenterLine::setUiEdit(), TechDrawGui::TaskLeaderLine::setUiEdit(), TechDrawGui::TaskRichAnno::setUiEdit(), TechDrawGui::TaskDetail::setUiFromFeat(), TechDrawGui::TaskSectionView::setUiPrimary(), TechDrawGui::TaskCenterLine::setUiPrimary(), TechDrawGui::TaskCosVertex::setUiPrimary(), TechDrawGui::TaskLeaderLine::setUiPrimary(), TechDrawGui::TaskRichAnno::setUiPrimary(), TechDraw::DrawHatch::setupFileIncluded(), TechDraw::DrawViewImage::setupImageIncluded(), TechDraw::DrawGeomHatch::setupPatIncluded(), TechDraw::DrawViewSection::setupPatIncluded(), TechDraw::DrawViewSection::setupSvgIncluded(), TechDraw::DrawTileWeld::setupSymbolIncluded(), App::PropertyXLink::setValue(), App::PropertyLinkSub::setValue(), Gui::SelectionSingleton::setVisible(), DrawingGui::ViewProviderDrawingPage::showDrawingView(), Gui::SelectionSingleton::slotDeletedObject(), Sketcher::SketchObject::solve(), MeshGui::ViewProviderMesh::splitMesh(), Gui::SelectionSingleton::sRemoveSelection(), Gui::SelectionSingleton::sSetPreselection(), PartDesignGui::TaskSketchBasedParameters::startReferenceSelection(), PartDesignGui::TaskHelixParameters::startReferenceSelection(), Gui::SelectionSingleton::sUpdateSelection(), TechDrawGui::TaskDetail::TaskDetail(), FemGui::TaskObjectName::TaskObjectName(), TechDrawGui::TaskSectionView::TaskSectionView(), Gui::DocumentObjectItem::testStatus(), App::PropertyLinkBase::tryReplaceLink(), PartDesignGui::ViewProvider::unsetEdit(), TechDraw::DrawPage::unsetupObject(), TechDraw::DrawProjGroupItem::unsetupObject(), App::LinkBaseExtension::update(), PartDesignGui::ViewProviderAddSub::updateAddSubShapeIndicator(), TechDraw::DrawProjGroup::updateChildrenEnforce(), TechDraw::DrawProjGroup::updateChildrenLock(), TechDraw::DrawProjGroup::updateChildrenScale(), TechDraw::DrawProjGroup::updateChildrenSource(), Gui::ViewProviderInventorObject::updateData(), Gui::ViewProviderVRMLObject::updateData(), TechDrawGui::TaskLinkDim::updateDims(), TechDrawGui::TaskHatch::updateHatch(), Gui::DocumentItem::updateItemSelection(), App::PropertyLinkBase::updateLabelReference(), TechDrawGui::MDIViewPage::updateTemplate(), TechDrawGui::TaskWeldingSymbol::updateTiles(), TechDraw::DrawProjGroup::updateViews(), TechDrawGui::TaskWeldingSymbol::updateWeldingSymbol(), TechDrawGui::TaskProjGroup::viewToggled(), and PartGui::DlgExtrusion::writeParametersToFeature().

◆ getOldLabel()

const std::string & App::DocumentObject::getOldLabel ( ) const

◆ getOutList() [1/3]

const std::vector< App::DocumentObject * > & App::DocumentObject::getOutList ( ) const

returns a list of objects this object is pointing to by Links

Referenced by App::Document::exportGraphviz(), and TechDraw::DrawViewCollection::rebuildViewList().

◆ getOutList() [2/3]

std::vector< App::DocumentObject * > App::DocumentObject::getOutList ( int  option) const

◆ getOutList() [3/3]

void App::DocumentObject::getOutList ( int  option,
std::vector< App::DocumentObject * > &  res 
) const

◆ getOutListOfProperty()

std::vector< App::DocumentObject * > App::DocumentObject::getOutListOfProperty ( App::Property ) const

returns a list of objects linked by the property

◆ getOutListRecursive()

std::vector< App::DocumentObject * > App::DocumentObject::getOutListRecursive ( void  ) const

returns a list of objects this object is pointing to by Links and all further descended

◆ getParents()

std::vector< std::pair< App::DocumentObject *, std::string > > App::DocumentObject::getParents ( int  depth = 0) const

Obtain top parents and subnames of this object using its InList.

Referenced by PartDesignGui::makeBodyActive(), and PartDesign::SubShapeBinder::update().

◆ getPathsByOutList()

std::vector< std::list< App::DocumentObject * > > App::DocumentObject::getPathsByOutList ( App::DocumentObject to) const

get all possible paths from this to another object following the OutList

◆ getPyObject()

virtual PyObject * App::DocumentObject::getPyObject ( void  )
overridevirtual

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Reimplemented from Base::BaseClass.

Reimplemented in Fem::FemPostPipeline, Mesh::Feature, Spreadsheet::Sheet, App::DocumentObjectGroup, App::Part, Part::BodyBase, Part::Feature, Part::Primitive, PartDesign::FeaturePrimitive, App::GeoFeature, App::InventorObject, App::VRMLObject, Fem::FemMeshObject, Fem::FemResultObject, Fem::FemSetElementsObject, Fem::FemSetFacesObject, Fem::FemSetGeometryObject, Fem::FemSetNodesObject, Fem::FemSetObject, Fem::FemSolverObject, PartDesign::Feature, Path::FeatureArea, Path::Feature, Path::FeatureCompound, Robot::RobotObject, Robot::TrajectoryObject, TechDraw::DrawParametricTemplate, TechDraw::DrawRichAnno, TechDraw::DrawSVGTemplate, TechDraw::DrawTemplate, TechDraw::DrawTile, TechDraw::DrawTileWeld, TechDraw::DrawViewClip, TechDraw::DrawViewDimExtent, TechDraw::DrawWeldSymbol, PartDesign::Body, Sketcher::SketchObject, TechDraw::DrawGeomHatch, TechDraw::DrawHatch, TechDraw::DrawLeaderLine, TechDraw::DrawPage, TechDraw::DrawProjGroup, TechDraw::DrawProjGroupItem, TechDraw::DrawView, TechDraw::DrawViewDimension, TechDraw::DrawViewPart, and TechDraw::DrawViewSymbol.

Referenced by Gui::ViewProviderPythonFeatureImp::canDropObjectEx(), Gui::ViewProviderPythonFeatureImp::dropObjectEx(), App::LinkBaseExtension::extensionExecute(), Gui::MDIViewPy::getActiveObject(), Gui::View3DInventorPy::getActiveObject(), Gui::View3DInventorPy::getattr(), App::RangeExpression::getRange(), App::FeaturePythonImp::redirectSubName(), and Gui::ViewProviderPythonFeatureImp::replaceObject().

◆ getStatus()

unsigned long App::DocumentObject::getStatus ( ) const

return the status bits

◆ getStatusString()

◆ getSubObject()

virtual DocumentObject * App::DocumentObject::getSubObject ( const char *  subname,
PyObject **  pyObj = nullptr,
Base::Matrix4D mat = nullptr,
bool  transform = true,
int  depth = 0 
) const
virtual

Get the sub element/object by name.

Parameters
subnamea string which is dot separated name to refer to a sub element or object. An empty string can be used to refer to the object itself
pyObjif non zero, returns the python object corresponding to this sub object. The actual type of this python object is implementation dependent. For example, The current implementation of Part::Feature will return the TopoShapePy, event if there is no sub-element reference, in which case it returns the whole shape.
matIf non zero, it is used as the current transformation matrix on input. And output as the accumulated transformation up until and include the transformation applied by the final object reference in subname. For Part::Feature, the transformation is applied to the TopoShape inside pyObj before returning.
transformif false, then it will not apply the object's own transformation to mat, which lets you override the object's placement (and possibly scale).
depthdepth limitation as hint for cyclic link detection
Returns
The last document object referred in subname. If subname is empty, then it shall return itself. If subname is invalid, then it shall return zero.

Reimplemented in Part::Datum, Part::Feature, PartDesign::Body, PartDesign::CoordinateSystem, and PartDesign::SubShapeBinder.

Referenced by App::PropertyLinkSubList::adjustLink(), App::GeoFeatureGroupExtension::extensionGetSubObject(), App::GroupExtension::extensionGetSubObject(), App::OriginGroupExtension::extensionGetSubObject(), App::LinkBaseExtension::extensionGetSubObject(), Gui::DocumentItem::findItem(), Part::Feature::getShapeOwner(), Part::Feature::getSubObject(), App::ObjectIdentifier::resolveProperty(), App::PropertyLinkBase::restoreLabelReference(), Gui::Document::setEdit(), App::PropertyLinkBase::tryReplaceLink(), App::PropertyLinkBase::updateLabelReference(), and Gui::LinkView::updateLink().

◆ getSubObjectList()

std::vector< DocumentObject * > App::DocumentObject::getSubObjectList ( const char *  subname) const

Return a list of objects referenced by a given subname including this object.

◆ getSubObjects()

virtual std::vector< std::string > App::DocumentObject::getSubObjects ( int  reason = 0) const
virtual

Return name reference of all sub-objects.

Parameters
reasonindicate reason of obtaining the sub objects

The default implementation returns all object references in PropertyLink, and PropertyLinkList, if any

Returns
Return a vector of subname references for all sub-objects. In most cases, the name returned will be the object name plus an ending '.', which can be passed directly to getSubObject() to retrieve the name. The reason to return the name reference instead of the sub object itself is because there may be no real sub object, or the sub object need special transformation. For example, sub objects of an array type of object.

Reimplemented in PartDesign::Body.

Referenced by App::LinkBaseExtension::extensionGetSubObjects(), and PartDesign::Body::getSubObjects().

◆ getViewProviderName()

virtual const char * App::DocumentObject::getViewProviderName ( void  ) const
virtual

returns the type name of the ViewProvider

Reimplemented in App::TextDocument, Fem::FemAnalysis, Fem::Constraint, Image::ImagePlane, Mesh::Curvature, Mesh::Export, Mesh::Transform, Mesh::TransformDemolding, Mesh::Feature, PartDesign::Feature, PartDesign::FeatureBase, PartDesign::Pad, Points::Feature, Points::Structured, App::DocumentObjectGroup, App::Part, Part::Feature, App::Annotation, App::AnnotationLabel, App::DocumentObjectFileIncluded, App::FeatureTest, App::FeatureTestException, App::InventorObject, App::MaterialObject, App::MeasureDistance, App::Origin, App::Plane, App::Line, App::Placement, App::VRMLObject, Drawing::FeatureClip, Drawing::FeaturePage, Drawing::FeatureView, Drawing::FeatureViewAnnotation, Drawing::FeatureViewPart, Drawing::FeatureViewSpreadsheet, Drawing::FeatureViewSymbol, Drawing::PageGroup, Fem::ConstraintBearing, Fem::ConstraintContact, Fem::ConstraintDisplacement, Fem::ConstraintFixed, Fem::ConstraintFluidBoundary, Fem::ConstraintForce, Fem::ConstraintGear, Fem::ConstraintHeatflux, Fem::ConstraintInitialTemperature, Fem::ConstraintPlaneRotation, Fem::ConstraintPressure, Fem::ConstraintPulley, Fem::ConstraintSpring, Fem::ConstraintTemperature, Fem::ConstraintTransform, Fem::FemMeshObject, Fem::FemMeshShapeNetgenObject, Fem::FemMeshShapeObject, Fem::FemPostClipFilter, Fem::FemPostDataAlongLineFilter, Fem::FemPostDataAtPointFilter, Fem::FemPostScalarClipFilter, Fem::FemPostWarpVectorFilter, Fem::FemPostCutFilter, Fem::FemPostFunction, Fem::FemPostFunctionProvider, Fem::FemPostPlaneFunction, Fem::FemPostSphereFunction, Fem::FemPostPipeline, Fem::FemResultObject, Fem::FemSetElementsObject, Fem::FemSetFacesObject, Fem::FemSetGeometryObject, Fem::FemSetNodesObject, Fem::FemSolverObject, Inspection::Feature, Inspection::Group, Part::CustomFeature, Part::Chamfer, Part::Compound, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Spline, Part::FeatureExt, Part::FeatureReference, Part::RuledSurface, Part::Loft, Part::Sweep, Part::Thickness, Part::Refine, Part::Reverse, Part::Vertex, Part::Line, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Prism, Part::RegularPolygon, Part::Cone, Part::Torus, Part::Helix, Part::Spiral, Part::Wedge, Part::Ellipse, PartDesign::Line, PartDesign::Plane, PartDesign::Draft, PartDesign::Fillet, PartDesign::Groove, PartDesign::Helix, PartDesign::Hole, PartDesign::LinearPattern, PartDesign::Loft, PartDesign::Mirrored, PartDesign::MultiTransform, PartDesign::Pipe, PartDesign::Pocket, PartDesign::PolarPattern, PartDesign::Revolution, PartDesign::Scaled, PartDesign::Thickness, Path::FeatureArea, Path::FeatureAreaView, Path::Feature, Path::FeatureCompound, Path::FeatureShape, Raytracing::LuxFeature, Raytracing::LuxProject, Raytracing::RayFeature, Raytracing::RayProject, Raytracing::RaySegment, Robot::Edge2TracObject, Robot::RobotObject, Robot::TrajectoryCompound, Robot::TrajectoryDressUpObject, Robot::TrajectoryObject, Sandbox::SandboxObject, Spreadsheet::Sheet, Surface::Filling, Surface::GeomFillSurface, TechDraw::DrawParametricTemplate, TechDraw::DrawRichAnno, TechDraw::DrawSVGTemplate, TechDraw::DrawTemplate, TechDraw::DrawTile, TechDraw::DrawTileWeld, TechDraw::DrawViewAnnotation, TechDraw::DrawViewClip, TechDraw::DrawViewCollection, TechDraw::DrawViewSpreadsheet, TechDraw::DrawWeldSymbol, App::Link, App::LinkElement, App::LinkGroup, Part::Extrusion, Part::Face, Part::Offset, Part::Offset2D, Part::Revolution, Part::Part2DObject, PartDesign::Body, PartDesign::CoordinateSystem, PartDesign::Point, PartDesign::Boolean, PartDesign::Chamfer, PartDesign::FeaturePrimitive, PartDesign::ShapeBinder, PartDesign::SubShapeBinder, Sketcher::SketchObject, Surface::Extend, Surface::Sections, TechDraw::DrawGeomHatch, TechDraw::DrawHatch, TechDraw::DrawLeaderLine, TechDraw::DrawPage, TechDraw::DrawProjGroup, TechDraw::DrawProjGroupItem, TechDraw::DrawView, TechDraw::DrawViewArch, TechDraw::DrawViewBalloon, TechDraw::DrawViewDetail, TechDraw::DrawViewDimension, TechDraw::DrawViewDraft, TechDraw::DrawViewImage, TechDraw::DrawViewMulti, TechDraw::DrawViewPart, TechDraw::DrawViewSection, TechDraw::DrawViewSymbol, TechDraw::LandmarkDimension, and Part::Datum.

Referenced by Gui::FreeCADGui_subgraphFromObject(), and Gui::Document::slotNewObject().

◆ getViewProviderNameOverride()

virtual const char * App::DocumentObject::getViewProviderNameOverride ( ) const
virtual

This function is introduced to allow Python feature override its view provider.

The default implementation just returns getViewProviderName().

The core will only accept the overridden view provider if it returns true when calling Gui::ViewProviderDocumentObject::allowOverride(obj). If not, the view provider will be reverted to the one returned from getViewProviderName().

Referenced by App::Document::addObject(), and App::Document::addObjects().

◆ getViewProviderNameStored()

const char * App::DocumentObject::getViewProviderNameStored ( ) const

◆ hasChildElement()

virtual bool App::DocumentObject::hasChildElement ( ) const
virtual

return true to activate tree view group object handling and element visibility

Referenced by App::LinkBaseExtension::extensionHasChildElement().

◆ hasHiddenMarker()

static const char * App::DocumentObject::hasHiddenMarker ( const char *  subname)
static

Check if the subname reference ends with hidden marker.

Referenced by Gui::ViewProvider::hasHiddenMarker(), and App::GeoFeature::resolveElement().

◆ hiddenMarker()

static const std::string & App::DocumentObject::hiddenMarker ( )
static

Special marker to mark the object as hidden.

It is used by Gui::ViewProvider::getElementColors(), but exposed here for convenience

Referenced by Gui::ViewProvider::hiddenMarker().

◆ isAttachedToDocument()

virtual bool App::DocumentObject::isAttachedToDocument ( ) const
overridevirtual

Reimplemented from App::TransactionalObject.

◆ isElementVisible()

virtual int App::DocumentObject::isElementVisible ( const char *  element) const
virtual

Get sub-element visibility.

Returns
-1 if element visibility is not supported or element not found, 0 if element is invisible, or else 1

Referenced by App::LinkBaseExtension::extensionIsElementVisible(), and Gui::SelectionSingleton::setVisible().

◆ isError()

◆ isExporting()

int App::DocumentObject::isExporting ( ) const

◆ isInInList()

bool App::DocumentObject::isInInList ( DocumentObject objToTest) const

test if this object is directly (non recursive) in the InList

◆ isInInListRecursive()

bool App::DocumentObject::isInInListRecursive ( DocumentObject objToTest) const

test if this object is in the InList and recursive further down

◆ isInOutList()

bool App::DocumentObject::isInOutList ( DocumentObject objToTest) const

test if this object is directly (non recursive) in the OutList

◆ isInOutListRecursive()

bool App::DocumentObject::isInOutListRecursive ( DocumentObject objToTest) const

test if the given object is in the OutList and recursive further down

◆ isRecomputing()

bool App::DocumentObject::isRecomputing ( ) const

returns true if this objects is currently recomputing

Referenced by Fem::Constraint::onChanged(), Part::Feature::onChanged(), and PartDesign::MultiTransform::positionBySupport().

◆ isRemoving()

bool App::DocumentObject::isRemoving ( ) const

◆ isRestoring()

bool App::DocumentObject::isRestoring ( ) const

returns true if this objects is currently restoring from file

Referenced by PartDesign::ShapeBinder::execute(), TechDraw::DrawViewDetail::execute(), TechDraw::DrawViewDimension::execute(), TechDraw::DrawViewPart::execute(), TechDraw::DrawViewSection::execute(), TechDraw::DrawViewDimension::getDimValue(), TechDraw::DrawViewPart::getSourceShape(), TechDraw::DrawViewPart::getSourceShapeFused(), App::PropertyExpressionEngine::hasSetValue(), Spreadsheet::PropertySheet::hasSetValue(), TechDraw::DrawRichAnno::mustExecute(), TechDraw::DrawViewClip::mustExecute(), TechDraw::DrawViewSpreadsheet::mustExecute(), TechDraw::DrawGeomHatch::mustExecute(), TechDraw::DrawHatch::mustExecute(), TechDraw::DrawLeaderLine::mustExecute(), TechDraw::DrawPage::mustExecute(), TechDraw::DrawProjGroup::mustExecute(), TechDraw::DrawProjGroupItem::mustExecute(), TechDraw::DrawView::mustExecute(), TechDraw::DrawViewArch::mustExecute(), TechDraw::DrawViewBalloon::mustExecute(), TechDraw::DrawViewDetail::mustExecute(), TechDraw::DrawViewDimension::mustExecute(), TechDraw::DrawViewDraft::mustExecute(), TechDraw::DrawViewImage::mustExecute(), TechDraw::DrawViewMulti::mustExecute(), TechDraw::DrawViewPart::mustExecute(), TechDraw::DrawViewSection::mustExecute(), TechDraw::DrawViewSymbol::mustExecute(), Part::Circle::onChanged(), Part::Vertex::onChanged(), Part::Line::onChanged(), Part::Ellipse::onChanged(), Surface::GeomFillSurface::onChanged(), Sketcher::SketchObject::onChanged(), Drawing::FeaturePage::onChanged(), Drawing::FeatureViewSymbol::onChanged(), Part::Mirroring::onChanged(), Part::Box::onChanged(), Part::Helix::onChanged(), Part::Spiral::onChanged(), Part::Wedge::onChanged(), PartDesign::Hole::onChanged(), TechDraw::DrawRichAnno::onChanged(), TechDraw::DrawSVGTemplate::onChanged(), TechDraw::DrawTile::onChanged(), TechDraw::DrawTileWeld::onChanged(), TechDraw::DrawViewAnnotation::onChanged(), TechDraw::DrawViewDimExtent::onChanged(), TechDraw::DrawWeldSymbol::onChanged(), Part::Revolution::onChanged(), Part::Primitive::onChanged(), PartDesign::Body::onChanged(), PartDesign::SubShapeBinder::onChanged(), TechDraw::DrawGeomHatch::onChanged(), TechDraw::DrawHatch::onChanged(), TechDraw::DrawPage::onChanged(), TechDraw::DrawProjGroup::onChanged(), TechDraw::DrawView::onChanged(), TechDraw::DrawViewBalloon::onChanged(), TechDraw::DrawViewDetail::onChanged(), TechDraw::DrawViewDimension::onChanged(), TechDraw::DrawViewImage::onChanged(), TechDraw::DrawViewMulti::onChanged(), TechDraw::DrawViewSection::onChanged(), TechDraw::DrawViewSymbol::onChanged(), TechDraw::LandmarkDimension::onChanged(), App::MeasureDistance::onChanged(), TechDrawGui::ViewProviderDrawingView::onGuiRepaint(), Spreadsheet::Cell::setContent(), and Gui::ViewProviderLink::updateData().

◆ isTouched()

◆ isValid()

◆ mustExecute()

virtual short App::DocumentObject::mustExecute ( void  ) const
virtual

mustExecute We call this method to check if the object was modified to be invoked.

If the object label or an argument is modified. If we must recompute the object - to call the method execute(). 0: no recomputation is needed 1: recomputation needed

Remarks
If an object is marked as 'touched' then this does not necessarily mean that it will be recomputed. It only means that all objects that link it (i.e. its InList) will be recomputed.

Reimplemented in Inspection::Feature, Mesh::Curvature, Mesh::FixDefects, Mesh::Export, Mesh::Import, Mesh::SegmentByMesh, Mesh::SetOperations, Mesh::Sphere, Mesh::Ellipsoid, Mesh::Cylinder, Mesh::Cone, Mesh::Torus, Mesh::Cube, Part::Compound, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::FilletBase, Part::RuledSurface, Part::Loft, Part::Sweep, Part::Thickness, Part::Vertex, Part::Line, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Prism, Part::RegularPolygon, Part::Cone, Part::Torus, Part::Helix, Part::Spiral, Part::Wedge, Part::Ellipse, PartDesign::Feature, PartDesign::Draft, PartDesign::DressUp, PartDesign::FeatureExtrude, PartDesign::Fillet, PartDesign::Groove, PartDesign::Helix, PartDesign::Hole, PartDesign::LinearPattern, PartDesign::Loft, PartDesign::Mirrored, PartDesign::MultiTransform, PartDesign::Pipe, PartDesign::PolarPattern, PartDesign::Box, PartDesign::Cylinder, PartDesign::Sphere, PartDesign::Cone, PartDesign::Ellipsoid, PartDesign::Torus, PartDesign::Prism, PartDesign::Wedge, PartDesign::Revolution, PartDesign::Scaled, PartDesign::ProfileBased, PartDesign::Thickness, PartDesign::Transformed, Points::Feature, Raytracing::LuxFeature, Raytracing::LuxProject, Raytracing::RayFeature, Raytracing::RayProject, Sketcher::SketchObjectSF, Surface::Cut, Surface::Filling, Surface::GeomFillSurface, Surface::Sewing, TechDraw::DrawParametricTemplate, TechDraw::DrawRichAnno, TechDraw::DrawSVGTemplate, TechDraw::DrawTemplate, TechDraw::DrawTile, TechDraw::DrawTileWeld, TechDraw::DrawViewClip, TechDraw::DrawViewCollection, TechDraw::DrawViewDimExtent, TechDraw::DrawViewSpreadsheet, TechDraw::DrawWeldSymbol, Part::Extrusion, Part::Face, Part::Offset, Part::Offset2D, Part::Revolution, Part::Feature, Part::Primitive, PartDesign::Body, PartDesign::FeatureAddSub, PartDesign::Boolean, PartDesign::Chamfer, Sketcher::SketchObject, Surface::Extend, TechDraw::DrawGeomHatch, TechDraw::DrawHatch, TechDraw::DrawLeaderLine, TechDraw::DrawPage, TechDraw::DrawProjGroup, TechDraw::DrawProjGroupItem, TechDraw::DrawView, TechDraw::DrawViewArch, TechDraw::DrawViewBalloon, TechDraw::DrawViewDetail, TechDraw::DrawViewDimension, TechDraw::DrawViewDraft, TechDraw::DrawViewImage, TechDraw::DrawViewMulti, TechDraw::DrawViewPart, TechDraw::DrawViewSection, TechDraw::DrawViewSymbol, TechDraw::LandmarkDimension, App::FeatureTest, App::InventorObject, App::Origin, App::VRMLObject, Fem::FemMeshObject, Fem::FemPostClipFilter, Fem::FemPostDataAlongLineFilter, Fem::FemPostDataAtPointFilter, Fem::FemPostScalarClipFilter, Fem::FemPostWarpVectorFilter, Fem::FemPostCutFilter, Fem::FemPostPipeline, Fem::FemResultObject, Fem::FemSetElementsObject, Fem::FemSetFacesObject, Fem::FemSetGeometryObject, Fem::FemSetNodesObject, Fem::FemSetObject, Fem::FemSolverObject, Part::CustomFeature, Part::FeatureReference, PartDesign::FeatureBase, Path::FeatureArea, Path::Feature, Robot::RobotObject, Robot::TrajectoryObject, Sandbox::SandboxObject, Spreadsheet::Sheet, and PartDesign::ShapeBinder.

Referenced by Gui::DocumentObjectItem::displayStatusInfo(), Mesh::Sphere::mustExecute(), Mesh::Ellipsoid::mustExecute(), Mesh::Cylinder::mustExecute(), Mesh::Cone::mustExecute(), Mesh::Torus::mustExecute(), Mesh::Cube::mustExecute(), Raytracing::LuxFeature::mustExecute(), Raytracing::RayFeature::mustExecute(), TechDraw::DrawParametricTemplate::mustExecute(), TechDraw::DrawTemplate::mustExecute(), TechDraw::DrawGeomHatch::mustExecute(), TechDraw::DrawHatch::mustExecute(), TechDraw::DrawPage::mustExecute(), TechDraw::DrawView::mustExecute(), TechDraw::DrawViewImage::mustExecute(), App::FeatureTest::mustExecute(), App::Origin::mustExecute(), Fem::FemPostClipFilter::mustExecute(), Fem::FemPostDataAlongLineFilter::mustExecute(), Fem::FemPostDataAtPointFilter::mustExecute(), Fem::FemPostScalarClipFilter::mustExecute(), Fem::FemPostWarpVectorFilter::mustExecute(), Fem::FemPostCutFilter::mustExecute(), Fem::FemPostPipeline::mustExecute(), Path::Feature::mustExecute(), and Gui::DocumentObjectItem::testStatus().

◆ mustRecompute()

bool App::DocumentObject::mustRecompute ( void  ) const

Test if this document object must be recomputed.

◆ onBeforeChange()

virtual void App::DocumentObject::onBeforeChange ( const Property prop)
overrideprotectedvirtual

◆ onBeforeChangeLabel()

virtual void App::DocumentObject::onBeforeChangeLabel ( std::string &  newLabel)
virtual

◆ onChanged()

virtual void App::DocumentObject::onChanged ( const Property prop)
overrideprotectedvirtual

get called by the container when a property was changed

Reimplemented from App::ExtensionContainer.

Reimplemented in App::VRMLObject, Part::Circle, Part::Vertex, Part::Line, Part::Ellipse, Surface::GeomFillSurface, PartDesign::Chamfer, Sketcher::SketchObject, Drawing::FeatureClip, Drawing::FeaturePage, Drawing::FeatureViewSymbol, Fem::Constraint, Fem::ConstraintBearing, Fem::ConstraintContact, Fem::ConstraintDisplacement, Fem::ConstraintFixed, Fem::ConstraintFluidBoundary, Fem::ConstraintForce, Fem::ConstraintGear, Fem::ConstraintHeatflux, Fem::ConstraintInitialTemperature, Fem::ConstraintPlaneRotation, Fem::ConstraintPressure, Fem::ConstraintPulley, Fem::ConstraintSpring, Fem::ConstraintTemperature, Fem::ConstraintTransform, Fem::FemMeshObject, Fem::FemPostClipFilter, Fem::FemPostDataAlongLineFilter, Fem::FemPostDataAtPointFilter, Fem::FemPostScalarClipFilter, Fem::FemPostWarpVectorFilter, Fem::FemPostCutFilter, Fem::FemPostFunctionProvider, Fem::FemPostPlaneFunction, Fem::FemPostSphereFunction, Fem::FemPostPipeline, Mesh::Feature, Part::Mirroring, Part::Box, Part::RuledSurface, Part::Loft, Part::Sweep, Part::Helix, Part::Spiral, Part::Wedge, PartDesign::Line, PartDesign::Plane, PartDesign::FeatureBase, PartDesign::DressUp, PartDesign::Helix, PartDesign::Hole, PartDesign::ProfileBased, Path::Feature, Points::Feature, Robot::Edge2TracObject, Robot::RobotObject, Robot::TrajectoryDressUpObject, Robot::TrajectoryObject, Sandbox::SandboxObject, Spreadsheet::Sheet, TechDraw::DrawParametricTemplate, TechDraw::DrawRichAnno, TechDraw::DrawSVGTemplate, TechDraw::DrawTemplate, TechDraw::DrawTile, TechDraw::DrawTileWeld, TechDraw::DrawViewAnnotation, TechDraw::DrawViewClip, TechDraw::DrawViewCollection, TechDraw::DrawViewDimExtent, TechDraw::DrawViewSpreadsheet, TechDraw::DrawWeldSymbol, Part::BodyBase, Part::Revolution, Part::Feature, Part::Primitive, PartDesign::Body, PartDesign::Point, PartDesign::Boolean, PartDesign::FeaturePrimitive, PartDesign::ShapeBinder, PartDesign::SubShapeBinder, Surface::Extend, TechDraw::DrawGeomHatch, TechDraw::DrawHatch, TechDraw::DrawLeaderLine, TechDraw::DrawPage, TechDraw::DrawProjGroup, TechDraw::DrawProjGroupItem, TechDraw::DrawView, TechDraw::DrawViewBalloon, TechDraw::DrawViewDetail, TechDraw::DrawViewDimension, TechDraw::DrawViewImage, TechDraw::DrawViewMulti, TechDraw::DrawViewPart, TechDraw::DrawViewSection, TechDraw::DrawViewSymbol, TechDraw::LandmarkDimension, App::MeasureDistance, and App::TextDocument.

Referenced by ArchStructure.CommandStructuralSystem::Activated(), draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), App::VRMLObject::onChanged(), Drawing::FeatureClip::onChanged(), Drawing::FeaturePage::onChanged(), Drawing::FeatureViewSymbol::onChanged(), Fem::Constraint::onChanged(), Fem::FemMeshObject::onChanged(), Fem::FemPostClipFilter::onChanged(), Fem::FemPostDataAlongLineFilter::onChanged(), Fem::FemPostDataAtPointFilter::onChanged(), Fem::FemPostScalarClipFilter::onChanged(), Fem::FemPostWarpVectorFilter::onChanged(), Fem::FemPostCutFilter::onChanged(), Fem::FemPostFunctionProvider::onChanged(), Fem::FemPostPlaneFunction::onChanged(), Fem::FemPostSphereFunction::onChanged(), Fem::FemPostPipeline::onChanged(), Path::Feature::onChanged(), Robot::Edge2TracObject::onChanged(), Robot::RobotObject::onChanged(), Robot::TrajectoryDressUpObject::onChanged(), Robot::TrajectoryObject::onChanged(), Sandbox::SandboxObject::onChanged(), Spreadsheet::Sheet::onChanged(), TechDraw::DrawParametricTemplate::onChanged(), TechDraw::DrawTemplate::onChanged(), PartDesign::Point::onChanged(), TechDraw::DrawGeomHatch::onChanged(), TechDraw::DrawHatch::onChanged(), TechDraw::DrawPage::onChanged(), TechDraw::DrawView::onChanged(), App::MeasureDistance::onChanged(), App::TextDocument::onChanged(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), ArchPanel.ViewProviderPanelSheet::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), draftviewproviders.view_layer.ViewProviderLayer::updateData(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData().

◆ onDocumentRestored()

◆ onLostLinkToObject()

virtual void App::DocumentObject::onLostLinkToObject ( DocumentObject )
virtual

Called in case of losing a link Get called by the document when a object got deleted a link property of this object ist pointing to.

The standard behaviour of the DocumentObject implementation is to reset the links to nothing. You may override this method to implement additional or different behavior.

◆ onPropertyStatusChanged()

virtual void App::DocumentObject::onPropertyStatusChanged ( const Property prop,
unsigned long  oldStatus 
)
overrideprotectedvirtual

get called when a property status has changed

Reimplemented from App::PropertyContainer.

◆ onSettingDocument()

virtual void App::DocumentObject::onSettingDocument ( )
protectedvirtual

◆ onUndoRedoFinished()

virtual void App::DocumentObject::onUndoRedoFinished ( )
protectedvirtual

get called after an undo/redo transaction is finished

Reimplemented in Sketcher::SketchObject.

◆ onUpdateElementReference()

virtual void App::DocumentObject::onUpdateElementReference ( const Property )
virtual

◆ purgeError()

void App::DocumentObject::purgeError ( void  )

remove the error from the object

◆ purgeTouched()

◆ recompute()

◆ recomputeFeature()

bool App::DocumentObject::recomputeFeature ( bool  recursive = false)

Recompute only this feature.

Parameters
recursiveset to true to recompute any dependent objects as well

Referenced by FemGui::TaskDlgCreateNodeSet::accept(), FemGui::TaskDlgMeshShapeNetgen::accept(), RobotGui::TaskDlgEdge2Trac::accept(), RobotGui::TaskDlgTrajectoryDressUp::accept(), SurfaceGui::FillingPanel::accept(), SurfaceGui::FillingEdgePanel::accept(), SurfaceGui::GeomFillSurface::accept(), SurfaceGui::SectionsPanel::accept(), TechDrawGui::TaskActiveView::accept(), TechDrawGui::TaskCosVertex::accept(), TechDrawGui::TaskGeomHatch::accept(), TechDrawGui::TaskProjGroup::accept(), TechDrawGui::TaskWeldingSymbol::accept(), TechDrawGui::TaskProjGroup::apply(), TechDrawGui::TaskHatch::apply(), TechDrawGui::TaskSectionView::applyQuick(), TechDrawGui::TaskProjGroup::AutoDistributeClicked(), SurfaceGui::GeomFillSurface::changeFillType(), RobotGui::TaskDlgTrajectoryDressUp::clicked(), TechDrawGui::TaskCenterLine::createCenterLine(), SurfaceGui::GeomFillSurface::flipOrientation(), TechDraw::DrawViewSpreadsheet::getSheetImage(), Import::ImportOCAF2::loadShapes(), TechDraw::DrawDimHelper::makeDistDim(), TechDraw::DrawDimHelper::makeExtentDim(), TechDraw::DrawViewDetail::onChanged(), PartGui::SectionCut::onCutXvalueChanged(), PartGui::SectionCut::onCutYvalueChanged(), PartGui::SectionCut::onCutZvalueChanged(), TechDraw::DrawViewPart::onDocumentRestored(), PartGui::SectionCut::onFlipXclicked(), PartGui::SectionCut::onFlipYclicked(), PartGui::SectionCut::onFlipZclicked(), SurfaceGui::FillingPanel::onSelectionChanged(), SurfaceGui::FillingEdgePanel::onSelectionChanged(), SurfaceGui::FillingVertexPanel::onSelectionChanged(), SurfaceGui::GeomFillSurface::onSelectionChanged(), SurfaceGui::SectionsPanel::onSelectionChanged(), TechDrawGui::TaskProjGroup::projectionTypeChanged(), PartDesignGui::ViewProviderTransformed::recomputeFeature(), TechDrawGui::TaskCenterLine::reject(), TechDrawGui::TaskDetail::reject(), TechDrawGui::TaskSectionView::reject(), TechDrawGui::TaskProjGroup::scaleManuallyChanged(), TechDrawGui::TaskProjGroup::spacingChanged(), FemGui::TaskPostDataAtPoint::TaskPostDataAtPoint(), PartDesign::SubShapeBinder::update(), TechDraw::DrawPage::updateAllViews(), TechDrawGui::TaskDetail::updateDetail(), TechDrawGui::TaskCenterLine::updateOrientation(), and DrawingGui::OrthoViews::~OrthoViews().

◆ redirectSubName()

virtual bool App::DocumentObject::redirectSubName ( std::ostringstream &  ss,
DocumentObject topParent,
DocumentObject child 
) const
virtual

Allow object to redirect a subname path.

Parameters
ssinput as the current subname path from topParent leading just before this object, i.e. ends at the parent of this object. This function should append its own name to this path, or redirect the subname to other place.
topParenttop parent of this subname path
childthe immediate child object in the path

This function is called by tree view to generate a subname path when an item is selected in the tree. Document object can use this function to redirect the selection to some other objects.

◆ removeDynamicProperty()

◆ renameObjectIdentifiers()

virtual void App::DocumentObject::renameObjectIdentifiers ( const std::map< App::ObjectIdentifier, App::ObjectIdentifier > &  paths)
virtual

Reimplemented in Spreadsheet::Sheet.

◆ resetError()

void App::DocumentObject::resetError ( void  )
protected

◆ resolve()

App::DocumentObject * App::DocumentObject::resolve ( const char *  subname,
App::DocumentObject **  parent = nullptr,
std::string *  childName = nullptr,
const char **  subElement = nullptr,
PyObject **  pyObj = nullptr,
Base::Matrix4D mat = nullptr,
bool  transform = true,
int  depth = 0 
) const

Resolve the last document object referenced in the subname.

Parameters
subnamedot separated subname
parentreturn the direct parent of the object
childNamereturn child name to be passed to is/setElementVisible()
subElementreturn non-object sub-element name if found. The pointer is guaranteed to be within the buffer pointed to by 'subname'
See also
getSubObject()
Returns
Returns the last referenced document object in the subname. If no such object in subname, return pObject.

Referenced by Gui::ViewProviderLink::applyColors(), Gui::ViewProviderLink::getElementColors(), and Gui::SelectionSingleton::setVisible().

◆ resolveRelativeLink()

App::DocumentObject * App::DocumentObject::resolveRelativeLink ( std::string &  subname,
App::DocumentObject *&  link,
std::string &  linkSub 
) const

Resolve a link reference that is relative to this object reference.

Parameters
subnameon input, this is the subname reference to the object that is to be assigned a link. On output, the reference may be offset to be rid of any common parent.
linkon input, this is the top parent of the link reference. On output, it may be altered to one of its child to be rid off any common parent.
linkSubon input, this the subname of the link reference. On output, it may be offset to be rid off any common parent.
Returns
The corrected top parent of the object that is to be assigned the link. If the output 'subname' is empty, then return the object itself.

To avoid any cyclic reference, an object must not be assign a link to any of the object in its parent. This function can be used to resolve any common parents of an object and its link target.

For example, with the following object hierarchy

Group |–Group001 | |–Box | |–Cylinder |–Group002 |–Box001 |–Cylinder001

If you want add a link of Group.Group002.Box001 to Group.Group001, you can call with the following parameter (which are usually obtained from Selection.getSelectionEx(), check usage in TreeWidget::onDropEvent()): std::string subname("Group002."); auto link = Group; std::string linkSub("Group001.Box001."); parent = Group.resolveRelativeLink(subname,link,linkSub);

The resolving result is as follow: return -> Group001 subname -> "" link -> Group002 linkSub -> "Box001."

The common parent 'Group' is removed.

◆ Save()

virtual void App::DocumentObject::Save ( Base::Writer ) const
overridevirtual

This method is used to save properties to an XML document.

A good example you'll find in PropertyStandard.cpp, e.g. the vector:

void PropertyVector::Save (Writer &writer) const
{
writer << writer.ind() << "<PropertyVector valueX=\"" << _cVec.x <<
"\" valueY=\"" << _cVec.y <<
"\" valueZ=\"" << _cVec.z <<"\"/>" << endl;
}

The writer.ind() expression writes the indentation, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.

See also
Base::Writer

Reimplemented from App::ExtensionContainer.

Reimplemented in Robot::RobotObject, Sketcher::SketchObject, and App::VRMLObject.

Referenced by Robot::RobotObject::Save(), Sketcher::SketchObject::Save(), and App::VRMLObject::Save().

◆ setDocument()

void App::DocumentObject::setDocument ( App::Document doc)
protected

◆ setElementVisible()

virtual int App::DocumentObject::setElementVisible ( const char *  element,
bool  visible 
)
virtual

Child element handling.

Set sub-element visibility

For performance reason, element must not contain any further sub-elements, i.e. there should be no '.' inside element.

Returns
-1 if element visibility is not supported, 0 if element is not found, 1 if success

Referenced by App::LinkBaseExtension::extensionSetElementVisible(), and Gui::SelectionSingleton::setVisible().

◆ setError()

void App::DocumentObject::setError ( void  )
protected

◆ setExpression()

virtual void App::DocumentObject::setExpression ( const ObjectIdentifier path,
std::shared_ptr< App::Expression expr 
)
virtual

Reimplemented in Sketcher::SketchObject.

◆ setStatus()

◆ setupObject()

◆ testIfLinkDAGCompatible() [1/4]

bool App::DocumentObject::testIfLinkDAGCompatible ( App::PropertyLinkSub linkTo) const

◆ testIfLinkDAGCompatible() [2/4]

bool App::DocumentObject::testIfLinkDAGCompatible ( App::PropertyLinkSubList linksTo) const

◆ testIfLinkDAGCompatible() [3/4]

bool App::DocumentObject::testIfLinkDAGCompatible ( const std::vector< DocumentObject * > &  linksTo) const

◆ testIfLinkDAGCompatible() [4/4]

bool App::DocumentObject::testIfLinkDAGCompatible ( DocumentObject linkTo) const

testIfLinkIsDAG tests a link that is about to be created for circular references.

Parameters
objToLinkIn(input). The object this object is to depend on after the link is going to be created.
Returns
true if link can be created (no cycles will be made). False if the link will cause a circular dependency and break recomputes. Throws an error if the document already has a circular dependency. That is, if the return is true, the link is allowed.

Referenced by PartDesignGui::NoDependentsSelection::allow(), Sketcher::SketchObject::isCarbonCopyAllowed(), and Sketcher::SketchObject::isExternalAllowed().

◆ testStatus()

◆ touch()

◆ unsetupObject()

Friends And Related Function Documentation

◆ Document

friend class Document
friend

◆ ObjectExecution

friend class ObjectExecution
friend

◆ Transaction

friend class Transaction
friend

Member Data Documentation

◆ ExpressionEngine

◆ Label

PropertyString App::DocumentObject::Label

Referenced by FemGui::TaskDlgCreateNodeSet::accept(), MeshGui::Segmentation::accept(), MeshGui::SegmentationBestFit::accept(), PartGui::SweepWidget::accept(), ReverseEngineeringGui::Segmentation::accept(), App::Document::addObject(), App::Document::addObjects(), Gui::ExpressionBinding::apply(), Gui::ViewProviderOriginFeature::attach(), Gui::ViewProviderPythonFeatureImp::attach(), SurfaceGui::FillingPanel::checkOpenCommand(), SurfaceGui::FillingEdgePanel::checkOpenCommand(), SurfaceGui::FillingVertexPanel::checkOpenCommand(), SurfaceGui::GeomFillSurface::checkOpenCommand(), SurfaceGui::SectionsPanel::checkOpenCommand(), Import::ExportOCAF::createNode(), Gui::PointMarker::customEvent(), SpreadsheetGui::DlgBindSheet::DlgBindSheet(), PartGui::DlgProjectionOnSurface::DlgProjectionOnSurface(), Gui::DocumentObjectData::DocumentObjectData(), PartDesignGui::ViewProviderDatum::doubleClicked(), Gui::ElementColors::ElementColors(), Drawing::FeatureClip::execute(), Drawing::FeatureViewAnnotation::execute(), Drawing::FeatureViewPart::execute(), Drawing::FeatureViewSpreadsheet::execute(), Inspection::Feature::execute(), TechDraw::DrawViewArch::execute(), MeshGui::ViewProviderMesh::exportMesh(), App::OriginGroupExtension::extensionGetSubObject(), PartGui::FaceColors::FaceColors(), TechDraw::DrawProjGroup::getDirsFromFront(), Gui::LinkInfo::getLinkedLabel(), TechDraw::DrawViewSpreadsheet::getSheetImage(), Part::ImportIgesParts(), MeshPartGui::Mesh2ShapeGmsh::loadOutput(), Import::ImportOCAF2::loadShapes(), TechDrawGui::TaskLinkDim::loadToTree(), MeshGui::MeshSplit::makeCopy(), TechDraw::DrawPage::onChanged(), TechDraw::DrawView::onChanged(), TechDraw::DrawViewDetail::onChanged(), TechDraw::DrawViewSection::onChanged(), App::TextDocument::onChanged(), PartDesignGui::TaskBooleanParameters::onSelectionChanged(), SurfaceGui::FillingPanel::onSelectionChanged(), SurfaceGui::FillingEdgePanel::onSelectionChanged(), SurfaceGui::FillingVertexPanel::onSelectionChanged(), SurfaceGui::GeomFillSurface::onSelectionChanged(), SurfaceGui::SectionsPanel::onSelectionChanged(), App::PropertyLinkBase::restoreLabelReference(), Import::ExportOCAF::saveShape(), TechDraw::DrawViewSection::sectionExec(), DrawingGui::orthoview::set_data(), SurfaceGui::FillingPanel::setEditedObject(), Gui::ExpressionBinding::setExpression(), RobotGui::TaskEdge2TracParameter::setHideShowObject(), App::LinkBaseExtension::setLink(), TechDrawGui::TaskDetail::setUiFromFeat(), PartDesignGui::TaskDressUpParameters::setupTransaction(), MeshGui::Annotation::show(), DrawingGui::ViewProviderDrawingPage::showDrawingView(), SpreadsheetGui::ViewProviderSheet::showSpreadsheetView(), Spreadsheet::SheetObserver::slotChangedObject(), FemGui::TaskObjectName::TaskObjectName(), PartDesignGui::TaskPipeOrientation::TaskPipeOrientation(), PartDesignGui::TaskPipeParameters::TaskPipeParameters(), App::PropertyLinkBase::tryReplaceLink(), TechDraw::DrawProjGroupItem::unsetupObject(), SpreadsheetGui::SheetView::updateCell(), DrawingGui::ViewProviderDrawingPage::updateData(), and MeshPartGui::Mesh2ShapeGmsh::writeProject().

◆ Label2

◆ oldLabel

std::string App::DocumentObject::oldLabel
protected

Old label; used for renaming expressions.

◆ pcNameInDocument

const std::string* App::DocumentObject::pcNameInDocument
protected

◆ PythonObject

Py::SmartPtr App::DocumentObject::PythonObject
protected

python object of this class and all descendent

Referenced by Fem::FemPostPipeline::getPyObject(), Mesh::Feature::getPyObject(), Spreadsheet::Sheet::getPyObject(), App::DocumentObjectGroup::getPyObject(), Part::BodyBase::getPyObject(), Part::Feature::getPyObject(), Part::Primitive::getPyObject(), PartDesign::FeaturePrimitive::getPyObject(), App::GeoFeature::getPyObject(), App::InventorObject::getPyObject(), App::VRMLObject::getPyObject(), Fem::FemMeshObject::getPyObject(), Fem::FemResultObject::getPyObject(), Fem::FemSetElementsObject::getPyObject(), Fem::FemSetFacesObject::getPyObject(), Fem::FemSetGeometryObject::getPyObject(), Fem::FemSetNodesObject::getPyObject(), Fem::FemSetObject::getPyObject(), Fem::FemSolverObject::getPyObject(), Path::FeatureArea::getPyObject(), Path::Feature::getPyObject(), Path::FeatureCompound::getPyObject(), Robot::RobotObject::getPyObject(), Robot::TrajectoryObject::getPyObject(), TechDraw::DrawParametricTemplate::getPyObject(), TechDraw::DrawRichAnno::getPyObject(), TechDraw::DrawSVGTemplate::getPyObject(), TechDraw::DrawTemplate::getPyObject(), TechDraw::DrawTile::getPyObject(), TechDraw::DrawTileWeld::getPyObject(), TechDraw::DrawViewClip::getPyObject(), TechDraw::DrawViewDimExtent::getPyObject(), TechDraw::DrawWeldSymbol::getPyObject(), PartDesign::Body::getPyObject(), Sketcher::SketchObject::getPyObject(), TechDraw::DrawGeomHatch::getPyObject(), TechDraw::DrawHatch::getPyObject(), TechDraw::DrawLeaderLine::getPyObject(), TechDraw::DrawPage::getPyObject(), TechDraw::DrawProjGroup::getPyObject(), TechDraw::DrawProjGroupItem::getPyObject(), TechDraw::DrawView::getPyObject(), TechDraw::DrawViewDimension::getPyObject(), TechDraw::DrawViewPart::getPyObject(), and TechDraw::DrawViewSymbol::getPyObject().

◆ signalBeforeChange

boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::DocumentObject::signalBeforeChange

signal before changing a property of this object

◆ signalChanged

boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::DocumentObject::signalChanged

signal on changed property of this object

◆ StatusBits

std::bitset<32> App::DocumentObject::StatusBits
protected

Status bits of the document object The first 8 bits are used for the base system the rest can be used in descendent classes to mark special statuses on the objects.

The bits and their meaning are listed below: 0 - object is marked as 'touched' 1 - object is marked as 'erroneous' 2 - object is marked as 'new' 3 - object is marked as 'recompute', i.e. the object gets recomputed now 4 - object is marked as 'restoring', i.e. the object gets loaded at the moment 5 - object is marked as 'deleting', i.e. the object gets deleted at the moment 6 - reserved 7 - reserved 16 - object is marked as 'expanded' in the tree view

Referenced by Drawing::FeaturePage::onDocumentRestored().

◆ StdReturn

DocumentObjectExecReturn* App::DocumentObject::StdReturn
static

Referenced by App::Document::afterRestore(), Fem::Constraint::execute(), Mesh::Curvature::execute(), Mesh::FixDefects::execute(), Mesh::HarmonizeNormals::execute(), Mesh::FlipNormals::execute(), Mesh::FixNonManifolds::execute(), Mesh::FixDuplicatedFaces::execute(), Mesh::FixDuplicatedPoints::execute(), Mesh::FixDegenerations::execute(), Mesh::FixDeformations::execute(), Mesh::FixIndices::execute(), Mesh::FillHoles::execute(), Mesh::RemoveComponents::execute(), Mesh::Export::execute(), Mesh::Import::execute(), Mesh::SegmentByMesh::execute(), Mesh::SetOperations::execute(), Mesh::Sphere::execute(), Mesh::Ellipsoid::execute(), Mesh::Cylinder::execute(), Mesh::Cone::execute(), Mesh::Torus::execute(), Mesh::Cube::execute(), Mesh::Transform::execute(), Mesh::TransformDemolding::execute(), Mesh::Feature::execute(), PartDesign::Pad::execute(), PartDesign::Pocket::execute(), Points::Feature::execute(), Points::Structured::execute(), PartDesign::FeaturePrimitive::execute(), App::PropertyExpressionEngine::execute(), App::FeatureTest::execute(), App::InventorObject::execute(), App::MeasureDistance::execute(), App::VRMLObject::execute(), Drawing::FeatureClip::execute(), Drawing::FeaturePage::execute(), Drawing::FeatureProjection::execute(), Drawing::FeatureView::execute(), Drawing::FeatureViewAnnotation::execute(), Drawing::FeatureViewPart::execute(), Drawing::FeatureViewSpreadsheet::execute(), Drawing::FeatureViewSymbol::execute(), Fem::FemMeshObject::execute(), Fem::FemMeshShapeNetgenObject::execute(), Fem::FemMeshShapeObject::execute(), Fem::FemPostFilter::execute(), Fem::FemPostClipFilter::execute(), Fem::FemPostScalarClipFilter::execute(), Fem::FemPostWarpVectorFilter::execute(), Fem::FemPostCutFilter::execute(), Fem::FemPostFunction::execute(), Fem::FemPostPipeline::execute(), Fem::FemResultObject::execute(), Fem::FemSetElementsObject::execute(), Fem::FemSetFacesObject::execute(), Fem::FemSetGeometryObject::execute(), Fem::FemSetNodesObject::execute(), Fem::FemSetObject::execute(), Fem::FemSolverObject::execute(), Part::CustomFeature::execute(), Part::Chamfer::execute(), Part::Compound::execute(), Part::Fillet::execute(), Part::FeatureGeometrySet::execute(), Part::Mirroring::execute(), Part::Boolean::execute(), Part::MultiCommon::execute(), Part::CurveNet::execute(), Part::MultiFuse::execute(), Part::ImportBrep::execute(), Part::ImportIges::execute(), Part::ImportStep::execute(), Part::Polygon::execute(), Part::FeatureReference::execute(), Part::RuledSurface::execute(), Part::Loft::execute(), Part::Sweep::execute(), Part::Thickness::execute(), Part::Refine::execute(), Part::Reverse::execute(), PartDesign::FeatureBase::execute(), PartDesign::Fillet::execute(), PartDesign::Groove::execute(), PartDesign::Helix::execute(), PartDesign::Hole::execute(), PartDesign::Loft::execute(), PartDesign::Pipe::execute(), PartDesign::Cylinder::execute(), PartDesign::Sphere::execute(), PartDesign::Cone::execute(), PartDesign::Ellipsoid::execute(), PartDesign::Torus::execute(), PartDesign::Prism::execute(), PartDesign::Wedge::execute(), PartDesign::Revolution::execute(), PartDesign::Thickness::execute(), PartDesign::Transformed::execute(), Path::Feature::execute(), Path::FeatureCompound::execute(), Path::FeatureShape::execute(), Raytracing::LuxFeature::execute(), Raytracing::LuxProject::execute(), Raytracing::RayFeature::execute(), Raytracing::RayProject::execute(), Raytracing::RaySegment::execute(), Robot::Edge2TracObject::execute(), Robot::RobotObject::execute(), Robot::TrajectoryCompound::execute(), Robot::TrajectoryDressUpObject::execute(), Robot::TrajectoryObject::execute(), Sketcher::SketchObjectSF::execute(), Surface::Filling::execute(), Surface::GeomFillSurface::execute(), Surface::Sewing::execute(), TechDraw::DrawParametricTemplate::execute(), TechDraw::DrawRichAnno::execute(), TechDraw::DrawSVGTemplate::execute(), TechDraw::DrawViewClip::execute(), TechDraw::DrawViewCollection::execute(), TechDraw::DrawViewDimExtent::execute(), TechDraw::DrawWeldSymbol::execute(), TechDraw::FeatureProjection::execute(), App::FeaturePythonT< FeatureT >::execute(), Part::Extrusion::execute(), Part::Face::execute(), Part::Offset::execute(), Part::Offset2D::execute(), Part::Revolution::execute(), PartDesign::Body::execute(), PartDesign::Boolean::execute(), PartDesign::Chamfer::execute(), Sketcher::SketchObject::execute(), Surface::Extend::execute(), Surface::Sections::execute(), TechDraw::DrawGeomHatch::execute(), TechDraw::DrawHatch::execute(), TechDraw::DrawLeaderLine::execute(), TechDraw::DrawProjGroup::execute(), TechDraw::DrawProjGroupItem::execute(), TechDraw::DrawViewArch::execute(), TechDraw::DrawViewDetail::execute(), TechDraw::DrawViewDimension::execute(), TechDraw::DrawViewDraft::execute(), TechDraw::DrawViewMulti::execute(), TechDraw::DrawViewPart::execute(), TechDraw::DrawViewSection::execute(), TechDraw::DrawViewSymbol::execute(), TechDraw::LandmarkDimension::execute(), and App::DocumentObjectExtension::extensionExecute().

◆ Visibility


The documentation for this class was generated from the following files: