2021-04-14 19:04:08 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2021-04-16 13:16:00 +00:00
|
|
|
#include <memory>
|
2021-04-14 19:04:08 +00:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <util.hpp>
|
|
|
|
|
|
|
|
namespace osmp
|
|
|
|
{
|
|
|
|
class Object
|
|
|
|
{
|
|
|
|
public:
|
2021-04-18 13:44:48 +00:00
|
|
|
explicit Object(const std::string& file);
|
2021-04-14 19:04:08 +00:00
|
|
|
~Object();
|
|
|
|
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] 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(uint64_t id) const;
|
2021-04-14 19:04:08 +00:00
|
|
|
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] Ways GetWays() const;
|
2021-04-18 13:44:48 +00:00
|
|
|
[[nodiscard]] size_t GetWaysSize() const;
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] Way GetWay(uint64_t id) const;
|
2021-04-16 13:16:00 +00:00
|
|
|
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] Relations GetRelations() const;
|
2021-04-18 13:44:48 +00:00
|
|
|
[[nodiscard]] size_t GetRelationsSize() const;
|
2021-04-18 15:34:00 +00:00
|
|
|
[[nodiscard]] Relation GetRelation(uint64_t id) const;
|
2021-04-14 19:04:08 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
const std::string version;
|
|
|
|
const std::string generator;
|
|
|
|
|
|
|
|
Bounds bounds;
|
|
|
|
|
|
|
|
private:
|
2021-04-18 15:34:00 +00:00
|
|
|
std::map<uint64_t, Node> nodes;
|
|
|
|
std::map<uint64_t, Way> ways;
|
|
|
|
std::map<uint64_t, Relation> relations;
|
2021-04-14 19:04:08 +00:00
|
|
|
};
|
|
|
|
}
|