-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] Immutable style Impls #8929
Changes from all commits
6ca4af2
7d6f79b
04ca556
31f68b2
2228ad9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,13 @@ public: | |
| <% } -%> | ||
|
|
||
| <% } -%> | ||
| // Visibility | ||
| void setVisibility(VisibilityType) final; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Can we add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You want to write
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm specifically interested in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's discuss making that style change separately. We already have quite a few uses of |
||
|
|
||
| // Zoom range | ||
| void setMinZoom(float) final; | ||
| void setMaxZoom(float) final; | ||
|
|
||
| <% if (layoutProperties.length) { -%> | ||
| // Layout properties | ||
|
|
||
|
|
@@ -67,15 +74,16 @@ public: | |
| // Private implementation | ||
|
|
||
| class Impl; | ||
| Impl* const impl; | ||
| const Impl& impl() const; | ||
|
|
||
| <%- camelize(type) %>Layer(const Impl&); | ||
| <%- camelize(type) %>Layer(const <%- camelize(type) %>Layer&) = delete; | ||
| Mutable<Impl> mutableImpl() const; | ||
| <%- camelize(type) %>Layer(Immutable<Impl>); | ||
| std::unique_ptr<Layer> cloneRef(const std::string& id) const final; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same note about privatization here. I know they've been public before, so this may be a follow-up change. |
||
| }; | ||
|
|
||
| template <> | ||
| inline bool Layer::is<<%- camelize(type) %>Layer>() const { | ||
| return type == LayerType::<%- camelize(type) %>; | ||
| return getType() == LayerType::<%- camelize(type) %>; | ||
| } | ||
|
|
||
| } // namespace style | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this has been public before, but is there a way we can make it private now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Styleat a minimum would need to be friended.GeometryTilealso uses it; it's possible that use could be eliminated. I'd like to leave this for a followup change though.