Changeset - b440870d9b2a
[Not reviewed]
0 2 0
HanzZ - 15 years ago 2011-02-13 22:52:46
hanzz.k@gmail.com
onConfigReloaded signal
2 files changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
include/transport/config.h
Show inline comments
 
@@ -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;
src/config.cpp
Show inline comments
 
@@ -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;
 
}
 

	
0 comments (0 inline, 0 general)