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;
|
|
|
|
class Node;
|
|
|
|
|
2021-04-16 13:16:00 +00:00
|
|
|
class Way : public IMember
|
2021-04-14 19:04:08 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Way(const tinyxml2::XMLElement* way_elem, Object* parent);
|
|
|
|
|
2021-04-16 13:16:00 +00:00
|
|
|
const std::vector<std::shared_ptr<Node>>& GetNodes() const;
|
2021-04-14 19:04:08 +00:00
|
|
|
size_t GetNodesSize() const;
|
2021-04-16 13:16:00 +00:00
|
|
|
const std::shared_ptr<Node>& GetNode(size_t index) const;
|
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-16 13:16:00 +00:00
|
|
|
std::vector<std::shared_ptr<Node>> nodes;
|
2021-04-14 19:04:08 +00:00
|
|
|
};
|
|
|
|
}
|