Represents a range of integer values. More...
#include <eVision/Easy/EIntegerRange.h>
Public Member Functions | |
| EIntegerRange () | |
| Creates an EIntegerRange::EIntegerRange object. | |
| EIntegerRange (int min, int max) | |
| Creates an EIntegerRange::EIntegerRange object. | |
| EIntegerRange (const eVision::EIntegerRange &range) | |
| Creates an EIntegerRange::EIntegerRange object. | |
| virtual | ~EIntegerRange () throw () |
| eVision::EIntegerRange & | operator= (const eVision::EIntegerRange &other) |
| Assignment operator. | |
| bool | operator== (const eVision::EIntegerRange &other) const |
| Equality operator. | |
| bool | operator!= (const eVision::EIntegerRange &other) const |
| Inequality operator. | |
| void | SetBounds (int min, int max) |
| Sets the bounds of the range. | |
| void | SetFromBaseAndAbsoluteTolerance (int baseValue, int tolerance) |
| Sets the bounds of the range from a base value and an absolute tolerance from this base value. | |
| void | SetFromBaseAndRelativeTolerance (int baseValue, float tolerance) |
| Sets the bounds of the range from a base value and a relative tolerance from this base value. | |
| void | Update (int value) |
| Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value. | |
| int | GetLowerBound () const |
| Lower bound of the range. | |
| int | GetUpperBound () const |
| Upper bound of the range. | |
| int | GetCenter () const |
| Center of the range. | |
| int | GetSize () const |
| Size of the range. | |
| bool | IsInRange (int value, bool lowerBoundInclusive, bool upperBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (int value, bool lowerBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (int value) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (float value, bool lowerBoundInclusive, bool upperBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (float value, bool lowerBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (float value) const |
| Checks if a value is inside the range. | |
| EIntegerRange (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
Represents a range of integer values.
License(s): BasicTypes
| eVision::EIntegerRange::EIntegerRange | ( | ) |
Creates an EIntegerRange::EIntegerRange object.
| eVision::EIntegerRange::EIntegerRange | ( | int | min, |
| int | max ) |
Creates an EIntegerRange::EIntegerRange object.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| eVision::EIntegerRange::EIntegerRange | ( | const eVision::EIntegerRange & | range | ) |
Creates an EIntegerRange::EIntegerRange object.
| range | Range to copy. |
|
virtual | ||||||||||||
| eVision::EIntegerRange::EIntegerRange | ( | CppWrapperInternal::InternalConstructor | ) |
| int eVision::EIntegerRange::GetCenter | ( | ) | const |
Center of the range.
| int eVision::EIntegerRange::GetLowerBound | ( | ) | const |
Lower bound of the range.
| int eVision::EIntegerRange::GetSize | ( | ) | const |
Size of the range.
| int eVision::EIntegerRange::GetUpperBound | ( | ) | const |
Upper bound of the range.
| bool eVision::EIntegerRange::IsInRange | ( | float | value | ) | const |
Checks if a value is inside the range.
| value | Value to test. |
| bool eVision::EIntegerRange::IsInRange | ( | float | value, |
| bool | lowerBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| bool eVision::EIntegerRange::IsInRange | ( | float | value, |
| bool | lowerBoundInclusive, | ||
| bool | upperBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| upperBoundInclusive | Indicates if the upper bound should be considered inside the range (true) or outside (false). |
| bool eVision::EIntegerRange::IsInRange | ( | int | value | ) | const |
Checks if a value is inside the range.
| value | Value to test. |
| bool eVision::EIntegerRange::IsInRange | ( | int | value, |
| bool | lowerBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| bool eVision::EIntegerRange::IsInRange | ( | int | value, |
| bool | lowerBoundInclusive, | ||
| bool | upperBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| upperBoundInclusive | Indicates if the upper bound should be considered inside the range (true) or outside (false). |
| bool eVision::EIntegerRange::operator!= | ( | const eVision::EIntegerRange & | other | ) | const |
Inequality operator.
| other | The other object. |
| eVision::EIntegerRange & eVision::EIntegerRange::operator= | ( | const eVision::EIntegerRange & | other | ) |
Assignment operator.
| other | The other EIntegerRange that will be copied into this one. |
| bool eVision::EIntegerRange::operator== | ( | const eVision::EIntegerRange & | other | ) | const |
Equality operator.
| other | The other object. |
| void eVision::EIntegerRange::SetBounds | ( | int | min, |
| int | max ) |
Sets the bounds of the range.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| void eVision::EIntegerRange::SetFromBaseAndAbsoluteTolerance | ( | int | baseValue, |
| int | tolerance ) |
Sets the bounds of the range from a base value and an absolute tolerance from this base value.
| baseValue | Base value. |
| tolerance | Absolute tolerance around the base value. Must be positive. |
The range will be set with a lower bound of (base - tolerance) and an upper bound of (base + tolerance).
| void eVision::EIntegerRange::SetFromBaseAndRelativeTolerance | ( | int | baseValue, |
| float | tolerance ) |
Sets the bounds of the range from a base value and a relative tolerance from this base value.
| baseValue | Base value. |
| tolerance | Relative tolerance around the base value. Must be positive. |
The range will be set with a lower bound of (base - (base * tolerance)) and an upper bound of (base + (base * tolerance)).
| void eVision::EIntegerRange::Update | ( | int | value | ) |
Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value.
| value | Value to be included in the range. |
| CppWrapperInternal::WrappedClass eVision::EIntegerRange::wrappedClass_ |