summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/map_adapter.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/mbgl/test/map_adapter.hpp')
-rw-r--r--test/src/mbgl/test/map_adapter.hpp21
1 files changed, 21 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..5bdab1d164
--- /dev/null
+++ b/test/src/mbgl/test/map_adapter.hpp
@@ -0,0 +1,21 @@
+#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,
+ std::shared_ptr<FileSource> fileSource,
+ Scheduler& scheduler,
+ const MapOptions& options)
+ : Map(std::make_unique<Map::Impl>(frontend, observer, scheduler, std::move(fileSource), options)) {}
+};
+
+} // namespace mbgl