#pragma once #import "MGLStyleLayer_Private.h" #include #include #include #include #include namespace mbgl { class LayerManagerDarwin : public LayerManager { public: static LayerManagerDarwin* get() noexcept; ~LayerManagerDarwin(); MGLStyleLayer* createPeer(style::Layer*); private: LayerManagerDarwin(); /** * Enables a layer type for both JSON style and runtime API. */ void addLayerType(std::unique_ptr); /** * Enables a layer type for JSON style only. * * We might not want to expose runtime API for some layer types * in order to save binary size (the corresponding SDK layer wrappers * should be excluded from the project build). */ void addLayerTypeCoreOnly(std::unique_ptr); void registerCoreFactory(LayerFactory*); LayerPeerFactory* getPeerFactory(const style::LayerTypeInfo* typeInfo); // mbgl::LayerManager overrides. LayerFactory* getFactory(const std::string& type) noexcept final; LayerFactory* getFactory(const mbgl::style::LayerTypeInfo* info) noexcept final; std::vector> peerFactories; std::vector> coreFactories; std::map typeToFactory; }; } // namespace mbgl