summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/raster_tile_worker.hpp
blob: c99b6269ec7e4d1c2f365830235b607ddae84c73 (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/tile/tile_id.hpp>
#include <mbgl/actor/actor_ref.hpp>
#include <mbgl/util/optional.hpp>

#include <memory>
#include <string>

namespace mbgl {

class RasterTile;

namespace style {
class Layer;
} // namespace style

class RasterTileWorker {
public:
    RasterTileWorker(ActorRef<RasterTileWorker>, ActorRef<RasterTile>, OverscaledTileID);
    ~RasterTileWorker();

    void setLayers(std::vector<std::unique_ptr<style::Layer>>);
    void parse(std::shared_ptr<const std::string> data);

private:
    ActorRef<RasterTile> parent;

    const OverscaledTileID id;

    // Outer optional indicates whether we've received it or not.
    optional<std::vector<std::unique_ptr<style::Layer>>> layers;
};

} // namespace mbgl