LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::EntityCoordinate Class Reference

Class that represents a Coordinate associated with a distance to a test point and a identifier for the point. More...

#include <entitycoordinate.h>

Collaboration diagram for lc::EntityCoordinate:

Public Member Functions

 EntityCoordinate (const geo::Coordinate &point, int pointId)
 
 EntityCoordinate (const EntityCoordinate &ec)
 EntityCoordinate copy constructor. More...
 
EntityCoordinateoperator= (const EntityCoordinate &ec)
 
geo::Coordinate coordinate () const
 
int pointId () const
 

Private Attributes

geo::Coordinate _point
 
int _pointId
 

Detailed Description

Class that represents a Coordinate associated with a distance to a test point and a identifier for the point.

Definition at line 12 of file entitycoordinate.h.

Constructor & Destructor Documentation

lc::EntityCoordinate::EntityCoordinate ( const geo::Coordinate point,
int  pointId 
)
inline

EntityCoordinate constructor

Parameters
geo::CoordinateCoordinate on the entities path
Distanceto a calculated point. This was added to allow sorting of a list of EntityCoordinate.
unsignedint ID number that identitifes the the coordinate

Definition at line 20 of file entitycoordinate.h.

20  : _point(point), _pointId(pointId) {
21  }
geo::Coordinate _point
lc::EntityCoordinate::EntityCoordinate ( const EntityCoordinate ec)
inline

EntityCoordinate copy constructor.

Parameters
ec

Definition at line 28 of file entitycoordinate.h.

28  {
29  _point = ec._point;
30  _pointId = ec._pointId;
31  }
geo::Coordinate _point

Member Function Documentation

geo::Coordinate lc::EntityCoordinate::coordinate ( ) const
inline

Definition at line 42 of file entitycoordinate.h.

42  {
43  return _point;
44  }
geo::Coordinate _point
EntityCoordinate& lc::EntityCoordinate::operator= ( const EntityCoordinate ec)
inline

Definition at line 33 of file entitycoordinate.h.

33  {
34  if (this != &ec) {
35  _point = ec._point;
36  _pointId = ec._pointId;
37  }
38 
39  return *this;
40  }
geo::Coordinate _point
int lc::EntityCoordinate::pointId ( ) const
inline

Definition at line 46 of file entitycoordinate.h.

46  {
47  return _pointId;
48  }

Member Data Documentation

geo::Coordinate lc::EntityCoordinate::_point
private

Definition at line 52 of file entitycoordinate.h.

int lc::EntityCoordinate::_pointId
private

Definition at line 53 of file entitycoordinate.h.


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