Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::GenericPoint< NUMBER > Class Template Reference

Parameterized base class for points. More...

#include <ogdf/basic/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.
bool operator!= (const GenericPoint &ip) const
 Inequality operator.
GenericPoint operator= (const GenericPoint &ip)
 Assignment operator.
bool operator== (const GenericPoint &ip) const
 Equality 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 118 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 122 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 132 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 135 of file geometry.h.

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

Copy constructor.

Definition at line 138 of file geometry.h.


Member Function Documentation

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

Inequality operator.

Definition at line 153 of file geometry.h.

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

Assignment operator.

Definition at line 141 of file geometry.h.

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

Equality operator.

Definition at line 148 of file geometry.h.


Member Data Documentation

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

The x-coordinate.

Definition at line 124 of file geometry.h.

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

The y-coordinate.

Definition at line 125 of file geometry.h.


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