17 access_str_ = access_str;
18 access_params_.clear();
24 return (access_params_ == other.access_params_);
34 auto param = access_params_.find(name);
35 if (param == access_params_.end()) {
39 value = param->second;
46 for (
auto db : other.db_infos_) {
56 for (
auto db : db_infos_) {
60 << access_str <<
" already exists");
64 db_infos_.push_back(new_db);
69 const std::string& param_value) {
70 for (ConfigDbInfoList::iterator db = db_infos_.begin();
71 db != db_infos_.end(); ++db) {
73 if (db->getParameterValue(param_name, db_value) &&
74 (param_value == db_value)) {
97 for (
auto db_info : db_infos_) {
98 db_list->add(db_info.toElement());
101 result->set(
"config-databases", db_list);
107 return (db_infos_ == other.db_infos_);
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
static isc::data::ElementPtr toElementDbAccessString(const std::string &dbaccess)
Unparse an access string.
static ParameterMap parse(const std::string &dbaccess)
Parse database access string.
Embodies configuration information used during a server's configuration process.
static const ConfigDbInfo & EMPTY_DB()
Fetches the not-found value returned by database list searches.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
ConfigControlInfo()
Constructor.
void addConfigDatabase(const std::string &access_str)
Sets configuration database access string.
bool equals(const ConfigControlInfo &other) const
Compares two objects for equality.
const ConfigDbInfo & findConfigDb(const std::string ¶m_name, const std::string ¶m_value)
Retrieves the datbase with the given access parameter value.
void clear()
Empties the contents of the class, including the database list.
Provides configuration information used during a server's configuration process.
void setAccessString(const std::string &access_str)
Set the access string.
bool equals(const ConfigDbInfo &other) const
Compares two objects for equality.
bool getParameterValue(const std::string &name, std::string &value) const
Fetch the value of a given parmeter.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.