summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/custom_layer_impl.hpp
blob: d8b8a7f286f9eec0c3a6351061d4b3934852cbce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once

#include <mbgl/style/layer_impl.hpp>
#include <mbgl/style/layer_properties.hpp>
#include <mbgl/style/layers/custom_layer.hpp>

#include <memory>

namespace mbgl {

class TransformState;

namespace style {

class CustomLayer::Impl : public Layer::Impl {
public:
    Impl(const std::string& id,
         std::unique_ptr<CustomLayerHost> host);

    bool hasLayoutDifference(const Layer::Impl&) const override;
    void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;

    std::shared_ptr<CustomLayerHost> host;

    DECLARE_LAYER_TYPE_INFO;
};

class CustomLayerProperties final : public LayerProperties {
public:
    explicit CustomLayerProperties(Immutable<CustomLayer::Impl> impl)
        : LayerProperties(std::move(impl)) {}
};

} // namespace style
} // namespace mbgl