summaryrefslogtreecommitdiff
path: root/include/mbgl/style/applied_class_properties.hpp
blob: 827f15a2a116ce6f79b411e1b826278e0fb5d04c (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
36
37
38
39
#ifndef MBGL_STYLE_APPLIED_CLASS_PROPERTIES
#define MBGL_STYLE_APPLIED_CLASS_PROPERTIES

#include <mbgl/style/property_value.hpp>
#include <mbgl/style/class_dictionary.hpp>
#include <mbgl/util/time.hpp>

#include <list>

namespace mbgl {

class AppliedClassProperty {
public:
    AppliedClassProperty(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value);

public:
    const ClassID name;
    const timestamp begin;
    const timestamp end;
    const PropertyValue value;
};


class AppliedClassProperties {
public:
    std::list<AppliedClassProperty> properties;

public:
    // Returns thie ID of the most recent
    ClassID mostRecent() const;
    void add(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value);
    bool hasTransitions() const;
    void cleanup(timestamp now);
    bool empty() const;
};

}

#endif