[core] Add style::Source::setVolatile()/isVolatile() API

This commit is contained in:
Mikhail Pozdnyakov
2020-04-15 17:24:04 +03:00
parent 7af1a175a3
commit eac6bdff16
3 changed files with 20 additions and 3 deletions

View File

@@ -66,12 +66,14 @@ public:
std::string getID() const;
optional<std::string> getAttribution() const;
// The data from the volatile sources are not stored in a persistent storage.
bool isVolatile() const noexcept;
void setVolatile(bool) noexcept;
// Private implementation
class Impl;
Immutable<Impl> baseImpl;
Source(Immutable<Impl>);
void setObserver(SourceObserver*);
SourceObserver* observer = nullptr;
@@ -114,6 +116,7 @@ public:
virtual mapbox::base::WeakPtr<Source> makeWeakPtr() = 0;
protected:
explicit Source(Immutable<Impl>);
virtual Mutable<Impl> createMutable() const noexcept = 0;
};