DELPHIN::rectangle< T > Class Template Reference

Collaboration diagram for DELPHIN::rectangle< T >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class T>
class DELPHIN::rectangle< T >

A type that represents a rectangle.

The class can be used whenever ccordinates describing a rectangle have to be stored together, such as for screen coordinates or when describing a geometrical shape.

Definition at line 146 of file delphin_output_lib_types.h.


Public Member Functions

 rectangle ()
 Default contructor (initialises the rectangle with default value of type T).
 rectangle (T l, T t, T r, T b)
 Constructor (initialises the rectangle with given parameters for the coordinates).
void set (T l, T t, T r, T b)
 Sets all four coordinates with one function call (essentially behaves like 'rect = rectangle(l,r,t,b)').
width () const
 Returns the width (that is difference between the coordinates 'right' and 'left').
height () const
 Returns the height (that is difference between the coordinates 'bottom' and 'top').

Public Attributes

left
 The left coordinate.
top
 The top coordinate.
right
 The right coordinate.
bottom
 The bottom coordinate.

Constructor & Destructor Documentation

template<class T>
DELPHIN::rectangle< T >::rectangle (  ) 

Default contructor (initialises the rectangle with default value of type T).

Definition at line 149 of file delphin_output_lib_types.h.

template<class T>
DELPHIN::rectangle< T >::rectangle ( l,
t,
r,
b 
)

Constructor (initialises the rectangle with given parameters for the coordinates).

Definition at line 151 of file delphin_output_lib_types.h.


Member Function Documentation

template<class T>
void DELPHIN::rectangle< T >::set ( l,
t,
r,
b 
)

Sets all four coordinates with one function call (essentially behaves like 'rect = rectangle(l,r,t,b)').

Definition at line 153 of file delphin_output_lib_types.h.

template<class T>
T DELPHIN::rectangle< T >::width (  )  const

Returns the width (that is difference between the coordinates 'right' and 'left').

Definition at line 156 of file delphin_output_lib_types.h.

template<class T>
T DELPHIN::rectangle< T >::height (  )  const

Returns the height (that is difference between the coordinates 'bottom' and 'top').

Definition at line 158 of file delphin_output_lib_types.h.


Member Data Documentation

template<class T>
T DELPHIN::rectangle< T >::left

The left coordinate.

Definition at line 158 of file delphin_output_lib_types.h.

template<class T>
T DELPHIN::rectangle< T >::top

The top coordinate.

Definition at line 161 of file delphin_output_lib_types.h.

template<class T>
T DELPHIN::rectangle< T >::right

The right coordinate.

Definition at line 162 of file delphin_output_lib_types.h.

template<class T>
T DELPHIN::rectangle< T >::bottom

The bottom coordinate.

Definition at line 163 of file delphin_output_lib_types.h.


The documentation for this class was generated from the following file:

Generated on Tue Mar 24 18:12:08 2009 for Delphin 5 Outputs Library by  doxygen 1.5.5