RTP Trace System  1.0
Range< T > Class Template Reference

Range. More...

#include <range.h>

List of all members.

Public Member Functions

 Range ()
 Range (const T min, const T max, const T value)
void init (const T min, const T max, const T value)
getMin () const
getMax () const
getValue () const
void setLimits (const T min, const T max)
void setValue (const T value)
Range< T > & operator= (const Range< T > &range)
int operator== (const Range< T > &ti) const
int operator!= (const Range< T > &ti) const

Public Attributes

Min
Max
Value

Detailed Description

template<class T>
class Range< T >

Range.

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.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

template<class T >
Range< T >::Range ( )

Default constructor.

template<class T>
Range< T >::Range ( const T  min,
const T  max,
const T  value 
)

Create new range with given parameters.

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

Member Function Documentation

template<class T>
T Range< T >::getMax ( ) const [inline]

Get maximum.

Returns:
Maximum.
template<class T>
T Range< T >::getMin ( ) const [inline]

Get minimum.

Returns:
Minimum.
template<class T>
T Range< T >::getValue ( ) const [inline]

Get value.

Returns:
Value.
template<class T>
void Range< T >::init ( const T  min,
const T  max,
const T  value 
)

Initialize range with given parameters.

Parameters:
minMinimum.
maxMaximum.
valueValue between Minimum and Maximum.
template<class T>
int Range< T >::operator!= ( const Range< T > &  ti) const [inline]

!= operator.

template<class T>
Range<T>& Range< T >::operator= ( const Range< T > &  range)

Implementation of = operator

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

== operator.

template<class T>
void Range< T >::setLimits ( const T  min,
const T  max 
) [inline]

Set limits.

Parameters:
minMinimum.
maxMaximum.
template<class T>
void Range< T >::setValue ( const T  value) [inline]

Set value.

Parameters:
valueValue.

Member Data Documentation

template<class T>
T Range< T >::Max
template<class T>
T Range< T >::Min
template<class T>
T Range< T >::Value

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines