eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EIntegerRange Class Reference

Represents a range of integer values. More...

#include <eVision/Easy/EIntegerRange.h>

Collaboration diagram for eVision::EIntegerRange:

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_

Detailed Description

Represents a range of integer values.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EIntegerRange() [1/4]

eVision::EIntegerRange::EIntegerRange ( )

Creates an EIntegerRange::EIntegerRange object.

◆ EIntegerRange() [2/4]

eVision::EIntegerRange::EIntegerRange ( int min,
int max )

Creates an EIntegerRange::EIntegerRange object.

Parameters
minLower bound of the range.
maxUpper bound of the range.

◆ EIntegerRange() [3/4]

eVision::EIntegerRange::EIntegerRange ( const eVision::EIntegerRange & range)

Creates an EIntegerRange::EIntegerRange object.

Parameters
rangeRange to copy.

◆ ~EIntegerRange()

eVision::EIntegerRange::~EIntegerRange ( )
throw ( )
virtual

◆ EIntegerRange() [4/4]

eVision::EIntegerRange::EIntegerRange ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ GetCenter()

int eVision::EIntegerRange::GetCenter ( ) const

Center of the range.

◆ GetLowerBound()

int eVision::EIntegerRange::GetLowerBound ( ) const

Lower bound of the range.

◆ GetSize()

int eVision::EIntegerRange::GetSize ( ) const

Size of the range.

◆ GetUpperBound()

int eVision::EIntegerRange::GetUpperBound ( ) const

Upper bound of the range.

◆ IsInRange() [1/6]

bool eVision::EIntegerRange::IsInRange ( float value) const

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [2/6]

bool eVision::EIntegerRange::IsInRange ( float value,
bool lowerBoundInclusive ) const

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [3/6]

bool eVision::EIntegerRange::IsInRange ( float value,
bool lowerBoundInclusive,
bool upperBoundInclusive ) const

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).
upperBoundInclusiveIndicates if the upper bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [4/6]

bool eVision::EIntegerRange::IsInRange ( int value) const

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [5/6]

bool eVision::EIntegerRange::IsInRange ( int value,
bool lowerBoundInclusive ) const

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [6/6]

bool eVision::EIntegerRange::IsInRange ( int value,
bool lowerBoundInclusive,
bool upperBoundInclusive ) const

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).
upperBoundInclusiveIndicates if the upper bound should be considered inside the range (true) or outside (false).

◆ operator!=()

bool eVision::EIntegerRange::operator!= ( const eVision::EIntegerRange & other) const

Inequality operator.

Parameters
otherThe other object.

◆ operator=()

eVision::EIntegerRange & eVision::EIntegerRange::operator= ( const eVision::EIntegerRange & other)

Assignment operator.

Parameters
otherThe other EIntegerRange that will be copied into this one.

◆ operator==()

bool eVision::EIntegerRange::operator== ( const eVision::EIntegerRange & other) const

Equality operator.

Parameters
otherThe other object.

◆ SetBounds()

void eVision::EIntegerRange::SetBounds ( int min,
int max )

Sets the bounds of the range.

Parameters
minLower bound of the range.
maxUpper bound of the range.

◆ SetFromBaseAndAbsoluteTolerance()

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.

Parameters
baseValueBase value.
toleranceAbsolute 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).

◆ SetFromBaseAndRelativeTolerance()

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.

Parameters
baseValueBase value.
toleranceRelative 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)).

◆ Update()

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.

Parameters
valueValue to be included in the range.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EIntegerRange::wrappedClass_