mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +00:00
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:
43
descriptions/header.hpp
Normal file
43
descriptions/header.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "coding/reader.hpp"
|
||||
#include "coding/serdes_binary_header.hpp"
|
||||
#include "coding/write_to_sink.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace descriptions
|
||||
{
|
||||
struct HeaderV0
|
||||
{
|
||||
template <typename Visitor>
|
||||
void Visit(Visitor & visitor)
|
||||
{
|
||||
visitor(m_featuresOffset, "featuresOffset");
|
||||
visitor(m_langMetaOffset, "langMetaOffset");
|
||||
visitor(m_indexOffset, "indexOffset");
|
||||
visitor(m_stringsOffset, "stringsOffset");
|
||||
visitor(m_eosOffset, "eosOffset");
|
||||
}
|
||||
|
||||
template <typename Sink>
|
||||
void Serialize(Sink & sink)
|
||||
{
|
||||
coding::binary::HeaderSerVisitor<Sink> visitor(sink);
|
||||
visitor(*this);
|
||||
}
|
||||
|
||||
template <typename Source>
|
||||
void Deserialize(Source & source)
|
||||
{
|
||||
coding::binary::HeaderDesVisitor<Source> visitor(source);
|
||||
visitor(*this);
|
||||
}
|
||||
|
||||
uint64_t m_featuresOffset = 0;
|
||||
uint64_t m_langMetaOffset = 0;
|
||||
uint64_t m_indexOffset = 0;
|
||||
uint64_t m_stringsOffset = 0;
|
||||
uint64_t m_eosOffset = 0; // End of section.
|
||||
};
|
||||
} // namespace descriptions
|
||||
Reference in New Issue
Block a user