#include #include #include #include namespace mbgl { const style::LayerTypeInfo* LineLayerFactory::getTypeInfo() const noexcept { return style::LineLayer::Impl::staticTypeInfo(); } std::unique_ptr LineLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept { optional source = getSource(value); if (!source) { return nullptr; } std::unique_ptr layer = std::unique_ptr(new style::LineLayer(id, *source)); if (!initSourceLayerAndFilter(layer.get(), value)) { return nullptr; } return layer; } std::unique_ptr LineLayerFactory::createRenderLayer(Immutable impl) noexcept { assert(impl->getTypeInfo() == getTypeInfo()); return std::make_unique(staticImmutableCast(std::move(impl))); } } // namespace mbgl