Overview

The Range class is used to describe the upper and lower bounds of an object and contains two pieces of information:

1
2
T *min_;
T *max_;

min_ indicates the pointer to the lower bound of an object and max_ indicates the pointer to the upper bound of an object. You can define the types of the upper and lower bounds.

Header Files to Be Included

1
#include <range.h>

Public Member Functions

Range() 
Range(T *min, T* max) : min_(min), max_(max)
explicit Range(T *same_ele) : min_(same_ele), max_(same_ele)
bool operator==(const Range<T>&rht) const
void SetMin(T *min)
void SetMax(T *max)
const T *GetMin() const
T *GetMin()
const T *GetMax() const
T *GetMax()