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

[GL] Remove enum StationType and Station::_type.

This data isn't required anymore. The type of
station can be obtained via dynamic_cast.
parent 66b63d0c
No related branches found
No related tags found
No related merge requests found
...@@ -37,19 +37,6 @@ public: ...@@ -37,19 +37,6 @@ public:
const std::map<std::string, DataHolderLib::Color>& getColorLookupTable() const const std::map<std::string, DataHolderLib::Color>& getColorLookupTable() const
{ return _colorLookupTable; } { return _colorLookupTable; }
/// Returns the type of observation site represented in this source object
GeoLib::Station::StationType getType() const
{
if (dynamic_cast<GeoLib::StationBorehole*>((*_stations)[0]))
{
return GeoLib::Station::StationType::STATION;
}
else
{
return GeoLib::Station::StationType::BOREHOLE;
}
};
/// Sets a predefined color lookup table for the colouring of borehole stratigraphies /// Sets a predefined color lookup table for the colouring of borehole stratigraphies
// int setColorLookupTable(const std::string &filename) // int setColorLookupTable(const std::string &filename)
// { return GeoLib::readColorLookupTable(_colorLookupTable, filename); } // { return GeoLib::readColorLookupTable(_colorLookupTable, filename); }
......
...@@ -22,21 +22,19 @@ ...@@ -22,21 +22,19 @@
namespace GeoLib namespace GeoLib
{ {
Station::Station(double x, double y, double z, std::string name, Station::Station(double x, double y, double z, std::string name)
Station::StationType type) : Point(x, y, z), _name(std::move(name))
: Point(x, y, z), _name(std::move(name)), _type(type)
{ {
} }
Station::Station(Point* coords, std::string name, Station::StationType type) Station::Station(Point* coords, std::string name)
: Point(*coords), _name(std::move(name)), _type(type) : Point(*coords), _name(std::move(name))
{ {
} }
Station::Station(Station const& src) Station::Station(Station const& src)
: Point(src), : Point(src),
_name(src._name), _name(src._name),
_type(src._type),
_station_value(src._station_value) _station_value(src._station_value)
{ {
} }
......
...@@ -35,14 +35,6 @@ namespace GeoLib ...@@ -35,14 +35,6 @@ namespace GeoLib
class Station : public Point class Station : public Point
{ {
public: public:
/// Signals if the object is a "simple" Station or a Borehole (i.e. containing borehole-specific information).
enum class StationType
{
INVALID = 0,
STATION,
BOREHOLE
};
/** /**
* \brief Constructor * \brief Constructor
* *
...@@ -51,15 +43,11 @@ public: ...@@ -51,15 +43,11 @@ public:
* \param y The y-coordinate of the station. * \param y The y-coordinate of the station.
* \param z The z-coordinate of the station. * \param z The z-coordinate of the station.
* \param name The name 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, explicit Station(double x = 0.0, double y = 0.0, double z = 0.0,
std::string name = "", 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 * Constructor copies the source object
...@@ -94,7 +82,6 @@ public: ...@@ -94,7 +82,6 @@ public:
private: private:
std::string _name; std::string _name;
StationType _type{Station::StationType::STATION}; // GeoSys Station Type
double _station_value{0.0}; double _station_value{0.0};
SensorData* _sensor_data{nullptr}; SensorData* _sensor_data{nullptr};
}; };
......
...@@ -32,9 +32,7 @@ namespace GeoLib ...@@ -32,9 +32,7 @@ namespace GeoLib
StationBorehole::StationBorehole(double x, double y, double z, StationBorehole::StationBorehole(double x, double y, double z,
double const depth, const std::string& name, double const depth, const std::string& name,
int date) int date)
: Station(x, y, z, name, Station::StationType::BOREHOLE), : Station(x, y, z, name), _depth(depth), _date(date)
_depth(depth),
_date(date)
{ {
// add first point of borehole // add first point of borehole
_profilePntVec.push_back(this); _profilePntVec.push_back(this);
......
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