onConfigReloaded signal
This commit is contained in:
parent
bf4183c181
commit
b440870d9b
2 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,9 @@
|
|||
#include <boost/format.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/assign.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signal.hpp>
|
||||
|
||||
|
||||
#define CONFIG_STRING(PTR, KEY) (*PTR)[KEY].as<std::string>()
|
||||
#define CONFIG_INT(PTR, KEY) (*PTR)[KEY].as<int>()
|
||||
|
@ -45,6 +48,8 @@ class Config {
|
|||
const boost::program_options::variable_value &operator[] (const std::string &key) {
|
||||
return m_variables[key];
|
||||
}
|
||||
|
||||
boost::signal<void ()> onConfigReloaded;
|
||||
|
||||
private:
|
||||
Variables m_variables;
|
||||
|
|
|
@ -42,6 +42,8 @@ bool Config::load(const std::string &configfile, boost::program_options::options
|
|||
store(parse_config_file(ifs, opts), m_variables);
|
||||
notify(m_variables);
|
||||
|
||||
onConfigReloaded();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue