Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Settings.SettingRelation.SettingRelation Class Reference

Public Member Functions

None __init__ (self, SettingDefinition owner, SettingDefinition target, RelationType relation_type, str role)
 
int __hash__ (self)
 
SettingDefinition owner (self)
 
SettingDefinition target (self)
 
RelationType type (self)
 
str role (self)
 
str __repr__ (self)
 

Protected Attributes

 _owner
 
 _target
 
 _type
 
 _role
 

Detailed Description

A representation of a relationship between two settings.

This is a simple class representing a relationship between two settings.
One of the settings is the "owner", which means it contains the setting, the other
setting is the "target", the setting the relation is pointing at. Relations
have a type and a role. The type determines in what direction this relation is,
the role what property it is used for.

:note SettingRelation objects are usually created by DefinitionContainer after
constructing SettingDefinition objects.

Constructor & Destructor Documentation

◆ __init__()

None UM.Settings.SettingRelation.SettingRelation.__init__ ( self,
SettingDefinition owner,
SettingDefinition target,
RelationType relation_type,
str role )
Constructor.

:param owner: :type{SettingDefinition} The object that owns this relation.
:param target: :type{SettingDefinition} The target of the relation.
:param type: :type{RelationType} The type of the relation.
:param role: :type{string} The role of the relation, what property is it used for.

Member Function Documentation

◆ __hash__()

int UM.Settings.SettingRelation.SettingRelation.__hash__ ( self)
Ensure that the SettingRelation is hashable, so it can be used in a set.

◆ owner()

SettingDefinition UM.Settings.SettingRelation.SettingRelation.owner ( self)
The owner of this relation.

◆ role()

str UM.Settings.SettingRelation.SettingRelation.role ( self)
The role of this relation.

◆ target()

SettingDefinition UM.Settings.SettingRelation.SettingRelation.target ( self)
The setting that this relation is relating with.

◆ type()

RelationType UM.Settings.SettingRelation.SettingRelation.type ( self)
The type of this relation.

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