VIPER REFERENCE MANUAL


NAME
iflXY - x,y pair template class with aritmetic operations

HEADER FILE
#include <ifl/iflCoord.h>

PUBLIC METHOD SUMMARY

   Constructing
template<class T> iflXY (  );
template<class T> iflXY ( s);
template<class T> iflXY ( x, T y);
template<class T> iflXY ( const iflXY& that);

   Initializing
iflXY& init ( X, T Y);
iflXY& init ( s);

   Assignment operators
inline iflXY& operator= ( const iflXY& that);
inline iflXY& operator+= ( const iflXY& that);
inline iflXY& operator-= ( const iflXY& that);
inline iflXY& operator*= ( const iflXY& that);
inline iflXY& operator/= ( const iflXY& that);
inline iflXY& operator%= ( const iflXY& that);
inline iflXY& operator&= ( const iflXY& that);
inline iflXY& operator|= ( const iflXY& that);

   Comparison operators
inline int operator== ( const iflXY& that) const;
inline int operator!= ( const iflXY& that) const;
inline int operator<= ( const iflXY& that) const;
inline int operator>= ( const iflXY& that) const;
inline int operator< ( const iflXY& that) const;
inline int operator> ( const iflXY& that) const;

   Componentwise arithmetic operators
inline iflXY operator+ ( const iflXY& that) const;
inline iflXY operator- ( const iflXY& that) const;
inline iflXY operator* ( const iflXY& that) const;
inline iflXY operator/ ( const iflXY& that) const;
inline iflXY operator% ( const iflXY& that) const;
inline iflXY operator& ( const iflXY& that) const;
inline iflXY operator| ( const iflXY& that) const;

   Indexed member access
T& operator[] ( iflAxis axis);

PUBLIC MEMBER SUMMARY
T x, y;

CLASS DESCRIPTION
This is a simple template class to hold (x,y) pairs. It also defines a number of convenience operators.

METHOD DESCRIPTIONS

   iflXY()
template<class T> iflXY (  );
template<class T> iflXY ( s);
template<class T> iflXY ( x, T y);
template<class T> iflXY ( const iflXY& that);

The first constructor creates an uninitialized object. The remaining constructors create an iflXY initialized from either a scalar value, s, (assigned to all members), a pair of values, x and y (assigned to each corresponding member) or another iflXY object, that, of the same type (copied to the new object).

   Assignment operators
inline iflXY& operator= ( const iflXY& that);
inline iflXY& operator+= ( const iflXY& that);
inline iflXY& operator-= ( const iflXY& that);
inline iflXY& operator*= ( const iflXY& that);
inline iflXY& operator/= ( const iflXY& that);
inline iflXY& operator%= ( const iflXY& that);
inline iflXY& operator&= ( const iflXY& that);
inline iflXY& operator|= ( const iflXY& that);

These methods perform standard assignment operators between each member of this object and the object indicated by that.

   Comparison operators
inline int operator== ( const iflXY& that) const;
inline int operator!= ( const iflXY& that) const;
inline int operator<= ( const iflXY& that) const;
inline int operator>= ( const iflXY& that) const;
inline int operator< ( const iflXY& that) const;
inline int operator> ( const iflXY& that) const;

These method performs standard comparison operators between each member of this object and the object indicated by that.

   Componentwise arithmetic operators
inline iflXY operator+ ( const iflXY& that) const;
inline iflXY operator- ( const iflXY& that) const;
inline iflXY operator* ( const iflXY& that) const;
inline iflXY operator/ ( const iflXY& that) const;
inline iflXY operator% ( const iflXY& that) const;
inline iflXY operator& ( const iflXY& that) const;
inline iflXY operator| ( const iflXY& that) const;

These method performs standard aritmetic and bit operators between each member of this object and the object indicated by that.

   init()
iflXY& init ( X, T Y);
iflXY& init ( s);

The iflXY object's x, y members are initialized from a pair of values, X and Y, respectively. The alternate form initializes both members with the same value, s.

   operator[]()
T& operator[] ( iflAxis axis);

This method accesses the members of this object as if it were stored as a two element array with x at index 0 and y at index 1. These offsets are also encoded symbolically using the iflAxis enum as iflX and iflY.

MEMBER DESCRIPTIONS

   x, y
T x, y;

The pair of values of type T stored in an iflXY<T> object.