* [ios, macos] new struct MGLTransition * [ios] MGLTransition struct moved to MGLTypes.h * [ios] MGLTransition implemented for style layer properties * [ios, macos] added support for getting property transitions * [ios, macos] updated to MGLDurationFromTimeInterval and MGLTimeIntervalFromDuration * [ios, macos] added transition properties test * [ios, macos] modified key strings imp * [ios, macos] The impl for transition properties were changed to public methods * [ios, macos] Changelog update * [ios] Fixed layer space formatting * [core] The name space was fixed for getters that returned TransitionOptions * [ios, macos] Added rawLayer transition property tests * [ios] Added a factory method for MGLTransition and transition-related methods to NSValue(MGLAdditions) * [ios, macos] Copyedited changelog blurbs about transition properties
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
<%
|
|
const type = locals.type;
|
|
const layoutProperties = locals.layoutProperties;
|
|
const paintProperties = locals.paintProperties;
|
|
-%>
|
|
// This file is generated. Do not edit.
|
|
|
|
#pragma once
|
|
|
|
#include <mbgl/style/layer.hpp>
|
|
#include <mbgl/style/filter.hpp>
|
|
#include <mbgl/style/property_value.hpp>
|
|
#include <mbgl/style/data_driven_property_value.hpp>
|
|
|
|
#include <mbgl/util/color.hpp>
|
|
|
|
<% if (type === 'line' || type === 'symbol') { -%>
|
|
#include <vector>
|
|
|
|
<% } -%>
|
|
namespace mbgl {
|
|
namespace style {
|
|
|
|
class TransitionOptions;
|
|
|
|
class <%- camelize(type) %>Layer : public Layer {
|
|
public:
|
|
<% if (type === 'background') { -%>
|
|
<%- camelize(type) %>Layer(const std::string& layerID);
|
|
<% } else { -%>
|
|
<%- camelize(type) %>Layer(const std::string& layerID, const std::string& sourceID);
|
|
<% } -%>
|
|
~<%- camelize(type) %>Layer() final;
|
|
|
|
<% if (type !== 'background') { -%>
|
|
// Source
|
|
const std::string& getSourceID() const;
|
|
<% if (type !== 'raster') { -%>
|
|
const std::string& getSourceLayer() const;
|
|
void setSourceLayer(const std::string& sourceLayer);
|
|
|
|
void setFilter(const Filter&);
|
|
const Filter& getFilter() const;
|
|
<% } -%>
|
|
|
|
<% } -%>
|
|
<% if (layoutProperties.length) { -%>
|
|
// Layout properties
|
|
|
|
<% for (const property of layoutProperties) { -%>
|
|
static <%- propertyValueType(property) %> getDefault<%- camelize(property.name) %>();
|
|
<%- propertyValueType(property) %> get<%- camelize(property.name) %>() const;
|
|
void set<%- camelize(property.name) %>(<%- propertyValueType(property) %>);
|
|
|
|
<% } -%>
|
|
<% } -%>
|
|
// Paint properties
|
|
|
|
<% for (const property of paintProperties) { -%>
|
|
static <%- propertyValueType(property) %> getDefault<%- camelize(property.name) %>();
|
|
<%- propertyValueType(property) %> get<%- camelize(property.name) %>(const optional<std::string>& klass = {}) const;
|
|
void set<%- camelize(property.name) %>(<%- propertyValueType(property) %>, const optional<std::string>& klass = {});
|
|
void set<%- camelize(property.name) %>Transition(const TransitionOptions&, const optional<std::string>& klass = {});
|
|
TransitionOptions get<%- camelize(property.name) %>Transition(const optional<std::string>& klass = {}) const;
|
|
|
|
<% } -%>
|
|
// Private implementation
|
|
|
|
class Impl;
|
|
Impl* const impl;
|
|
|
|
<%- camelize(type) %>Layer(const Impl&);
|
|
<%- camelize(type) %>Layer(const <%- camelize(type) %>Layer&) = delete;
|
|
};
|
|
|
|
template <>
|
|
inline bool Layer::is<<%- camelize(type) %>Layer>() const {
|
|
return type == Type::<%- camelize(type) %>;
|
|
}
|
|
|
|
} // namespace style
|
|
} // namespace mbgl
|