summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/map_adapter.hpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-19 16:57:36 +0200
committerAlf Watt <alf.watt@mapbox.com>2019-03-21 12:25:12 -0700
commitba6dfea248b6fc5224c840ea536ac7abf57d80f1 (patch)
tree9ad248db128b3d1847985efb5c79bf13a4d56d36 /test/src/mbgl/test/map_adapter.hpp
parent15c6dbe967f4150a0d9f555781c7e353ecf20043 (diff)
downloadqtlocation-mapboxgl-ba6dfea248b6fc5224c840ea536ac7abf57d80f1.tar.gz
[core] Remove file source from public Map ctor
Diffstat (limited to 'test/src/mbgl/test/map_adapter.hpp')
-rw-r--r--test/src/mbgl/test/map_adapter.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/src/mbgl/test/map_adapter.hpp b/test/src/mbgl/test/map_adapter.hpp
new file mode 100644
index 0000000000..e0fc449f48
--- /dev/null
+++ b/test/src/mbgl/test/map_adapter.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <mbgl/map/map.hpp>
+#include <mbgl/map/map_impl.hpp>
+
+namespace mbgl {
+
+class FileSource;
+
+// Non-public version of mbgl::Map that accepts a file source as parameter.
+class MapAdapter : public Map {
+public:
+ explicit MapAdapter(RendererFrontend& frontend,
+ MapObserver& observer,
+ Size size,
+ float ratio,
+ std::shared_ptr<FileSource> fileSource,
+ Scheduler& scheduler,
+ const MapOptions& options)
+ : Map(std::make_unique<Map::Impl>(frontend, observer, scheduler, size, ratio, std::move(fileSource), options)) {}
+};
+
+} // namespace mbgl