summaryrefslogtreecommitdiff
path: root/include/mbgl/map/update.hpp
blob: dbabff5bff85c88a49ea61d4918619a1ccf64fab (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
#ifndef MBGL_MAP_UPDATE
#define MBGL_MAP_UPDATE

#include <cstdint>

namespace mbgl {

enum class Update : uint32_t {
    Nothing                   = 0,
    Dimensions                = 1 << 1,
    DefaultTransition         = 1 << 2,
    Classes                   = 1 << 3,
    RecalculateStyle          = 1 << 4,
    RenderStill               = 1 << 5,
    Repaint                   = 1 << 6,
    Annotations               = 1 << 7,
};

inline Update operator| (const Update& lhs, const Update& rhs) {
    return Update(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
}

inline Update& operator|=(Update& lhs, const Update& rhs) {
    lhs = lhs | rhs;
    return lhs;
}

inline bool operator& (const Update& lhs, const Update& rhs) {
    return static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs);
}

} // namespace mbgl

#endif // MBGL_MAP_UPDATE