Kea  1.5.0
isc::process::ConfigDbInfo Class Reference

Provides configuration information used during a server's configuration process. More...

#include <config_ctl_info.h>

+ Inheritance diagram for isc::process::ConfigDbInfo:

Public Member Functions

 ConfigDbInfo ()
 Constructor. More...
 
bool equals (const ConfigDbInfo &other) const
 Compares two objects for equality. More...
 
std::string getAccessString () const
 Retrieves the database access string. More...
 
const db::DatabaseConnection::ParameterMapgetParameters () const
 Retrieve the map of parameter values. More...
 
bool getParameterValue (const std::string &name, std::string &value) const
 Fetch the value of a given parmeter. More...
 
bool operator!= (const ConfigDbInfo &other) const
 Compares two objects for inequality. More...
 
bool operator== (const ConfigDbInfo &other) const
 Compares two objects for equality. More...
 
std::string redactedAccessString () const
 Retrieves the database access string with password redacted. More...
 
void setAccessString (const std::string &access_str)
 Set the access string. More...
 
virtual isc::data::ElementPtr toElement () const
 Unparse a configuration object. More...
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...
 

Detailed Description

Provides configuration information used during a server's configuration process.

Definition at line 23 of file config_ctl_info.h.

Constructor & Destructor Documentation

◆ ConfigDbInfo()

isc::process::ConfigDbInfo::ConfigDbInfo ( )
inline

Constructor.

Definition at line 26 of file config_ctl_info.h.

Member Function Documentation

◆ equals()

bool isc::process::ConfigDbInfo::equals ( const ConfigDbInfo other) const

Compares two objects for equality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are equal, false otherwise.

Definition at line 23 of file config_ctl_info.cc.

Referenced by operator!=(), and operator==().

◆ getAccessString()

std::string isc::process::ConfigDbInfo::getAccessString ( ) const
inline

Retrieves the database access string.

Returns
database access string

Definition at line 42 of file config_ctl_info.h.

◆ getParameters()

const db::DatabaseConnection::ParameterMap& isc::process::ConfigDbInfo::getParameters ( ) const
inline

Retrieve the map of parameter values.

Returns
Constant reference to the database's parameter map.

Definition at line 56 of file config_ctl_info.h.

◆ getParameterValue()

bool isc::process::ConfigDbInfo::getParameterValue ( const std::string &  name,
std::string &  value 
) const

Fetch the value of a given parmeter.

Parameters
namename of the parameter value to fetch
[out]valuestring which will contain the value of the parameter (if found).
Returns
Boolean true if the parameter named is found in the map, false otherwise.

Definition at line 33 of file config_ctl_info.cc.

◆ operator!=()

bool isc::process::ConfigDbInfo::operator!= ( const ConfigDbInfo other) const
inline

Compares two objects for inequality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are not equal, false otherwise.

Definition at line 97 of file config_ctl_info.h.

References equals().

+ Here is the call graph for this function:

◆ operator==()

bool isc::process::ConfigDbInfo::operator== ( const ConfigDbInfo other) const
inline

Compares two objects for equality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are equal, false otherwise.

Definition at line 88 of file config_ctl_info.h.

References equals().

+ Here is the call graph for this function:

◆ redactedAccessString()

std::string isc::process::ConfigDbInfo::redactedAccessString ( ) const
inline

Retrieves the database access string with password redacted.

Returns
database access string with password redacted

Definition at line 49 of file config_ctl_info.h.

References isc::db::DatabaseConnection::redactedAccessString().

+ Here is the call graph for this function:

◆ setAccessString()

void isc::process::ConfigDbInfo::setAccessString ( const std::string &  access_str)

Set the access string.

Sest the db's access string to the given value and then parses it into name-value pairs and storing them internally as a DatabaseConnection::ParameterMap. It discards the existing content of the map first. It does not validate the parameter names of values, ensuring the validity of the string content is placed upon the caller.

Parameters
access_strstring of name=value pairs seperated by spaces

Definition at line 16 of file config_ctl_info.cc.

References isc::db::DatabaseConnection::parse().

Referenced by isc::process::ConfigControlInfo::addConfigDatabase().

+ Here is the call graph for this function:

◆ toElement()

isc::data::ElementPtr isc::process::ConfigDbInfo::toElement ( ) const
virtual

Unparse a configuration object.

Returns
a pointer to unparsed configuration

Implements isc::data::CfgToElement.

Definition at line 28 of file config_ctl_info.cc.

References isc::db::DatabaseConnection::toElementDbAccessString().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: