#include #include #include namespace scwx { namespace qt { namespace map { static const std::string logPrefix_ = "scwx::qt::map::draw_layer"; static const auto logger_ = scwx::util::Logger::Create(logPrefix_); class DrawLayerImpl { public: explicit DrawLayerImpl(std::shared_ptr context) {} ~DrawLayerImpl() {} std::vector> drawList_; }; DrawLayer::DrawLayer(std::shared_ptr context) : GenericLayer(context), p(std::make_unique(context)) { } DrawLayer::~DrawLayer() = default; void DrawLayer::Initialize() { for (auto& item : p->drawList_) { item->Initialize(); } } void DrawLayer::Render(const QMapbox::CustomLayerRenderParameters& params) { for (auto& item : p->drawList_) { item->Render(params); } } void DrawLayer::Deinitialize() { for (auto& item : p->drawList_) { item->Deinitialize(); } } void DrawLayer::AddDrawItem(std::shared_ptr drawItem) { p->drawList_.push_back(drawItem); } } // namespace map } // namespace qt } // namespace scwx