Inscoper::Constraint¶
Constraint class defines limits and valid values for a parameter. More...
#include <Constraint.h>
Public Functions¶
| Name | |
|---|---|
| Constraint() =default Default constructor. |
|
| virtual | ~Constraint() =default Virtual destructor. |
| virtual bool | isReadOnly() =0 Check if read-only. |
| virtual Inscoper::EParamType | getType() =0 Get parameter type. |
| virtual bool | hasMin() =0 Check if minimum exists. |
| virtual double | getMin() =0 Get minimum value. |
| virtual bool | hasMax() =0 Check if maximum exists. |
| virtual double | getMax() =0 Get maximum value. |
| virtual bool | hasStep() =0 Check if step exists. |
| virtual double | getStep() =0 Get step value. |
| virtual bool | hasKeyList() =0 Check if key list exists. |
| virtual bool | hasValueList() =0 Check if value list exists. |
| virtual const std::vector< std::string > | getValueList() =0 Get value list. |
| virtual const std::vector< std::string > | getKeyList() =0 Get key list. |
| virtual Inscoper::EParamType | getKeyType() =0 Get key type. |
| virtual const std::string | getValue(const std::string & key) =0 Retrieves the value associated with a key. |
| virtual bool | hasSubConstraint(const std::string & property) =0 Check if sub-constraint exists. |
| virtual std::shared_ptr< Constraint > | getSubConstraint(const std::string & property) =0 Get sub-constraint. |
| virtual std::map< std::string, std::shared_ptr< Inscoper::Constraint > > | getSubConstraintMap() =0 Get all sub-constraints. |
| virtual std::shared_ptr< Constraint > | cloneConstraint() =0 Clone constraint. |
Detailed Description¶
Constraint class defines limits and valid values for a parameter.
Note: This class is non-copyable and non-movable.
This abstract base class defines constraints on a parameter, such as minimum/maximum values, step size, and valid value lists.
Public Functions Documentation¶
function Constraint¶
Default constructor.
function ~Constraint¶
Virtual destructor.
function isReadOnly¶
Check if read-only.
Return: True if the parameter is read-only, false otherwise
Determines if the parameter is read-only.
function getType¶
Get parameter type.
Return: The parameter type (EParamType)
Retrieves the data type of the parameter.
function hasMin¶
Check if minimum exists.
Return: True if a minimum value is defined, false otherwise
function getMin¶
Get minimum value.
Return: The minimum valid value
function hasMax¶
Check if maximum exists.
Return: True if a maximum value is defined, false otherwise
function getMax¶
Get maximum value.
Return: The maximum valid value
function hasStep¶
Check if step exists.
Return: True if a step value is defined, false otherwise
function getStep¶
Get step value.
Return: The step size
function hasKeyList¶
Check if key list exists.
Return: True if a list of valid keys is available, false otherwise
function hasValueList¶
Check if value list exists.
Return: True if a list of valid values is available, false otherwise
function getValueList¶
Get value list.
Return: A vector of valid value strings
function getKeyList¶
Get key list.
Return: A vector of valid key strings
function getKeyType¶
Get key type.
Return: The type of the keys
function getValue¶
Retrieves the value associated with a key.
Parameters:
- key : The key to look up
Return: The corresponding value
Retrieves the value corresponding to a specific key.
function hasSubConstraint¶
Check if sub-constraint exists.
Parameters:
- property : The property name to check
Return: True if a sub-constraint exists for the property, false otherwise
Checks if a sub-constraint exists. Sub-constraints are constraints on existing properties.
function getSubConstraint¶
Get sub-constraint.
Parameters:
- property : The property name
Return: A shared pointer to the sub-constraint, or null if not found
Retrieves a sub-constraint. Sub-constraints are constraints on existing properties.
function getSubConstraintMap¶
Get all sub-constraints.
Return: A map of property names to constraint pointers
Retrieves all sub-constraints. Sub-constraints are constraints on existing properties.
function cloneConstraint¶
Clone constraint.
Return: A shared pointer to the cloned constraint
Creates a deep copy of the constraint.
Updated on 2026-04-02 at 10:55:35 +0200