diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-25 18:20:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-12 11:26:27 -0700 |
commit | c2a5894f2dbe9982830066ab9347b059e6e7d845 (patch) | |
tree | c09363c2025b80265de195969ee56cc64e567e70 /include/mbgl/style/sources/raster_source.hpp | |
parent | d3f23b83d42de8ef23ea1dbd8abfc6276009531f (diff) | |
download | qtlocation-mapboxgl-c2a5894f2dbe9982830066ab9347b059e6e7d845.tar.gz |
[core] Immutable Impls
Diffstat (limited to 'include/mbgl/style/sources/raster_source.hpp')
-rw-r--r-- | include/mbgl/style/sources/raster_source.hpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/mbgl/style/sources/raster_source.hpp b/include/mbgl/style/sources/raster_source.hpp index 395f25e51d..7f23a7ca4b 100644 --- a/include/mbgl/style/sources/raster_source.hpp +++ b/include/mbgl/style/sources/raster_source.hpp @@ -5,23 +5,34 @@ #include <mbgl/util/variant.hpp> namespace mbgl { + +class AsyncRequest; + namespace style { class RasterSource : public Source { public: RasterSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize); + ~RasterSource() final; + const variant<std::string, Tileset>& getURLOrTileset() const; optional<std::string> getURL() const; - // Private implementation + uint16_t getTileSize() const; class Impl; - Impl* const impl; + const Impl& impl() const; + + void loadDescription(FileSource&) final; + +private: + const variant<std::string, Tileset> urlOrTileset; + std::unique_ptr<AsyncRequest> req; }; template <> inline bool Source::is<RasterSource>() const { - return type == SourceType::Raster; + return getType() == SourceType::Raster; } } // namespace style |