blob: 61546aff622a5dc65ccdb4a685ca7454059e0513 (
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
|
#pragma once
#include <mbgl/style/conversion.hpp>
#include <mbgl/util/feature.hpp>
namespace mbgl {
class RenderTile;
using namespace style::conversion;
class SourceFeatureState {
public:
SourceFeatureState() = default;
~SourceFeatureState() = default;
void updateState(const optional<std::string>& sourceLayerID, const std::string& featureID, const FeatureState& newState);
void getState(FeatureState& result, const optional<std::string>& sourceLayerID, const std::string& featureID) const;
void removeState(const optional<std::string>& sourceLayerID, const optional<std::string>& featureID, const optional<std::string>& stateKey);
void coalesceChanges(std::vector<RenderTile>& tiles);
private:
LayerFeatureStates currentStates;
LayerFeatureStates stateChanges;
LayerFeatureStates deletedStates;
};
} // namespace mbgl
|