![]() |
Kea
1.5.0
|
Base class for all configurations. More...
#include <config_base.h>
Inheritance diagram for isc::process::ConfigBase:Modifiers and accesors for the configuration objects. | |
| |
| const process::LoggingInfoStorage & | getLoggingInfo () const |
| Returns logging specific configuration. More... | |
| void | addLoggingInfo (const process::LoggingInfo &logging_info) |
| Sets logging specific configuration. More... | |
| void | applyLoggingCfg () const |
| Apply logging configuration to log4cplus. More... | |
| bool | equals (const ConfigBase &other) const |
| Compares two configuration. More... | |
| virtual isc::data::ElementPtr | toElement () const |
| Converts to Element representation. More... | |
| process::ConstConfigControlInfoPtr | getConfigControlInfo () const |
| Fetches a read-only copy of the configuration control information. More... | |
| void | setConfigControlInfo (const process::ConfigControlInfoPtr &config_ctl_info) |
| Set the configuration control information. More... | |
| void | copy (ConfigBase &new_config) const |
| Copies the current configuration to a new configuration. More... | |
Additional Inherited Members | |
Public Member Functions inherited from isc::data::UserContext | |
| void | contextToElement (data::ElementPtr map) const |
| Merge unparse a user_context object. More... | |
| data::ConstElementPtr | getContext () const |
| Returns const pointer to the user context. More... | |
| void | setContext (const data::ConstElementPtr &ctx) |
| Sets user context. More... | |
Public Member Functions inherited from isc::data::CfgToElement | |
| virtual | ~CfgToElement () |
| Destructor. More... | |
Static Public Member Functions inherited from isc::data::UserContext | |
| static data::ElementPtr | toElement (data::ConstElementPtr map) |
| Copy extracting comments an Element map. More... | |
Protected Attributes inherited from isc::data::UserContext | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL) More... | |
Base class for all configurations.
This is a common base class that represents configurations. SrvConfig, D2CfgContext, CtrlAgentCfgContext and possibly other classes holding configurations are derived from this.
It should contain only those elements that are applicable to really every daemon we may have. Before adding anything here, please consider whether it would be usable by all of the following: DHCP servers, DDNS update daemon, Control Agent, Netconf daemon, DHCP relay, DHCP client.
This class currently holds information about common server configuration.
Definition at line 31 of file config_base.h.
|
inline |
Sets logging specific configuration.
| logging_info | New logging configuration. |
Definition at line 48 of file config_base.h.
Referenced by copy().
| void isc::process::ConfigBase::applyLoggingCfg | ( | ) | const |
Apply logging configuration to log4cplus.
Definition at line 19 of file config_base.cc.
References isc::log::LoggerManager::process().
Here is the call graph for this function:
|
protected |
Copies the current configuration to a new configuration.
This method copies only the parameters defined in this class. Since derived classes are expected to provide their own copy methods, this one is protected and can be used only by descendant classes.
| new_config | this configuration will be copied to new_config |
Definition at line 69 of file config_base.cc.
References addLoggingInfo().
Here is the call graph for this function:| bool isc::process::ConfigBase::equals | ( | const ConfigBase & | other | ) | const |
Compares two configuration.
| other | the other configuration to compare to |
Definition at line 31 of file config_base.cc.
|
inline |
Fetches a read-only copy of the configuration control information.
Definition at line 82 of file config_base.h.
Referenced by isc::dhcp::SrvConfig::toElement().
|
inline |
Returns logging specific configuration.
Definition at line 41 of file config_base.h.
|
inline |
Set the configuration control information.
Updates the internal pointer to the configuration control information with the given pointer value. If the given pointer is empty, the internal pointer will be reset.
| config_ctl_info | pointer to the configuration value to store. |
Definition at line 94 of file config_base.h.
|
virtual |
Converts to Element representation.
This creates a Map element with the following content (expressed as JSON): {{{ { "Logging": { : } } }}}
Note that it will not contain the configuration control information (i.e. "config-control"), as this is not a top-level element, rather it belongs within the configured process element.
Implements isc::data::CfgToElement.
Reimplemented in isc::d2::DScalarContext, isc::dhcp::SrvConfig, isc::agent::CtrlAgentCfgContext, isc::d2::D2CfgContext, and isc::netconf::NetconfConfig.
Definition at line 86 of file config_base.cc.
References isc::asiodns::logger.