Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::GenericPoint< NUMBER > Class Template Reference

Parameterized base class for points. More...

#include <geometry.h>

List of all members.

Public Types

typedef NUMBER numberType
 The type for coordinates of the point.

Public Member Functions

 GenericPoint ()
 Creates a generic point.
 GenericPoint (NUMBER x, NUMBER y)
 Creates a generic point (x,y).
 GenericPoint (const GenericPoint &ip)
 Copy constructor.
GenericPoint operator= (const GenericPoint &ip)
 Assignment operator.
bool operator== (const GenericPoint &ip) const
 Equality operator.
bool operator!= (const GenericPoint &ip) const
 Inequality operator.

Public Attributes

NUMBER m_x
 The x-coordinate.
NUMBER m_y
 The y-coordinate.


Detailed Description

template<class NUMBER>
class ogdf::GenericPoint< NUMBER >

Parameterized base class for points.

This class serves as base class for two-dimensional points with specific coordinate types like integer points (IPoint) and real points (DPoint). The template parameter NUMBER is the type for the coordinates of the point and has to support assignment and equality/inequality operators.

Definition at line 126 of file geometry.h.


Member Typedef Documentation

template<class NUMBER>
typedef NUMBER ogdf::GenericPoint< NUMBER >::numberType

The type for coordinates of the point.

Definition at line 130 of file geometry.h.


Constructor & Destructor Documentation

template<class NUMBER>
ogdf::GenericPoint< NUMBER >::GenericPoint (  )  [inline]

Creates a generic point.

Warning:
Does not assign something like zero to the coordinates, since we do not require that 0 can be casted to a NUMBER.

Definition at line 140 of file geometry.h.

template<class NUMBER>
ogdf::GenericPoint< NUMBER >::GenericPoint ( NUMBER  x,
NUMBER  y 
) [inline]

Creates a generic point (x,y).

Definition at line 143 of file geometry.h.

template<class NUMBER>
ogdf::GenericPoint< NUMBER >::GenericPoint ( const GenericPoint< NUMBER > &  ip  )  [inline]

Copy constructor.

Definition at line 146 of file geometry.h.


Member Function Documentation

template<class NUMBER>
GenericPoint ogdf::GenericPoint< NUMBER >::operator= ( const GenericPoint< NUMBER > &  ip  )  [inline]

Assignment operator.

Definition at line 149 of file geometry.h.

template<class NUMBER>
bool ogdf::GenericPoint< NUMBER >::operator== ( const GenericPoint< NUMBER > &  ip  )  const [inline]

Equality operator.

Definition at line 156 of file geometry.h.

template<class NUMBER>
bool ogdf::GenericPoint< NUMBER >::operator!= ( const GenericPoint< NUMBER > &  ip  )  const [inline]

Inequality operator.

Definition at line 161 of file geometry.h.


Member Data Documentation

template<class NUMBER>
NUMBER ogdf::GenericPoint< NUMBER >::m_x

The x-coordinate.

Definition at line 132 of file geometry.h.

template<class NUMBER>
NUMBER ogdf::GenericPoint< NUMBER >::m_y

The y-coordinate.

Definition at line 133 of file geometry.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:07 2007 by doxygen 1.5.4.