#include #include #include #include namespace mbgl { namespace style { namespace { const LayerTypeInfo typeInfoCustom{"custom", LayerTypeInfo::Source::NotRequired, LayerTypeInfo::Pass3D::NotRequired, LayerTypeInfo::Layout::NotRequired, LayerTypeInfo::FadingTiles::NotRequired, LayerTypeInfo::CrossTileIndex::NotRequired, LayerTypeInfo::TileKind::NotRequired}; } // 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::setPropertyInternal(const std::string&, const Convertible&) { return Error { "layer doesn't support this property" }; } StyleProperty CustomLayer::getProperty(const std::string&) const { return {}; } Mutable CustomLayer::mutableBaseImpl() const { return staticMutableCast(mutableImpl()); } // static const LayerTypeInfo* CustomLayer::Impl::staticTypeInfo() noexcept { return &typeInfoCustom; } } // namespace style } // namespace mbgl