blob: 0c80b0a1735b63304ba6f655de07941518195efb (
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
40
41
42
43
44
45
|
#ifndef LLMR_STYLE_APPLIED_CLASS_PROPERTIES
#define LLMR_STYLE_APPLIED_CLASS_PROPERTIES
#include <llmr/style/property_value.hpp>
#include <llmr/style/class_dictionary.hpp>
#include <llmr/util/time.hpp>
#include <list>
namespace llmr {
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 {
return properties.size() ? properties.back().name : ClassID::Fallback;
}
void add(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value) {
properties.emplace_back(class_id, begin, end, value);
}
bool hasTransitions() const {
return properties.size() > 1;
}
};
}
#endif
|