FreeCAD C++
Public Member Functions | List of all members
App::PropertyLink Class Reference

#include <App/PropertyLinks.h>

Detailed Description

The general Link Property Main Purpose of this property is to Link Objects and Features in a document. Like all links this property is scope aware, meaning it does define which objects are allowed to be linked depending of the GeoFeatureGroup where it is in. Default is Local.

Note
Links that are invalid in respect to the scope of this property is set to are not rejected. They are only detected to be invalid and prevent the feature from recomputing.

Public Member Functions

 PropertyLink ()
 
virtual ~PropertyLink ()
 
void setValue (App::DocumentObject *)
 
App::DocumentObjectgetValue (void) const
 
App::DocumentObjectgetValue (Base::Type t) const
 
template<typename _type >
_type getValue (void) const
 
- Public Member Functions inherited from App::Property
const char * getName (void) const
 get the name of this property in the belonging container
 
short getType (void) const
 Get the type of the property in the container.
 
const char * getGroup (void) const
 Get the group of this property.
 
const char * getDocumentation (void) const
 Get the documentation of this property.
 
void setContainer (PropertyContainer *Father)
 Is called by the framework to set the father (container)
 
PropertyContainergetContainer (void) const
 Get a pointer to the PropertyContainer derived class the property belongs to.
 
virtual void setPathValue (const App::ObjectIdentifier &path, const boost::any &value)
 Set value of property.
 
virtual const boost::any getPathValue (const App::ObjectIdentifier &path) const
 Get value of property.
 
virtual const App::ObjectIdentifier canonicalPath (const App::ObjectIdentifier &p) const
 Convert p to a canonical representation of it.
 
virtual void getPaths (std::vector< App::ObjectIdentifier > &paths) const
 Get valid paths for this property; used by auto completer.
 
void touch ()
 Set the property touched. More...
 
bool isTouched (void) const
 Test if this property is touched.
 
void purgeTouched (void)
 Reset this property touched.
 
unsigned long getStatus () const
 return the status bits
 
void setReadOnly (bool readOnly)
 Sets property editable/grayed out in property editor.
 
void setSinglePrecision (bool single)
 
bool isSinglePrecision () const
 Gets precision of properties using floating point numbers.
 
- Public Member Functions inherited from Base::Persistence
virtual void SaveDocFile (Writer &) const
 
virtual void RestoreDocFile (Reader &)
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction.
 
virtual ~BaseClass ()
 Destruction.
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static std::string encodeAttribute (const std::string &)
 Encodes an attribute upon saving.
 
- Protected Member Functions inherited from App::Property
void hasSetValue (void)
 Gets called by all setValue() methods after the value has changed.
 
void aboutToSetValue (void)
 Gets called by all setValue() methods before the value has changed.
 
virtual void verifyPath (const App::ObjectIdentifier &p) const
 Verify a path for the current property.
 
- Protected Attributes inherited from App::Property
std::bitset< 32 > StatusBits
 

Constructor & Destructor Documentation

◆ PropertyLink()

App::PropertyLink::PropertyLink ( )

A constructor. A more elaborate description of the constructor.

◆ ~PropertyLink()

virtual App::PropertyLink::~PropertyLink ( )
virtual

A destructor. A more elaborate description of the destructor.

Member Function Documentation

◆ getValue() [1/3]

App::DocumentObject* App::PropertyLink::getValue ( void  ) const

This method returns the linked DocumentObject

◆ getValue() [2/3]

App::DocumentObject* App::PropertyLink::getValue ( Base::Type  t) const

Returns the link type checked

◆ getValue() [3/3]

template<typename _type >
_type App::PropertyLink::getValue ( void  ) const

Returns the link type checked

◆ setValue()

void App::PropertyLink::setValue ( App::DocumentObject )

Sets the property