diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp index b32c38e8a497d631f3d08bc53402783bc4a6e7a5..bf27f494f84df932b84ee78c76361f6886e78ddd 100644 --- a/GeoLib/Station.cpp +++ b/GeoLib/Station.cpp @@ -22,14 +22,14 @@ namespace GeoLib { -Station::Station(double x, double y, double z, std::string name) - : Point(x, y, z), _name(std::move(name)) - +Station::Station(double x, double y, double z, std::string name, + Station::StationType type) + : Point(x, y, z), _name(std::move(name)), _type(type) { } -Station::Station(Point* coords, std::string name) - : Point(*coords), _name(std::move(name)) +Station::Station(Point* coords, std::string name, Station::StationType type) + : Point(*coords), _name(std::move(name)), _type(type) { } diff --git a/GeoLib/Station.h b/GeoLib/Station.h index 675506730c8234d51df0af5693985767bcab899f..d85aace9603df31f5821378e42b86776cb505372 100644 --- a/GeoLib/Station.h +++ b/GeoLib/Station.h @@ -51,13 +51,15 @@ public: * \param y The y-coordinate of the station. * \param z The z-coordinate of the station. * \param name The name of the station. + * \param type The type of the station, see Station::StationType for + * possible values. */ - explicit Station(double x = 0.0, - double y = 0.0, - double z = 0.0, - std::string name = ""); + explicit Station(double x = 0.0, double y = 0.0, double z = 0.0, + std::string name = "", + Station::StationType type = Station::StationType::STATION); - explicit Station(Point* coords, std::string name = ""); + explicit Station(Point* coords, std::string name = "", + Station::StationType type = Station::StationType::STATION); /** * Constructor copies the source object diff --git a/GeoLib/StationBorehole.cpp b/GeoLib/StationBorehole.cpp index ab69083709b35c286f9d31aeb50976bd5d71d5fb..5ed333f808b6e8b0baa8eeb806cb823eb64adfe1 100644 --- a/GeoLib/StationBorehole.cpp +++ b/GeoLib/StationBorehole.cpp @@ -33,9 +33,8 @@ StationBorehole::StationBorehole(double x, double y, double z, const std::string& name) - : Station(x, y, z, name) + : Station(x, y, z, name, Station::StationType::BOREHOLE) { - _type = Station::StationType::BOREHOLE; // add first point of borehole _profilePntVec.push_back(this);