class Range

Range. More...

Definition#include <range.h>
Template formRange<class T>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

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:
minMinimum.
maxMaximum.
valueValue between Minimum and Maximum.

void  init (const T min, const T max, const T value)

init

Initialize range with given parameters.

Parameters:
minMinimum.
maxMaximum.
valueValue 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:
minMinimum.
maxMaximum.

inline void  setValue (const T value)

setValue

Set value.

Parameters:
valueValue.

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