2021-04-14 19:04:08 +00:00
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
2021-04-16 13:16:00 +00:00
|
|
|
#include <memory>
|
2021-04-14 19:04:08 +00:00
|
|
|
|
|
|
|
#include <util.hpp>
|
2021-04-16 13:16:00 +00:00
|
|
|
#include <osmtag.hpp>
|
|
|
|
#include <osmimember.hpp>
|
2021-04-14 19:04:08 +00:00
|
|
|
|
|
|
|
namespace osmp
|
|
|
|
{
|
|
|
|
class Object;
|
|
|
|
|
2021-04-18 15:34:00 +00:00
|
|
|
class IWay : public IMember
|
2021-04-14 19:04:08 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-04-18 15:34:00 +00:00
|
|
|
IWay(const IWay& other) = delete;
|
|
|
|
IWay(const IWay&& other) = delete;
|
|
|
|
virtual ~IWay() {}
|
2021-04-14 19:04:08 +00:00
|
|
|
|
2021-04-18 15:34:00 +00:00
|
|
|
friend Way CreateWay(const tinyxml2::XMLElement* way_elem, Object* parent);
|
|
|
|
|
|
|
|
[[nodiscard]] const Nodes& GetNodes() const;
|
2021-04-18 13:44:48 +00:00
|
|
|
[[nodiscard]] size_t GetNodesSize() const;
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] Node GetNode(size_t index) const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
IWay(const tinyxml2::XMLElement* way_elem, Object* parent);
|
2021-04-14 19:04:08 +00:00
|
|
|
|
|
|
|
public:
|
2021-04-16 13:16:00 +00:00
|
|
|
bool area, closed; // Closed := Startpoint = endpoint, Area := Closed AND certain conditions are not met
|
2021-04-14 19:04:08 +00:00
|
|
|
|
|
|
|
private:
|
2021-04-18 15:34:00 +00:00
|
|
|
Nodes nodes;
|
2021-04-14 19:04:08 +00:00
|
|
|
};
|
|
|
|
}
|