feature_type_style operator==

This commit is contained in:
artemp 2014-05-27 13:44:01 +01:00
parent 233b0c5332
commit c5e0c7e43f
2 changed files with 15 additions and 0 deletions

View file

@ -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();

View file

@ -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));