class Range

Range. More...

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

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 ()

Default constructor.

Range (const T min, const T max, const T value)

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)

Initialize range with given parameters.

Parameters:
minMinimum.
maxMaximum.
valueValue between Minimum and Maximum.

inline T getMin ()
[const]

Get minimum.

Returns: Minimum.

inline T getMax ()
[const]

Get maximum.

Returns: Maximum.

inline T getValue ()
[const]

Get value.

Returns: Value.

inline void setLimits (const T min, const T max)

Set limits.

Parameters:
minMinimum.
maxMaximum.

inline void setValue (const T value)

Set value.

Parameters:
valueValue.

Range<T>& operator= (const Range<T>& range)

Implementation of = operator

inline int operator== (const Range<T>& ti)
[const]

== operator.

inline int operator!= (const Range<T>& ti)
[const]

!= operator.