itom  4.1.0
ito::AutoInterval Class Reference

class for a interval type containing a min-max-range and an auto-flag. More...

#include <interval.h>

Public Member Functions

 AutoInterval ()
 default constructor: auto-mode: true, min=-Inf, max=+Inf
 
 AutoInterval (double min, double max, bool autoInterval=false)
 constructor More...
 
virtual ~AutoInterval ()
 destructor */
 
double minimum () const
 return the minimum value of the interval (included)
 
double maximum () const
 return the maximum value of the interval (included)
 
double & rmin ()
 return a reference to the minimum value of the interval. Assigning a float to this reference will change the minimum in the interval.
 
double & rmax ()
 return a reference to the maximum value of the interval. Assigning a float to this reference will change the maximum in the interval.
 
bool isAuto () const
 return the state of the auto-flag as boolean variable
 
bool & rauto ()
 return the reference to the auto-flag. Assigning a boolean to this reference will change the auto-flag.
 
void setRange (double min, double max)
 set the boundary values of the AutoInterval without changing the auto flag More...
 
void setMinimum (double min)
 change the included minimum value More...
 
void setMaximum (double max)
 change the included maximum value More...
 
void setAuto (bool autoInterval)
 set the auto-flag to a given boolean value More...
 
bool operator== (const AutoInterval &) const
 comparison operator between the AutoInterval and another AutoInterval. More...
 
bool operator!= (const AutoInterval &) const
 comparison operator between the AutoInterval and another AutoInterval. More...
 

Private Attributes

double m_min
 
double m_max
 
bool m_auto
 

Detailed Description

class for a interval type containing a min-max-range and an auto-flag.

This class can be used as datatype if you want to provide a range- or interval-object that contains of two float min and max boundaries as well as an auto-flag. If auto is set, the min and max boundaries can be calculated by an automatic mode within your code.

Constructor & Destructor Documentation

ito::AutoInterval::AutoInterval ( double  min,
double  max,
bool  autoInterval = false 
)

constructor

Parameters
minis the included minimum value
maxis the included maximum value
autoIntervalis the state of auto-flag.

Member Function Documentation

bool ito::AutoInterval::operator!= ( const AutoInterval other) const

comparison operator between the AutoInterval and another AutoInterval.

Parameters
rhsis the AutoInterval that is compared to this one.
Returns
false if both AutoInterval instances have the auto-flag set or if both boundaries are equal.
bool ito::AutoInterval::operator== ( const AutoInterval other) const

comparison operator between the AutoInterval and another AutoInterval.

Parameters
rhsis the AutoInterval that is compared to this one.
Returns
true if both AutoInterval instances have the auto-flag set or if both boundaries are equal.
void ito::AutoInterval::setAuto ( bool  autoInterval)

set the auto-flag to a given boolean value

Parameters
autoIntervalis the new state of the auto-flag
void ito::AutoInterval::setMaximum ( double  max)

change the included maximum value

Parameters
maxis the new included maximum value
void ito::AutoInterval::setMinimum ( double  min)

change the included minimum value

Parameters
minis the new included minimum value
void ito::AutoInterval::setRange ( double  min,
double  max 
)

set the boundary values of the AutoInterval without changing the auto flag

Parameters
minis the new included minimum value
maxis the new included maximum value

Member Data Documentation

bool ito::AutoInterval::m_auto
private

true if the interval can be automatically be adjusted by the code using it or if m_min and m_max are fixed boundaries

double ito::AutoInterval::m_max
private

maximum value that is included in the interval

double ito::AutoInterval::m_min
private

minimum value that is included in the interval


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