Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)

To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
This commit is contained in:
Konstantin Pastbin
2025-04-13 16:37:30 +07:00
commit e3e4a1985a
12931 changed files with 13195100 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
#pragma once
#include "generator/collector_interface.hpp"
#include "generator/intermediate_data.hpp"
#include <fstream>
#include <memory>
#include <string>
namespace routing_builder
{
class RestrictionWriter : public generator::CollectorInterface
{
public:
enum class ViaType
{
Node,
Way,
Count,
};
static std::string const kNodeString;
static std::string const kWayString;
RestrictionWriter(std::string const & filename, IDRInterfacePtr const & cache);
// generator::CollectorInterface overrides:
std::shared_ptr<CollectorInterface> Clone(IDRInterfacePtr const & cache = {}) const override;
void CollectRelation(RelationElement const & relationElement) override;
void Finish() override;
IMPLEMENT_COLLECTOR_IFACE(RestrictionWriter);
void MergeInto(RestrictionWriter & collector) const;
static ViaType ConvertFromString(std::string const & str);
protected:
// generator::CollectorInterface overrides:
void Save() override;
void OrderCollectedData() override;
private:
std::ofstream m_stream;
IDRInterfacePtr m_cache;
};
std::string DebugPrint(RestrictionWriter::ViaType const & type);
} // namespace routing_builder