diff options
Diffstat (limited to 'include/mbgl/platform/factory.hpp')
-rw-r--r-- | include/mbgl/platform/factory.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/mbgl/platform/factory.hpp b/include/mbgl/platform/factory.hpp new file mode 100644 index 0000000000..c4b6dcfce6 --- /dev/null +++ b/include/mbgl/platform/factory.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <mbgl/storage/file_source_options.hpp> + +#include <memory> + +namespace mbgl { + +class FileSource; + +namespace platform { + +class Factory { +public: + // This is also a singleton: it stores a weak reference to the managed object once it has been created upon first + // call of this function. It allows the initial value to be overriden. + static std::shared_ptr<FileSource> sharedFileSource(const FileSourceOptions& options = {}, std::shared_ptr<FileSource> initial = {}); +}; + +} // namespace platform +} // namespace mbgl |