BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
ConfigurationSaver.h
1 #pragma once
2 
3 #include <Poco/AutoPtr.h>
4 #include <Poco/Util/AbstractConfiguration.h>
5 
6 #include "util/Loggable.h"
7 
8 namespace BeeeOn {
9 
10 class ConfigurationSaver : protected Loggable {
11 public:
12  ConfigurationSaver(const std::string &filePath);
14 
15  Poco::AutoPtr<Poco::Util::AbstractConfiguration> config() const;
16 
22  void save() const;
23 
35  static void saveAs(
36  Poco::AutoPtr<Poco::Util::AbstractConfiguration> conf,
37  const std::string &filePath);
38 
39 private:
40  Poco::AutoPtr<Poco::Util::AbstractConfiguration> m_config;
41  std::string m_filePath;
42 };
43 
44 }
Definition: ConfigurationSaver.h:10
static void saveAs(Poco::AutoPtr< Poco::Util::AbstractConfiguration > conf, const std::string &filePath)
Definition: ConfigurationSaver.cpp:56
Definition: Loggable.h:19
void save() const
Definition: ConfigurationSaver.cpp:51