summaryrefslogtreecommitdiff
path: root/include/mbgl/style/light.hpp.ejs
blob: 829e782022e1a33d679c877bf349484c9bd0b428 (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
<%
  const properties = locals.properties;
-%>
// clang-format off

// This file is generated. Do not edit.

#pragma once

#include <mbgl/style/conversion.hpp>
#include <mbgl/style/property_value.hpp>
#include <mbgl/style/style_property.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/util/immutable.hpp>
#include <mbgl/util/util.hpp>

namespace mbgl {
namespace style {

class LightObserver;

class MBGL_EXPORT Light {
public:
    Light();
    ~Light();

    // Dynamic properties
    optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
    StyleProperty getProperty(const std::string&) const;

<% for (const property of properties) { -%>
    static <%- evaluatedType(property) %> getDefault<%- camelize(property.name) %>();
    <%- propertyValueType(property) %> get<%- camelize(property.name) %>() const;
    void set<%- camelize(property.name) %>(<%- propertyValueType(property) %>);
    void set<%- camelize(property.name) %>Transition(const TransitionOptions&);
    TransitionOptions get<%- camelize(property.name) %>Transition() const;

<% } -%>
    class Impl;
    Immutable<Impl> impl;
    Mutable<Impl> mutableImpl() const;

    LightObserver* observer = nullptr;
    void setObserver(LightObserver*);
};

} // namespace style
} // namespace mbgl

// clang-format on