Files
comaps/drape_frontend/engine_context.hpp
Konstantin Pastbin e3e4a1985a 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
2025-05-08 21:10:51 +07:00

66 lines
2.0 KiB
C++

#pragma once
#include "drape_frontend/custom_features_context.hpp"
#include "drape_frontend/map_shape.hpp"
#include "drape_frontend/tile_utils.hpp"
#include "drape_frontend/threads_commutator.hpp"
#include "drape_frontend/traffic_generator.hpp"
#include "drape/constants.hpp"
#include "drape/pointers.hpp"
#include <functional>
namespace dp
{
class TextureManager;
} // namespace dp
namespace df
{
class Message;
class MetalineManager;
class EngineContext
{
public:
EngineContext(TileKey tileKey,
ref_ptr<ThreadsCommutator> commutator,
ref_ptr<dp::TextureManager> texMng,
ref_ptr<MetalineManager> metalineMng,
CustomFeaturesContextWeakPtr customFeaturesContext,
bool is3dBuildingsEnabled,
bool isTrafficEnabled,
bool isolinesEnabled,
int8_t mapLangIndex);
TileKey const & GetTileKey() const { return m_tileKey; }
bool Is3dBuildingsEnabled() const { return m_3dBuildingsEnabled; }
bool IsTrafficEnabled() const { return m_trafficEnabled; }
bool IsolinesEnabled() const { return m_isolinesEnabled; }
int8_t GetMapLangIndex() const { return m_mapLangIndex; }
CustomFeaturesContextWeakPtr GetCustomFeaturesContext() const { return m_customFeaturesContext; }
ref_ptr<dp::TextureManager> GetTextureManager() const;
ref_ptr<MetalineManager> GetMetalineManager() const;
void BeginReadTile();
void Flush(TMapShapes && shapes);
void FlushOverlays(TMapShapes && shapes);
void FlushTrafficGeometry(TrafficSegmentsGeometry && geometry);
void EndReadTile();
private:
void PostMessage(drape_ptr<Message> && message);
TileKey m_tileKey;
ref_ptr<ThreadsCommutator> m_commutator;
ref_ptr<dp::TextureManager> m_texMng;
ref_ptr<MetalineManager> m_metalineMng;
CustomFeaturesContextWeakPtr m_customFeaturesContext;
bool m_3dBuildingsEnabled;
bool m_trafficEnabled;
bool m_isolinesEnabled;
int8_t m_mapLangIndex;
};
} // namespace df