summaryrefslogtreecommitdiff
path: root/include/mbgl/layer/custom_layer.hpp
blob: 81e91ddf50d9972d884f44b1131b0c6afcc86027 (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
#pragma once

#include <mbgl/style/layer.hpp>

namespace mbgl {

class CustomLayer : public Layer {
public:
    CustomLayer(const std::string& id,
                CustomLayerInitializeFunction,
                CustomLayerRenderFunction,
                CustomLayerDeinitializeFunction,
                void* context);
    ~CustomLayer() final;

    // Private implementation

    class Impl;
    Impl* impl;

    CustomLayer(const Impl&);
    CustomLayer(const CustomLayer&) = delete;
};

template <>
inline bool Layer::is<CustomLayer>() const {
    return type == Type::Custom;
}

} // namespace mbgl