Instigate Open Source Documentation

instigate::geometry::point Class Reference

2-dimensional point with double precision coordinates More...

#include <point.hpp>

List of all members.

Public Member Functions

Special member functions



 ~point () throw ()
 Destructor.
 point () throw ()
 Default constructor.
 point (coordinate_type x, coordinate_type y) throw ()
 Create point with given coordinates.
 point (const point &p) throw ()
 Copy constructor.
template<typename P >
 point (const P &p)
 Copy constructor from any other point.
pointoperator= (const point &p) throw ()
 Assignment operator.
template<typename P >
pointoperator= (const P &p)
 Template assignment operator.

Coordinates of the point



typedef double coordinate_type
 Point coordinate type.
void set_x (const coordinate_type &v) throw ()
 Sets the x coordinate of the point with given value.
void set_y (const coordinate_type &v) throw ()
 Sets the y coordinate of the point with given value.
coordinate_type get_x () const throw ()
 Gets the x coordinate of the point.
coordinate_type get_y () const throw ()
 Gets the y coordinate of the point.

Detailed Description

2-dimensional point with double precision coordinates

This class is model of instigate::geometry::concept::point


Constructor & Destructor Documentation

instigate::geometry::point::point ( coordinate_type  x,
coordinate_type  y 
) throw ()

Create point with given coordinates.

Parameters:
x is the x coordinate
y is the y coordinate
instigate::geometry::point::point ( const point p  )  throw ()

Copy constructor.

Parameters:
p - object to copy from
template<typename P >
instigate::geometry::point::point ( const P &  p  )  [inline]

Copy constructor from any other point.

Parameters:
p - another point object
Precondition:
P must be a model of concept geometry::concept::point

References CHECK.


Member Function Documentation

coordinate_type instigate::geometry::point::get_x (  )  const throw ()

Gets the x coordinate of the point.

Returns:
the x coordinates of the line
Complexity:
O(1).

Referenced by operator=().

coordinate_type instigate::geometry::point::get_y (  )  const throw ()

Gets the y coordinate of the point.

Returns:
the y coordinates of the line
Complexity:
O(1).

Referenced by operator=().

template<typename P >
point& instigate::geometry::point::operator= ( const P &  p  )  [inline]

Template assignment operator.

Parameters:
p - object to copy from
Precondition:
The type P must be a model of concept geometry::concept::point

References CHECK, CHECK_CONVERTIBILITY, get_x(), and get_y().

point& instigate::geometry::point::operator= ( const point p  )  throw ()

Assignment operator.

Parameters:
p - object to copy from
void instigate::geometry::point::set_x ( const coordinate_type v  )  throw ()

Sets the x coordinate of the point with given value.

Parameters:
[in] v is the value to be set
Complexity:
O(1).
void instigate::geometry::point::set_y ( const coordinate_type v  )  throw ()

Sets the y coordinate of the point with given value.

Parameters:
[in] v is the value to be set
Complexity:
O(1).

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


© Instigate CJSC, Open Source