TPoint< T > Class Template Reference
[Miscellaneous Tools]

Handy class to describe a point in x-y coordinate, for GUIs.

Conversion from/to Position are made implicit, to avoid mistake. More...

#include <Point.hh>

List of all members.

Public Member Functions

 TPoint (T x, T y)
template<typename U>
 TPoint (const TPoint< U > &pos)
 TPoint (const Position &pos)
 TPoint (const Rect &pos)
getRow () const
getCol () const
void setRow (T row)
void setCol (T col)
getX () const
getY () const
void setX (T x)
void setY (T y)
double distance (const TPoint &to) const
 Return the distance between the two points.

Public Attributes

x
 X coordinate (horizontal).
y
 Y coordinate (vertical).

Friends

bool operator== (const TPoint< T > &lhs, const TPoint< T > &rhs)
bool operator!= (const TPoint< T > &lhs, const TPoint< T > &rhs)
TPoint< T > operator+ (const TPoint< T > &lhs, const TPoint< T > &rhs)
TPoint< T > operator- (const TPoint< T > &lhs, const TPoint< T > &rhs)
TPoint< T > operator * (const TPoint< T > &lhs, double factor)
TPoint< T > operator/ (const TPoint< T > &lhs, T factor)
std::ostream & operator<< (std::ostream &os, const TPoint< T > &p)


Detailed Description

template<typename T>
class TPoint< T >

Handy class to describe a point in x-y coordinate, for GUIs.

Conversion from/to Position are made implicit, to avoid mistake.


The documentation for this class was generated from the following file:
Generated on Sat Jun 23 16:14:17 2007 for Stechec/TBT by  doxygen 1.4.7