DFLib
Release 1.0.0
|
Abstract base class for generic "point" objects. More...
#include <DF_Abstract_Point.hpp>
Public Member Functions | |
virtual | ~Point () |
virtual destructor because there should always be one More... | |
virtual void | setXY (const std::vector< double > &aPosition)=0 |
Set X-Y coordinates of the point. More... | |
virtual const std::vector< double > & | getXY ()=0 |
Get X-Y coordinates of the point. More... | |
virtual const std::vector< double > & | getUserCoords ()=0 |
Get coordinates in the user's coordinate system. More... | |
virtual void | setUserCoords (const std::vector< double > &uPosition)=0 |
Set coordinates in the user's coordinate system. More... | |
virtual Point * | Clone ()=0 |
Clone Self. More... | |
Abstract base class for generic "point" objects.
The purpose of this extraordinarily simple class is to provide a generic interface for low-level DF classes to obtain the X-Y coordinates of a DF receiver location (or for returning a DF fix point) without regard to how the user actually provides the data or expects to view it.
The abstract interface works only with the X-Y representations of the coordinates. It is expected that in most cases for DF work this will be Mercator projection coordinates, but it could be any planar representation that is suitable for the user's work.
|
inlinevirtual |
virtual destructor because there should always be one
Reimplemented in DFLib::Proj::Point.
|
pure virtual |
Clone Self.
Make a copy of yourself, and return a pointer to the copy. This is useful as a prototype: pass a pointer to any concrete implementation to a function, and that function has a way of making other objects of precisely the same type by cloning.
Implemented in DFLib::Proj::Point, DFLib::LatLon::Point, and DFLib::XY::Point.
|
pure virtual |
Get coordinates in the user's coordinate system.
Implemented in DFLib::Proj::Point, DFLib::LatLon::Point, and DFLib::XY::Point.
|
pure virtual |
Get X-Y coordinates of the point.
Note that this is NOT declared as a const member function, because implementations could, for efficiency, store both X-Y coordinates and another system of coordinates. In that case, getXY might trigger a coordinate system transformation, and might need to tinker with internals.
The reference returned, however, is const. One is not allowed to tinker with the internal representation through it.
Implemented in DFLib::Proj::Point, DFLib::LatLon::Point, and DFLib::XY::Point.
|
pure virtual |
Set coordinates in the user's coordinate system.
Implemented in DFLib::Proj::Point, DFLib::LatLon::Point, and DFLib::XY::Point.
|
pure virtual |
Set X-Y coordinates of the point.
aPosition | a vector containing the X and Y coordinates |
Implemented in DFLib::Proj::Point, DFLib::LatLon::Point, and DFLib::XY::Point.