#include #include #include namespace mbgl { namespace style { namespace { const LayerTypeInfo typeInfoCustom{ "", LayerTypeInfo::SourceNotRequired }; } // namespace CustomLayer::CustomLayer(const std::string& layerID, std::unique_ptr host) : Layer(makeMutable(layerID, std::move(host))) { } CustomLayer::~CustomLayer() = default; const CustomLayer::Impl& CustomLayer::impl() const { return static_cast(*baseImpl); } Mutable CustomLayer::mutableImpl() const { return makeMutable(impl()); } std::unique_ptr CustomLayer::cloneRef(const std::string&) const { assert(false); return nullptr; } using namespace conversion; optional CustomLayer::setPaintProperty(const std::string&, const Convertible&) { return Error { "layer doesn't support this property" }; } optional CustomLayer::setLayoutProperty(const std::string&, const Convertible&) { return Error { "layer doesn't support this property" }; } Mutable CustomLayer::mutableBaseImpl() const { return staticMutableCast(mutableImpl()); } const LayerTypeInfo* CustomLayer::Impl::getTypeInfo() const noexcept { return &typeInfoCustom; } CustomLayerFactory::CustomLayerFactory() = default; CustomLayerFactory::~CustomLayerFactory() = default; const LayerTypeInfo* CustomLayerFactory::getTypeInfo() const noexcept { return &typeInfoCustom; } std::unique_ptr CustomLayerFactory::createLayer(const std::string&, const conversion::Convertible&) { assert(false); return nullptr; } } // namespace style } // namespace mbgl