summaryrefslogtreecommitdiff
path: root/src/mbgl/style/source_impl.hpp
blob: 3620ec4e50677eddfbdd7472ca58c31ec4f4258d (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
#pragma once

#include <mbgl/style/source.hpp>
#include <mbgl/util/noncopyable.hpp>

#include <string>

namespace mbgl {

class RenderSource;

namespace style {

class SourceObserver;

class Source::Impl : public EnableImmutableFromThis<Source::Impl> {
public:
    virtual ~Impl() = default;

    virtual optional<std::string> getAttribution() const = 0;
    virtual std::unique_ptr<RenderSource> createRenderSource() const = 0;

    const SourceType type;
    const std::string id;

protected:
    Impl(SourceType, std::string);
    Impl(const Impl&) = default;
    Impl& operator=(const Impl&) = delete;
};

} // namespace style
} // namespace mbgl