Skip to content
Snippets Groups Projects
Commit 53402464 authored by Tom Fischer's avatar Tom Fischer
Browse files

added standard constructor and changed formating a little bit

parent 00821af6
No related branches found
No related tags found
No related merge requests found
......@@ -20,22 +20,29 @@ namespace GeoLib
* class PointWithID is derived from class Point in
* order to extend the class Point with an ID.
*/
class PointWithID : public Point
{
class PointWithID: public Point {
public:
PointWithID (double x0, double x1, double x2, size_t id) :
Point (x0, x1, x2), _id (id)
PointWithID(double x0, double x1, double x2, size_t id) :
Point(x0, x1, x2), _id(id)
{}
PointWithID(double const* const coords, size_t id) :
Point(coords), _id(id)
{}
PointWithID (double const* const coords, size_t id) :
Point (coords), _id (id)
PointWithID(GeoLib::Point const& pnt, size_t id) :
Point(pnt), _id(id)
{}
PointWithID (GeoLib::Point const& pnt, size_t id) :
Point (pnt), _id (id)
/**
* standard constructor that initializes the id with 0 and calls
* the standard constructor of class Point
*/
PointWithID() :
Point(), _id(0)
{}
size_t getID () const { return _id; }
size_t getID() const { return _id; }
protected:
size_t _id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment