|
|
This class implements the Range datatype template. It manages a value which has to be in the range from Min to Max. The only allowed exception is the value 0, which is available even if it is outside of the given range.
Range ()
| Range |
Default constructor.
Range (const T min, const T max, const T value)
| Range |
Create new range with given parameters.
Parameters:
min | Minimum. |
max | Maximum. |
value | Value between Minimum and Maximum. |
void init (const T min, const T max, const T value)
| init |
Initialize range with given parameters.
Parameters:
min | Minimum. |
max | Maximum. |
value | Value between Minimum and Maximum. |
inline T getMin ()
| getMin |
[const]
Get minimum.
Returns: Minimum.
inline T getMax ()
| getMax |
[const]
Get maximum.
Returns: Maximum.
inline T getValue ()
| getValue |
[const]
Get value.
Returns: Value.
inline void setLimits (const T min, const T max)
| setLimits |
Set limits.
Parameters:
min | Minimum. |
max | Maximum. |
inline void setValue (const T value)
| setValue |
Set value.
Parameters:
value | Value. |
Range<T>& operator= (const Range<T>& range)
| operator= |
Implementation of = operator
inline int operator== (const Range<T>& ti)
| operator== |
[const]
== operator.
inline int operator!= (const Range<T>& ti)
| operator!= |
[const]
!= operator.
T Min | Min |
T Max | Max |
T Value | Value |