ValueRange Class Reference

A range consisting of two values. More...

#include <common.h>

List of all members.

Public Member Functions

 ValueRange (int low, int high)
 Constructor.
bool operator< (ValueRange r) const
 Compare this range to another.
int difference () const
 Compute the difference between the two range values.
bool inRange (int val, bool inclusive=true) const
 See if a value is in this range.
int getLowValue () const
 Get the lower value.
int getHighValue () const
 Get the higher value.

Private Attributes

int m_Low
int m_High


Detailed Description

A range consisting of two values.

Constructor & Destructor Documentation

ValueRange::ValueRange ( int  low,
int  high 
) [inline]

Constructor.

Parameters:
low The lesser value
high The greater value


Member Function Documentation

bool ValueRange::operator< ( ValueRange  r  )  const [inline]

Compare this range to another.

Returns:
true if this range is greater than the other, false otherwise

int ValueRange::difference (  )  const [inline]

Compute the difference between the two range values.

Returns:
The difference between the values in the range

bool ValueRange::inRange ( int  val,
bool  inclusive = true 
) const [inline]

See if a value is in this range.

Parameters:
val The value to test
inclusive Flag whether or not to include the range values themselves
Returns:
true if the value is in range, false otherwise

int ValueRange::getLowValue (  )  const [inline]

Get the lower value.

Returns:
The range's lower value

int ValueRange::getHighValue (  )  const [inline]

Get the higher value.

Returns:
The range's upper value


The documentation for this class was generated from the following file:
Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3