From: Marcin Siodelski Date: Tue, 5 Apr 2016 14:23:30 +0000 (+0200) Subject: [4301] HostReservationParser::isIdentifierParameter belongs to parent class. X-Git-Tag: trac4106_update_base~50^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c6c673464d5575f7847bb93345562fa8c29248a;p=thirdparty%2Fkea.git [4301] HostReservationParser::isIdentifierParameter belongs to parent class. --- diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc index 75ec0322d7..78dbf20409 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc @@ -169,6 +169,11 @@ HostReservationParser::addHost(isc::data::ConstElementPtr reservation_data) { } } +bool +HostReservationParser::isIdentifierParameter(const std::string& param_name) const { + return (getSupportedParameters(true).count(param_name) > 0); +} + bool HostReservationParser::isSupportedParameter(const std::string& param_name) const { return (getSupportedParameters(false).count(param_name) > 0); @@ -212,11 +217,6 @@ HostReservationParser4::build(isc::data::ConstElementPtr reservation_data) { addHost(reservation_data); } -bool -HostReservationParser4::isIdentifierParameter(const std::string& param_name) const { - return (getSupportedParams4(true).count(param_name) > 0); -} - const std::set& HostReservationParser4::getSupportedParameters(const bool identifiers_only) const { return (getSupportedParams4(identifiers_only)); @@ -312,11 +312,6 @@ HostReservationParser6::build(isc::data::ConstElementPtr reservation_data) { addHost(reservation_data); } -bool -HostReservationParser6::isIdentifierParameter(const std::string& param_name) const { - return (getSupportedParams6(true).count(param_name) > 0); -} - const std::set& HostReservationParser6::getSupportedParameters(const bool identifiers_only) const { return (getSupportedParams6(identifiers_only)); diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.h b/src/lib/dhcpsrv/parsers/host_reservation_parser.h index a440d15882..d6eaa2bb18 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.h +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.h @@ -54,7 +54,7 @@ protected: /// /// @return true if the parameter specifies host identifier, false /// otherwise. - virtual bool isIdentifierParameter(const std::string& param_name) const = 0; + virtual bool isIdentifierParameter(const std::string& param_name) const; /// @brief Checks if the specified parameter is supported by the parser. /// @@ -102,14 +102,6 @@ public: protected: - /// @brief Checks if the specified parameter is a host identifier. - /// - /// @param param_name Parameter name. - /// - /// @return true if the parameter specifies host identifier, false - /// otherwise. - virtual bool isIdentifierParameter(const std::string& param_name) const; - /// @brief Returns set of the supported parameters for DHCPv4. /// /// @param identifiers_only Indicates if the function should only @@ -142,14 +134,6 @@ public: protected: - /// @brief Checks if the specified parameter is a host identifier. - /// - /// @param param_name Parameter name. - /// - /// @return true if the parameter specifies host identifier, false - /// otherwise. - virtual bool isIdentifierParameter(const std::string& param_name) const; - /// @brief Returns set of the supported parameters for DHCPv6. /// /// @param identifiers_only Indicates if the function should only