noexcept specifier for layer factory methods
This commit is contained in:
@@ -98,13 +98,13 @@ class LayerFactory {
|
||||
public:
|
||||
virtual ~LayerFactory() = default;
|
||||
/// Returns \c true if this factory can produce layers of the given type of the layers; returns \c false otherwise.
|
||||
virtual bool supportsType(const std::string& type) const = 0;
|
||||
virtual bool supportsType(const std::string& type) const noexcept = 0;
|
||||
/// Returns a new Layer instance on success call; returns `nulltptr` otherwise.
|
||||
virtual std::unique_ptr<Layer> createLayer(const std::string& id, const conversion::Convertible& value) = 0;
|
||||
|
||||
protected:
|
||||
optional<std::string> getSource(const conversion::Convertible& value) const;
|
||||
bool initSourceLayerAndFilter(Layer*, const conversion::Convertible& value) const;
|
||||
optional<std::string> getSource(const conversion::Convertible& value) const noexcept;
|
||||
bool initSourceLayerAndFilter(Layer*, const conversion::Convertible& value) const noexcept;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -117,11 +117,11 @@ public:
|
||||
*
|
||||
* @return LayerManager*
|
||||
*/
|
||||
static LayerManager* get();
|
||||
static LayerManager* get() noexcept;
|
||||
|
||||
virtual ~LayerManager() = default;
|
||||
/// Returns a new Layer instance on success call; returns `nulltptr` otherwise.
|
||||
virtual std::unique_ptr<Layer> createLayer(const std::string& type, const std::string& id, const conversion::Convertible& value, conversion::Error& error) = 0;
|
||||
virtual std::unique_ptr<Layer> createLayer(const std::string& type, const std::string& id, const conversion::Convertible& value, conversion::Error& error) noexcept = 0;
|
||||
|
||||
protected:
|
||||
LayerManager() = default;
|
||||
|
||||
@@ -61,10 +61,10 @@ public:
|
||||
BackgroundLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~BackgroundLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static BackgroundLayerFactory* get();
|
||||
static BackgroundLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static BackgroundLayerFactory* instance;
|
||||
|
||||
@@ -109,10 +109,10 @@ public:
|
||||
CircleLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~CircleLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static CircleLayerFactory* get();
|
||||
static CircleLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static CircleLayerFactory* instance;
|
||||
|
||||
@@ -90,10 +90,10 @@ public:
|
||||
CustomLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~CustomLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static CustomLayerFactory* get();
|
||||
static CustomLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static CustomLayerFactory* instance;
|
||||
|
||||
@@ -85,10 +85,10 @@ public:
|
||||
FillExtrusionLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~FillExtrusionLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static FillExtrusionLayerFactory* get();
|
||||
static FillExtrusionLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static FillExtrusionLayerFactory* instance;
|
||||
|
||||
@@ -85,10 +85,10 @@ public:
|
||||
FillLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~FillLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static FillLayerFactory* get();
|
||||
static FillLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static FillLayerFactory* instance;
|
||||
|
||||
@@ -74,10 +74,10 @@ public:
|
||||
HeatmapLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~HeatmapLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static HeatmapLayerFactory* get();
|
||||
static HeatmapLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static HeatmapLayerFactory* instance;
|
||||
|
||||
@@ -79,10 +79,10 @@ public:
|
||||
HillshadeLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~HillshadeLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static HillshadeLayerFactory* get();
|
||||
static HillshadeLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static HillshadeLayerFactory* instance;
|
||||
|
||||
@@ -77,10 +77,10 @@ public:
|
||||
<%- camelize(type) %>LayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~<%- camelize(type) %>LayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static <%- camelize(type) %>LayerFactory* get();
|
||||
static <%- camelize(type) %>LayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static <%- camelize(type) %>LayerFactory* instance;
|
||||
|
||||
@@ -130,10 +130,10 @@ public:
|
||||
LineLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~LineLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static LineLayerFactory* get();
|
||||
static LineLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static LineLayerFactory* instance;
|
||||
|
||||
@@ -91,10 +91,10 @@ public:
|
||||
RasterLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~RasterLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static RasterLayerFactory* get();
|
||||
static RasterLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static RasterLayerFactory* instance;
|
||||
|
||||
@@ -279,10 +279,10 @@ public:
|
||||
SymbolLayerFactory();
|
||||
// LayerFactory overrides.
|
||||
~SymbolLayerFactory() override;
|
||||
bool supportsType(const std::string& type) const final;
|
||||
bool supportsType(const std::string& type) const noexcept final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
|
||||
|
||||
static SymbolLayerFactory* get();
|
||||
static SymbolLayerFactory* get() noexcept;
|
||||
|
||||
private:
|
||||
static SymbolLayerFactory* instance;
|
||||
|
||||
@@ -81,7 +81,7 @@ JavaLayerPeerFactory* LayerManagerAndroid::getPeerFactory(mbgl::style::Layer* la
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<style::Layer> LayerManagerAndroid::createLayer(const std::string& type, const std::string& id, const style::conversion::Convertible& value, style::conversion::Error& error) {
|
||||
std::unique_ptr<style::Layer> LayerManagerAndroid::createLayer(const std::string& type, const std::string& id, const style::conversion::Convertible& value, style::conversion::Error& error) noexcept{
|
||||
for (const auto& factory: factories) {
|
||||
auto* layerFactory = factory->getLayerFactory();
|
||||
if (layerFactory->supportsType(type)) {
|
||||
@@ -97,7 +97,7 @@ std::unique_ptr<style::Layer> LayerManagerAndroid::createLayer(const std::string
|
||||
}
|
||||
|
||||
// static
|
||||
LayerManagerAndroid* LayerManagerAndroid::get() {
|
||||
LayerManagerAndroid* LayerManagerAndroid::get() noexcept {
|
||||
static LayerManagerAndroid impl;
|
||||
return &impl;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ LayerManagerAndroid* LayerManagerAndroid::get() {
|
||||
|
||||
namespace style {
|
||||
// static
|
||||
LayerManager* LayerManager::get() {
|
||||
LayerManager* LayerManager::get() noexcept {
|
||||
return android::LayerManagerAndroid::get();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace android {
|
||||
class LayerManagerAndroid : public mbgl::style::LayerManager {
|
||||
public:
|
||||
~LayerManagerAndroid() override;
|
||||
static LayerManagerAndroid* get();
|
||||
static LayerManagerAndroid* get() noexcept;
|
||||
|
||||
jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv&, mbgl::Map&, mbgl::style::Layer&);
|
||||
jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv& env, mbgl::Map& map, std::unique_ptr<mbgl::style::Layer>);
|
||||
@@ -30,7 +30,7 @@ private:
|
||||
LayerManagerAndroid();
|
||||
JavaLayerPeerFactory* getPeerFactory(mbgl::style::Layer*);
|
||||
// mbgl:style::LayerManager overrides.
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& type, const std::string& id, const style::conversion::Convertible& value, style::conversion::Error& error) final;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string& type, const std::string& id, const style::conversion::Convertible& value, style::conversion::Error& error) noexcept final;
|
||||
|
||||
std::vector<std::unique_ptr<JavaLayerPeerFactory>> factories;
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
LayerManagerBase();
|
||||
private:
|
||||
// LayerManager overrides.
|
||||
std::unique_ptr<Layer> createLayer(const std::string& type, const std::string& id, const conversion::Convertible& value, conversion::Error& error) final;
|
||||
std::unique_ptr<Layer> createLayer(const std::string& type, const std::string& id, const conversion::Convertible& value, conversion::Error& error) noexcept final;
|
||||
std::vector<std::unique_ptr<LayerFactory>> factories;
|
||||
};
|
||||
|
||||
@@ -37,7 +37,10 @@ LayerManagerBase::LayerManagerBase() {
|
||||
factories.emplace_back(std::unique_ptr<LayerFactory>(new HeatmapLayerFactory));
|
||||
}
|
||||
|
||||
std::unique_ptr<Layer> LayerManagerBase::createLayer(const std::string& type, const std::string& id, const conversion::Convertible& value, conversion::Error& error) {
|
||||
std::unique_ptr<Layer> LayerManagerBase::createLayer(const std::string& type,
|
||||
const std::string& id,
|
||||
const conversion::Convertible& value,
|
||||
conversion::Error& error) noexcept {
|
||||
for (const auto& factory: factories) {
|
||||
if (factory->supportsType(type)) {
|
||||
auto layer = factory->createLayer(id, value);
|
||||
@@ -52,7 +55,7 @@ std::unique_ptr<Layer> LayerManagerBase::createLayer(const std::string& type, co
|
||||
}
|
||||
|
||||
// static
|
||||
LayerManager* LayerManager::get() {
|
||||
LayerManager* LayerManager::get() noexcept {
|
||||
static LayerManagerBase impl;
|
||||
return &impl;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ optional<conversion::Error> Layer::setVisibility(const conversion::Convertible&
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
optional<std::string> LayerFactory::getSource(const conversion::Convertible& value) const {
|
||||
optional<std::string> LayerFactory::getSource(const conversion::Convertible& value) const noexcept {
|
||||
auto sourceValue = objectMember(value, "source");
|
||||
if (!sourceValue) {
|
||||
return nullopt;
|
||||
@@ -121,7 +121,7 @@ optional<std::string> LayerFactory::getSource(const conversion::Convertible& val
|
||||
return source;
|
||||
}
|
||||
|
||||
bool LayerFactory::initSourceLayerAndFilter(Layer* layer, const conversion::Convertible& value) const {
|
||||
bool LayerFactory::initSourceLayerAndFilter(Layer* layer, const conversion::Convertible& value) const noexcept {
|
||||
auto sourceLayerValue = objectMember(value, "source-layer");
|
||||
if (sourceLayerValue) {
|
||||
optional<std::string> sourceLayer = toString(*sourceLayerValue);
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
// Utility function for automatic layer grouping.
|
||||
virtual void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const = 0;
|
||||
|
||||
virtual LayerFactory* getLayerFactory() const = 0;
|
||||
virtual LayerFactory* getLayerFactory() const noexcept = 0;
|
||||
|
||||
const LayerType type;
|
||||
std::string id;
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> BackgroundLayer::cloneRef(const std::string& id_) const {
|
||||
void BackgroundLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* BackgroundLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* BackgroundLayer::Impl::getLayerFactory() const noexcept {
|
||||
return BackgroundLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -284,12 +284,12 @@ BackgroundLayerFactory::BackgroundLayerFactory() {
|
||||
BackgroundLayerFactory::~BackgroundLayerFactory() = default;
|
||||
|
||||
// static
|
||||
BackgroundLayerFactory* BackgroundLayerFactory::get() {
|
||||
BackgroundLayerFactory* BackgroundLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool BackgroundLayerFactory::supportsType(const std::string& type) const {
|
||||
bool BackgroundLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "background";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
BackgroundPaintProperties::Transitionable paint;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> CircleLayer::cloneRef(const std::string& id_) const {
|
||||
void CircleLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* CircleLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* CircleLayer::Impl::getLayerFactory() const noexcept {
|
||||
return CircleLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -701,12 +701,12 @@ CircleLayerFactory::CircleLayerFactory() {
|
||||
CircleLayerFactory::~CircleLayerFactory() = default;
|
||||
|
||||
// static
|
||||
CircleLayerFactory* CircleLayerFactory::get() {
|
||||
CircleLayerFactory* CircleLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool CircleLayerFactory::supportsType(const std::string& type) const {
|
||||
bool CircleLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "circle";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
CirclePaintProperties::Transitionable paint;
|
||||
};
|
||||
|
||||
@@ -49,12 +49,12 @@ CustomLayerFactory::CustomLayerFactory() {
|
||||
CustomLayerFactory::~CustomLayerFactory() = default;
|
||||
|
||||
// static
|
||||
CustomLayerFactory* CustomLayerFactory::get() {
|
||||
CustomLayerFactory* CustomLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool CustomLayerFactory::supportsType(const std::string&) const {
|
||||
bool CustomLayerFactory::supportsType(const std::string&) const noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ bool CustomLayer::Impl::hasLayoutDifference(const Layer::Impl&) const {
|
||||
void CustomLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* CustomLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* CustomLayer::Impl::getLayerFactory() const noexcept {
|
||||
return CustomLayerFactory::get();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
std::shared_ptr<CustomLayerHost> host;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> FillExtrusionLayer::cloneRef(const std::string& id_) cons
|
||||
void FillExtrusionLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* FillExtrusionLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* FillExtrusionLayer::Impl::getLayerFactory() const noexcept {
|
||||
return FillExtrusionLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -503,12 +503,12 @@ FillExtrusionLayerFactory::FillExtrusionLayerFactory() {
|
||||
FillExtrusionLayerFactory::~FillExtrusionLayerFactory() = default;
|
||||
|
||||
// static
|
||||
FillExtrusionLayerFactory* FillExtrusionLayerFactory::get() {
|
||||
FillExtrusionLayerFactory* FillExtrusionLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool FillExtrusionLayerFactory::supportsType(const std::string& type) const {
|
||||
bool FillExtrusionLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "fill-extrusion";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
Properties<>::Unevaluated layout;
|
||||
FillExtrusionPaintProperties::Transitionable paint;
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> FillLayer::cloneRef(const std::string& id_) const {
|
||||
void FillLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* FillLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* FillLayer::Impl::getLayerFactory() const noexcept {
|
||||
return FillLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -503,12 +503,12 @@ FillLayerFactory::FillLayerFactory() {
|
||||
FillLayerFactory::~FillLayerFactory() = default;
|
||||
|
||||
// static
|
||||
FillLayerFactory* FillLayerFactory::get() {
|
||||
FillLayerFactory* FillLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool FillLayerFactory::supportsType(const std::string& type) const {
|
||||
bool FillLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "fill";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
Properties<>::Unevaluated layout;
|
||||
FillPaintProperties::Transitionable paint;
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> HeatmapLayer::cloneRef(const std::string& id_) const {
|
||||
void HeatmapLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* HeatmapLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* HeatmapLayer::Impl::getLayerFactory() const noexcept {
|
||||
return HeatmapLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -388,12 +388,12 @@ HeatmapLayerFactory::HeatmapLayerFactory() {
|
||||
HeatmapLayerFactory::~HeatmapLayerFactory() = default;
|
||||
|
||||
// static
|
||||
HeatmapLayerFactory* HeatmapLayerFactory::get() {
|
||||
HeatmapLayerFactory* HeatmapLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool HeatmapLayerFactory::supportsType(const std::string& type) const {
|
||||
bool HeatmapLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "heatmap";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
HeatmapPaintProperties::Transitionable paint;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> HillshadeLayer::cloneRef(const std::string& id_) const {
|
||||
void HillshadeLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* HillshadeLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* HillshadeLayer::Impl::getLayerFactory() const noexcept {
|
||||
return HillshadeLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -435,12 +435,12 @@ HillshadeLayerFactory::HillshadeLayerFactory() {
|
||||
HillshadeLayerFactory::~HillshadeLayerFactory() = default;
|
||||
|
||||
// static
|
||||
HillshadeLayerFactory* HillshadeLayerFactory::get() {
|
||||
HillshadeLayerFactory* HillshadeLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool HillshadeLayerFactory::supportsType(const std::string& type) const {
|
||||
bool HillshadeLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "hillshade";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
HillshadePaintProperties::Transitionable paint;
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ void <%- camelize(type) %>Layer::Impl::stringifyLayout(rapidjson::Writer<rapidjs
|
||||
}
|
||||
<% } -%>
|
||||
|
||||
LayerFactory* <%- camelize(type) %>Layer::Impl::getLayerFactory() const {
|
||||
LayerFactory* <%- camelize(type) %>Layer::Impl::getLayerFactory() const noexcept {
|
||||
return <%- camelize(type) %>LayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -274,12 +274,12 @@ Mutable<Layer::Impl> <%- camelize(type) %>Layer::mutableBaseImpl() const {
|
||||
<%- camelize(type) %>LayerFactory::~<%- camelize(type) %>LayerFactory() = default;
|
||||
|
||||
// static
|
||||
<%- camelize(type) %>LayerFactory* <%- camelize(type) %>LayerFactory::get() {
|
||||
<%- camelize(type) %>LayerFactory* <%- camelize(type) %>LayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool <%- camelize(type) %>LayerFactory::supportsType(const std::string& type) const {
|
||||
bool <%- camelize(type) %>LayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "<%- type %>";
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ void LineLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>
|
||||
layout.stringify(writer);
|
||||
}
|
||||
|
||||
LayerFactory* LineLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* LineLayer::Impl::getLayerFactory() const noexcept {
|
||||
return LineLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -842,12 +842,12 @@ LineLayerFactory::LineLayerFactory() {
|
||||
LineLayerFactory::~LineLayerFactory() = default;
|
||||
|
||||
// static
|
||||
LineLayerFactory* LineLayerFactory::get() {
|
||||
LineLayerFactory* LineLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool LineLayerFactory::supportsType(const std::string& type) const {
|
||||
bool LineLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "line";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
LineLayoutProperties::Unevaluated layout;
|
||||
LinePaintProperties::Transitionable paint;
|
||||
|
||||
@@ -42,7 +42,7 @@ std::unique_ptr<Layer> RasterLayer::cloneRef(const std::string& id_) const {
|
||||
void RasterLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const {
|
||||
}
|
||||
|
||||
LayerFactory* RasterLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* RasterLayer::Impl::getLayerFactory() const noexcept {
|
||||
return RasterLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -524,12 +524,12 @@ RasterLayerFactory::RasterLayerFactory() {
|
||||
RasterLayerFactory::~RasterLayerFactory() = default;
|
||||
|
||||
// static
|
||||
RasterLayerFactory* RasterLayerFactory::get() {
|
||||
RasterLayerFactory* RasterLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool RasterLayerFactory::supportsType(const std::string& type) const {
|
||||
bool RasterLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "raster";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
RasterPaintProperties::Transitionable paint;
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ void SymbolLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffe
|
||||
layout.stringify(writer);
|
||||
}
|
||||
|
||||
LayerFactory* SymbolLayer::Impl::getLayerFactory() const {
|
||||
LayerFactory* SymbolLayer::Impl::getLayerFactory() const noexcept {
|
||||
return SymbolLayerFactory::get();
|
||||
}
|
||||
|
||||
@@ -1992,12 +1992,12 @@ SymbolLayerFactory::SymbolLayerFactory() {
|
||||
SymbolLayerFactory::~SymbolLayerFactory() = default;
|
||||
|
||||
// static
|
||||
SymbolLayerFactory* SymbolLayerFactory::get() {
|
||||
SymbolLayerFactory* SymbolLayerFactory::get() noexcept {
|
||||
assert(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool SymbolLayerFactory::supportsType(const std::string& type) const {
|
||||
bool SymbolLayerFactory::supportsType(const std::string& type) const noexcept {
|
||||
return type == "symbol";
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
|
||||
bool hasLayoutDifference(const Layer::Impl&) const override;
|
||||
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
|
||||
LayerFactory* getLayerFactory() const final;
|
||||
LayerFactory* getLayerFactory() const noexcept final;
|
||||
|
||||
SymbolLayoutProperties::Unevaluated layout;
|
||||
SymbolPaintProperties::Transitionable paint;
|
||||
|
||||
Reference in New Issue
Block a user