App::ScopedLink Class Reference

Enables scope handling for links This class is a base for all link properties and enables them to handle scopes of the linked objects. More...

#include <PropertyLinks.h>

Public Member Functions

LinkScope getScope () const
 Get the links scope Retrieve what kind of links are allowed. More...
 
void setScope (LinkScope scope)
 Set the links scope Allows to define what kind of links are allowed. More...
 

Detailed Description

Enables scope handling for links This class is a base for all link properties and enables them to handle scopes of the linked objects.

The possible scopes are defined by LinkScope enum class. The default value is Local. The scope of a property is not saved in the document. It is a value that needs to be fixed when the object holding the property is loaded. That is possible with two methods:

  1. Set the scope value in the constructor of the link property
  2. Use setScope to change the scope in the constructor of the link property

The second option is only available in c++, not in python, as setscope is not exposed. It would not make sense to expose it there, as restoring python objects does not call the constructor again. Hence in python the only way to create a LinkProperty with different scope than local is to use a specialized property for that. In c++ existing properties can simply be changed via setScope in the objects constructor.

Member Function Documentation

◆ getScope()

LinkScope App::ScopedLink::getScope ( ) const

Get the links scope Retrieve what kind of links are allowed.

Only in the Local GeoFeatureGroup, in this and all Childs or to all objects within the Glocal scope.

Referenced by App::PropertyLinkBase::isSame().

◆ setScope()

void App::ScopedLink::setScope ( LinkScope  scope)

Set the links scope Allows to define what kind of links are allowed.

Only in the Local GeoFeatureGroup, in this and all Childs or to all objects within the Glocal scope.

Referenced by TechDraw::DrawPage::DrawPage(), TechDraw::DrawViewArch::DrawViewArch(), TechDraw::DrawViewBalloon::DrawViewBalloon(), TechDraw::DrawViewDimension::DrawViewDimension(), TechDraw::DrawViewDimExtent::DrawViewDimExtent(), and Surface::GeomFillSurface::GeomFillSurface().


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