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,60 @@
#pragma once
#include "coding/reader.hpp"
#include "coding/write_to_sink.hpp"
#include <cstdint>
namespace coding
{
namespace binary
{
struct HeaderSizeOfVisitor
{
void operator()(uint64_t v, char const * /* name */ = nullptr) { m_size += sizeof(v); }
template <typename R>
void operator()(R & r, char const * /* name */ = nullptr)
{
r.Visit(*this);
}
uint64_t m_size = 0;
};
template <typename Sink>
struct HeaderSerVisitor
{
HeaderSerVisitor(Sink & sink) : m_sink(sink) {}
void operator()(uint64_t v, char const * /* name */ = nullptr) { WriteToSink(m_sink, v); }
template <typename R>
void operator()(R & r, char const * /* name */ = nullptr)
{
r.Visit(*this);
}
Sink & m_sink;
};
template <typename Source>
struct HeaderDesVisitor
{
HeaderDesVisitor(Source & source): m_source(source) {}
void operator()(uint64_t & v, char const * /* name */ = nullptr)
{
v = ReadPrimitiveFromSource<uint64_t>(m_source);
}
template <typename R>
void operator()(R & r, char const * /* name */ = nullptr)
{
r.Visit(*this);
}
Source & m_source;
};
} // namespace binary
} // namespace coding