Kea 1.5.0
config_base.h
Go to the documentation of this file.
1// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef CONFIG_BASE_H
8#define CONFIG_BASE_H
9
10#include <cc/cfg_to_element.h>
11#include <cc/user_context.h>
14
15namespace isc {
16namespace process {
17
32public:
39
40
42 return (logging_info_);
43 }
44
48 void addLoggingInfo(const process::LoggingInfo& logging_info) {
49 logging_info_.push_back(logging_info);
50 }
51
53 void applyLoggingCfg() const;
54
58 bool equals(const ConfigBase& other) const;
59
77 virtual isc::data::ElementPtr toElement() const;
78
83 return (config_ctl_info_);
84 }
85
95 config_ctl_info) {
96 config_ctl_info_ = config_ctl_info;
97 }
98
99protected:
108 void copy(ConfigBase& new_config) const;
109
110private:
112 process::LoggingInfoStorage logging_info_;
113
115 process::ConfigControlInfoPtr config_ctl_info_;
116};
117
119typedef boost::shared_ptr<ConfigBase> ConfigPtr;
120
121};
122};
123
124#endif /* CONFIG_BASE_H */
Base class for all configurations.
Definition: config_base.h:31
void addLoggingInfo(const process::LoggingInfo &logging_info)
Sets logging specific configuration.
Definition: config_base.h:48
void applyLoggingCfg() const
Apply logging configuration to log4cplus.
Definition: config_base.cc:19
virtual isc::data::ElementPtr toElement() const
Converts to Element representation.
Definition: config_base.cc:86
process::ConstConfigControlInfoPtr getConfigControlInfo() const
Fetches a read-only copy of the configuration control information.
Definition: config_base.h:82
void setConfigControlInfo(const process::ConfigControlInfoPtr &config_ctl_info)
Set the configuration control information.
Definition: config_base.h:94
const process::LoggingInfoStorage & getLoggingInfo() const
Returns logging specific configuration.
Definition: config_base.h:41
void copy(ConfigBase &new_config) const
Copies the current configuration to a new configuration.
Definition: config_base.cc:69
bool equals(const ConfigBase &other) const
Compares two configuration.
Definition: config_base.cc:31
structure that describes one logging entry
Definition: logging_info.h:76
boost::shared_ptr< Element > ElementPtr
Definition: data.h:22
std::vector< isc::process::LoggingInfo > LoggingInfoStorage
storage for logging information in log4cplus format
Definition: logging_info.h:136
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the SrvConfig.
Definition: config_base.h:119
boost::shared_ptr< const ConfigControlInfo > ConstConfigControlInfoPtr
Defines a pointer to a const ConfigControlInfo.
boost::shared_ptr< ConfigControlInfo > ConfigControlInfoPtr
Defines a pointer to a ConfigControlInfo.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Abstract class for configuration Cfg_* classes.
Base class for user context.
Definition: user_context.h:22