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

Detailed Description

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

Definition at line 24 of file config_ctl_info.h.

Constructor & Destructor Documentation

◆ ConfigDbInfo()

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

Constructor.

Definition at line 27 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 26 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 45 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 59 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 parameter.

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 36 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 100 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 91 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 52 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,
bool test_mode = false )

Set the access string.

Sets 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 separated by spaces.
test_modeflag used in unittests only to skip parsing the access string and storing the parameters.

Definition at line 17 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 31 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: