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>
13 #include <process/logging_info.h>
14 
15 namespace isc {
16 namespace process {
17 
32 public:
39 
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 
99 protected:
108  void copy(ConfigBase& new_config) const;
109 
110 private:
112  process::LoggingInfoStorage logging_info_;
113 
115  process::ConfigControlInfoPtr config_ctl_info_;
116 };
117 
119 typedef boost::shared_ptr<ConfigBase> ConfigPtr;
120 
121 };
122 };
123 
124 #endif /* CONFIG_BASE_H */
isc::process::ConfigBase
Base class for all configurations.
Definition: config_base.h:31
isc::process::ConfigBase::getConfigControlInfo
process::ConstConfigControlInfoPtr getConfigControlInfo() const
Fetches a read-only copy of the configuration control information.
Definition: config_base.h:82
user_context.h
isc::process::ConfigBase::equals
bool equals(const ConfigBase &other) const
Compares two configuration.
Definition: config_base.cc:31
isc::data::CfgToElement
Abstract class for configuration Cfg_* classes.
Definition: cfg_to_element.h:29
isc::data::UserContext
Base class for user context.
Definition: user_context.h:22
isc::process::LoggingInfo
structure that describes one logging entry
Definition: logging_info.h:76
isc::process::ConfigBase::toElement
virtual isc::data::ElementPtr toElement() const
Converts to Element representation.
Definition: config_base.cc:86
isc::process::ConfigPtr
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the SrvConfig.
Definition: config_base.h:119
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::process::ConfigControlInfoPtr
boost::shared_ptr< ConfigControlInfo > ConfigControlInfoPtr
Defines a pointer to a ConfigControlInfo.
Definition: config_ctl_info.h:199
isc::process::ConstConfigControlInfoPtr
boost::shared_ptr< const ConfigControlInfo > ConstConfigControlInfoPtr
Defines a pointer to a const ConfigControlInfo.
Definition: config_ctl_info.h:201
config_ctl_info.h
isc::process::ConfigBase::addLoggingInfo
void addLoggingInfo(const process::LoggingInfo &logging_info)
Sets logging specific configuration.
Definition: config_base.h:48
cfg_to_element.h
isc::process::LoggingInfoStorage
std::vector< isc::process::LoggingInfo > LoggingInfoStorage
storage for logging information in log4cplus format
Definition: logging_info.h:136
isc::process::ConfigBase::copy
void copy(ConfigBase &new_config) const
Copies the current configuration to a new configuration.
Definition: config_base.cc:69
isc::process::ConfigBase::applyLoggingCfg
void applyLoggingCfg() const
Apply logging configuration to log4cplus.
Definition: config_base.cc:19
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
logging_info.h
isc::process::ConfigBase::getLoggingInfo
const process::LoggingInfoStorage & getLoggingInfo() const
Returns logging specific configuration.
Definition: config_base.h:41
isc::process::ConfigBase::setConfigControlInfo
void setConfigControlInfo(const process::ConfigControlInfoPtr &config_ctl_info)
Set the configuration control information.
Definition: config_base.h:94