Remove some more useless methods and overloaded operators.
This commit is contained in:
parent
71ceaa517c
commit
d9f24ecd53
|
@ -349,7 +349,6 @@ namespace docpp {
|
|||
bool empty() const;
|
||||
|
||||
Property& operator=(const Property& property);
|
||||
Property& operator=(const std::pair<std::string, std::string>& property);
|
||||
bool operator==(const Property& property) const;
|
||||
bool operator!=(const Property& property) const;
|
||||
|
||||
|
@ -1189,11 +1188,6 @@ namespace docpp {
|
|||
* @param value The value of the property
|
||||
*/
|
||||
Property(const std::string& key, const std::string& value) : property(std::make_pair(key, value)) {};
|
||||
/**
|
||||
* @brief Construct a new Property object
|
||||
* @param property The property to set
|
||||
*/
|
||||
explicit Property(const std::pair<std::string, std::string>& property) : property(property) {};
|
||||
/**
|
||||
* @brief Construct a new Property object
|
||||
*/
|
||||
|
@ -1262,11 +1256,6 @@ namespace docpp {
|
|||
* @param value The value.
|
||||
*/
|
||||
void set_value(const std::string& value);
|
||||
/**
|
||||
* @brief Set the property
|
||||
* @param property The property.
|
||||
*/
|
||||
void set(const std::pair<std::string, std::string>& property);
|
||||
/**
|
||||
* @brief Set the property
|
||||
* @param key The key of the property
|
||||
|
@ -1275,7 +1264,6 @@ namespace docpp {
|
|||
void set(const std::string& key, const std::string& value);
|
||||
|
||||
Property& operator=(const Property& property);
|
||||
Property& operator=(const std::pair<std::string, std::string>& property);
|
||||
bool operator==(const Property& property) const;
|
||||
bool operator!=(const Property& property) const;
|
||||
};
|
||||
|
|
|
@ -39,11 +39,6 @@ docpp::HTML::Property& docpp::HTML::Property::operator=(const docpp::HTML::Prope
|
|||
return *this;
|
||||
}
|
||||
|
||||
docpp::HTML::Property& docpp::HTML::Property::operator=(const std::pair<std::string, std::string>& property) {
|
||||
this->set(property);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool docpp::HTML::Property::operator==(const docpp::HTML::Property& property) const {
|
||||
return this->property == property.get();
|
||||
}
|
||||
|
@ -1012,21 +1007,12 @@ void docpp::CSS::Property::set_value(const std::string& value) {
|
|||
this->property.second = value;
|
||||
}
|
||||
|
||||
void docpp::CSS::Property::set(const std::pair<std::string, std::string>& property) {
|
||||
this->property = property;
|
||||
}
|
||||
|
||||
void docpp::CSS::Property::set(const std::string& key, const std::string& value) {
|
||||
this->property = std::make_pair(key, value);
|
||||
}
|
||||
|
||||
docpp::CSS::Property& docpp::CSS::Property::operator=(const docpp::CSS::Property& property) {
|
||||
this->set(property.get());
|
||||
return *this;
|
||||
}
|
||||
|
||||
docpp::CSS::Property& docpp::CSS::Property::operator=(const std::pair<std::string, std::string>& property) {
|
||||
this->set(property);
|
||||
this->set(property.get().first, property.get().second);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue