GVectors::GetMinMax Class Reference

Class for getting minimum and maximum. More...

#include <vstorefuncs.h>

List of all members.

Public Member Functions

 GetMinMax ()
 Constructor.
 GetMinMax (const GetMinMax &gmm)
 Copy constructor.
 ~GetMinMax ()
 Destructor.
const GetMinMaxoperator= (const GetMinMax &gmm)
 Assignment operator.
void operator() (const Coordinates &f, const Coordinates &t)
 Function operator.
void reset ()
 Reset the minimum and maximum values.
Coordinates getMax () const
 Return the maximum x and y values.
Coordinates getMin () const
 Return the minimum x and y values.

Private Attributes

Coordinates max
 The maximum x and y values.
Coordinates min
 The minimum x and y values.


Detailed Description

Class used for getting minimum and maximum x/y values.


Constructor & Destructor Documentation

GetMinMax::GetMinMax (  )  [explicit]

Constructor. Initializes min with the maximum value, and max with the minimum a double is capable holding of.

GVectors::GetMinMax::GetMinMax ( const GetMinMax gmm  )  [inline]

Copy constructor.

Parameters:
gmm A const reference to a GetMinMax object.

GVectors::GetMinMax::~GetMinMax (  )  [inline]

Destructor. Does nothing. Just for completeness.


Member Function Documentation

const GetMinMax & GetMinMax::operator= ( const GetMinMax gmm  ) 

Assignment operator. Assigns one GetMinMax to another.

Parameters:
gmm A const reference to another GetMinMax.
Returns:
A const reference to this having the GetMinMax assigned.

void GetMinMax::operator() ( const Coordinates f,
const Coordinates t 
)

Todo:
Why does this method take two arguments? It's confusing. One argument but two calls to this method would be clearer.
Takes two Coordinates objects (intended for use with a Segment) and checks them for minimum and maximum values.

Remarks:
It does not check whether f or t is a maximum or minimum. It treats them separately.
Parameters:
f A const reference to a Coordinates object.
t A const reference to a Coordinates object.

void GetMinMax::reset (  ) 

Sets min to the maximum value, and max to the minimum value a double is capable holding of.

Coordinates GVectors::GetMinMax::getMax (  )  const [inline]

Returns the maximum x and y values found.

Returns:
A Coordinates object holding the maximum x and y values.

Coordinates GVectors::GetMinMax::getMin (  )  const [inline]

Returns the minimum x and y values found.

Returns:
A Coordinates object holding the minimum x and y values.


Member Data Documentation

Coordinates GVectors::GetMinMax::max [private]

Will hold the maximum x and y values found.

Coordinates GVectors::GetMinMax::min [private]

Will hold the minimum x and y values found.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 19:37:30 2007 for libgvectors by  doxygen 1.4.7