MapViewer/lib/osmparser/include/osmobject.hpp

44 lines
959 B
C++
Raw Normal View History

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 Node;
class Way;
2021-04-16 13:16:00 +00:00
class Relation;
2021-04-14 19:04:08 +00:00
class Object
{
public:
Object(const std::string& file);
~Object();
2021-04-16 13:16:00 +00:00
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
std::shared_ptr<Node> GetNode(unsigned int id) const;
2021-04-14 19:04:08 +00:00
2021-04-16 13:16:00 +00:00
std::vector<std::shared_ptr<Way>> GetWays() const;
2021-04-14 19:04:08 +00:00
size_t GetWaysSize() const;
2021-04-16 13:16:00 +00:00
std::shared_ptr<Way> GetWay(unsigned int id) const;
std::vector<std::shared_ptr<Relation>> GetRelations() const;
size_t GetRelationsSize() const;
std::shared_ptr<Relation> GetRelation(unsigned int id) const;
2021-04-14 19:04:08 +00:00
public:
const std::string version;
const std::string generator;
Bounds bounds;
private:
2021-04-16 13:16:00 +00:00
std::map<unsigned int, std::shared_ptr<Node>> nodes;
std::map<unsigned int, std::shared_ptr<Way>> ways;
std::map<unsigned int, std::shared_ptr<Relation>> relations;
2021-04-14 19:04:08 +00:00
};
}