blob: 2e5ea37a0fa61cbec92c96ab60d722b22f331fd7 (
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
46
47
48
49
50
51
52
53
54
|
<%
const properties = locals.properties;
-%>
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
#pragma once
#include <mbgl/style/light_property.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/style/position.hpp>
#include <mbgl/style/properties.hpp>
#include <mbgl/util/color.hpp>
namespace mbgl {
namespace style {
<% for (const property of properties) { -%>
struct Light<%- camelize(property.name) %> : LightProperty<<%- evaluatedType(property) %>> {
static <%- evaluatedType(property) %> defaultValue() { return <%- defaultValue(property) %>; }
};
<% } -%>
class LightProperties {
public:
class Evaluated {
public:
<% for (const property of properties) { -%>
<%- evaluatedType(property) %> <%- camelizeWithLeadingLowercase(property.name) %>;
<% } -%>
};
class Unevaluated {
public:
<% for (const property of properties) { -%>
style::Transitioning<<%- propertyValueType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %>;
<% } -%>
bool hasTransition() const;
Evaluated evaluate(const PropertyEvaluationParameters&) const;
};
class Transitionable {
public:
<% for (const property of properties) { -%>
style::Transitionable<<%- propertyValueType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %>;
<% } -%>
Unevaluated transitioned(const TransitionParameters&, Unevaluated&& prior) const;
Unevaluated untransitioned() const;
};
};
} // namespace style
} // namespace mbgl
|