diff --git a/include/mapnik/feature_type_style.hpp b/include/mapnik/feature_type_style.hpp index 72afdacab..83761a681 100644 --- a/include/mapnik/feature_type_style.hpp +++ b/include/mapnik/feature_type_style.hpp @@ -65,11 +65,15 @@ private: bool image_filters_inflate_; friend void swap(feature_type_style& lhs, feature_type_style & rhs); public: + // ctor feature_type_style(); feature_type_style(feature_type_style const& rhs); feature_type_style(feature_type_style &&) = default; feature_type_style& operator=(feature_type_style rhs); + // comparison + bool operator==(feature_type_style const& rhs) const; + void add_rule(rule && rule); rules const& get_rules() const; rules& get_rules_nonconst(); diff --git a/src/feature_type_style.cpp b/src/feature_type_style.cpp index c35cd3a25..4abbba4a8 100644 --- a/src/feature_type_style.cpp +++ b/src/feature_type_style.cpp @@ -78,6 +78,17 @@ void swap( feature_type_style & lhs, feature_type_style & rhs) std::swap(lhs.image_filters_inflate_, rhs.image_filters_inflate_); } +bool feature_type_style::operator==(feature_type_style const& rhs) const +{ + return (rules_ == rhs.rules_) && + (filter_mode_ == rhs.filter_mode_) && + (filters_ == rhs.filters_) && + (direct_filters_ == rhs.direct_filters_) && + (comp_op_ == rhs.comp_op_) && + (opacity_ == rhs.opacity_) && + (image_filters_inflate_ == rhs.image_filters_inflate_); +} + void feature_type_style::add_rule(rule && rule) { rules_.push_back(std::move(rule));