Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Settings.Validator.Validator Class Reference
Inheritance diagram for UM.Settings.Validator.Validator:
UM.Settings.SettingFunction.SettingFunction

Public Member Functions

None __init__ (self, str key)
 
Optional[ValidatorState] __call__ (self, ContainerInterface value_provider, Optional[PropertyEvaluationContext] context=None)
 
- Public Member Functions inherited from UM.Settings.SettingFunction.SettingFunction
None __init__ (self, str expression)
 
Any __call__ (self, ContainerInterface value_provider, Optional[PropertyEvaluationContext] context=None, *, Optional[Dict[str, Any]] additional_variables=None)
 
bool __eq__ (self, object other)
 
int __hash__ (self)
 
bool isValid (self)
 
FrozenSet[str] getUsedSettingKeys (self)
 
str __str__ (self)
 
str __repr__ (self)
 
Dict[str, Any] __getstate__ (self)
 
None __setstate__ (self, Dict[str, Any] state)
 
None registerOperator (cls, str name, Callable operator)
 

Protected Attributes

 _key = key
 
- Protected Attributes inherited from UM.Settings.SettingFunction.SettingFunction
 _code = expression
 
FrozenSet[str] _used_keys = frozenset()
 
FrozenSet[str] _used_values = frozenset()
 
Optional[CodeType] _compiled = None
 
bool _valid = False
 

Additional Inherited Members

- Protected Member Functions inherited from UM.Settings.SettingFunction.SettingFunction
 _safeCompile (self)
 

Detailed Description

Validates that a SettingInstance's value is within a certain minimum and maximum value.

This class performs validation of any value that has __lt__ and __gt__ implemented, but
it is primarily used for numerical values like integers and floats.

Constructor & Destructor Documentation

◆ __init__()

None UM.Settings.Validator.Validator.__init__ ( self,
str key )
Constructor

:param instance: The instance this Validator validates.

Member Function Documentation

◆ __call__()

Optional[ValidatorState] UM.Settings.Validator.Validator.__call__ ( self,
ContainerInterface value_provider,
Optional[PropertyEvaluationContext] context = None )
Perform the actual validation.

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