uint16_t dhcp4o6_port = getUint16(global, "dhcp4o6-port");
cfg->setDhcp4o6Port(dhcp4o6_port);
}
-
-private:
-
- /// @brief Returns a value converted to uint32_t
- ///
- /// Instantiation of getIntType() to uint32_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return an uint32_t value
- uint32_t getUint32(isc::data::ConstElementPtr scope,
- const std::string& name) {
- return (getIntType<uint32_t>(scope, name));
- }
-
- /// @brief Returns a value converted to uint16_t
- ///
- /// Instantiation of getIntType() to uint16_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return an uint16_t value
- uint16_t getUint16(isc::data::ConstElementPtr scope,
- const std::string& name) {
- return (getIntType<uint16_t>(scope, name));
- }
};
} // anonymous namespace
private:
- /// @brief Get an uint8_t value
- ///
- /// Instantiation of getIntType() to uint8_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return uint8_t value
- /// @throw isc::dhcp::DhcpConfigError when it is not an uint8_t
- uint8_t getUint8(ConstElementPtr scope, const std::string& name) {
- return (getIntType<uint8_t>(scope, name));
- }
-
/// Pointer to the created pool object.
isc::dhcp::Pool6Ptr pool_;
uint16_t dhcp4o6_port = getUint16(global, "dhcp4o6-port");
srv_config->setDhcp4o6Port(dhcp4o6_port);
}
-
-private:
-
- /// @brief Returns a value converted to uint32_t
- ///
- /// Instantiation of getIntType() to uint32_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return an uint32_t value
- uint32_t getUint32(isc::data::ConstElementPtr scope,
- const std::string& name) {
- return (getIntType<uint32_t>(scope, name));
- }
-
- /// @brief Returns a value converted to uint16_t
- ///
- /// Instantiation of getIntType() to uint16_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return an uint16_t value
- uint16_t getUint16(isc::data::ConstElementPtr scope,
- const std::string& name) {
- return (getIntType<uint16_t>(scope, name));
- }
};
} // anonymous namespace
<< "' (" << getPosition(name, scope) << ")");
}
}
+
+ /// @brief Returns a value converted to uint32_t
+ ///
+ /// Instantiation of getIntType() to uint32_t
+ ///
+ /// @param scope specified parameter will be extracted from this scope
+ /// @param name name of the parameter
+ /// @return an uint32_t value
+ /// @throw isc::dhcp::DhcpConfigError when it is not an uint32_t
+ uint32_t getUint32(isc::data::ConstElementPtr scope,
+ const std::string& name) {
+ return (getIntType<uint32_t>(scope, name));
+ }
+
+ /// @brief Returns a value converted to uint16_t
+ ///
+ /// Instantiation of getIntType() to uint16_t
+ ///
+ /// @param scope specified parameter will be extracted from this scope
+ /// @param name name of the parameter
+ /// @return an uint16_t value
+ /// @throw isc::dhcp::DhcpConfigError when it is not an uint16_t
+ uint16_t getUint16(isc::data::ConstElementPtr scope,
+ const std::string& name) {
+ return (getIntType<uint16_t>(scope, name));
+ }
+
+ /// @brief Get an uint8_t value
+ ///
+ /// Instantiation of getIntType() to uint8_t
+ ///
+ /// @param scope specified parameter will be extracted from this scope
+ /// @param name name of the parameter
+ /// @return uint8_t value
+ /// @throw isc::dhcp::DhcpConfigError when it is not an uint8_t
+ uint8_t getUint8(ConstElementPtr scope, const std::string& name) {
+ return (getIntType<uint8_t>(scope, name));
+ }
};
};
class SimpleParserClassTest : public SimpleParser {
public:
- /// @brief Instantiation of getIntType for uint8_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter for error report
- /// @return an uint8_t value
- uint8_t getUint8(ConstElementPtr scope, const std::string& name) {
- return (getIntType<uint8_t>(scope, name));
- }
+
+ /// Make getUint8 public
+ using SimpleParser::getUint8;
/// @brief Instantiation of getAndConvert
///
//**************************** D2ClientConfigParser **********************
-uint32_t
-D2ClientConfigParser::getUint32(ConstElementPtr scope,
- const std::string& name) {
- return (getIntType<uint32_t>(scope, name));
-}
-
// Can't use a constructor as a function
namespace {
IOAddress buildIOAddress(const std::string& str) { return (IOAddress(str)); }
private:
- /// @brief Returns a value converted to uint32_t
- ///
- /// Instantiation of getIntType() to uint32_t
- ///
- /// @param scope specified parameter will be extracted from this scope
- /// @param name name of the parameter
- /// @return an uint32_t value
- uint32_t
- getUint32(isc::data::ConstElementPtr scope, const std::string& name);
-
/// @brief Returns a value converted to IOAddress
///
/// Instantiation of getAndConvert() to IOAddress