C4 Engine
C4 Engine API Documentation

class Range

Defined in:  TSTools.h
The Range class template encapsulates a range of values.
Definition

template <typename type> struct Range

Member Functions
Range::Set Sets the beginning and end of a range.
Template Parameters
type The type of value used to represent the beginning and end of a range.
Data Members
type    min; The beginning of the range.
type    max; The end of the range.
Constructor

Range();

Range(const type& x, const type& y);

Parameters
x The beginning of the range.
y The end of the range.
Description
The Range class template encapsulates a range of values of the type given by the type class template.

The default constructor leaves the beginning and end values of the range undefined. If the values x and y are supplied, then they are assigned to the beginning and end of the range, respectively.
Overloaded Operators
type& operator [](machine index); Returns a reference to the minimum value if index is 0, and returns a reference to the maximum value if index is 1. The index parameter must be 0 or 1.
const type& operator [](machine index) const; Returns a constant reference to the minimum value if index is 0, and returns a constant reference to the maximum value if index is 1. The index parameter must be 0 or 1.
bool operator ==(const Range& range) const; Returns a boolean value indicating whether two ranges are equal.
bool operator !=(const Range& range) const; Returns a boolean value indicating whether two ranges are not equal.