this->config_sources.push_back( fcs );
}
-void Config::on_module_loaded() {}
-
-void Config::on_console_line_received( void *argument ) {}
-
-// Set a value in the config cache, but not in any config source
-void Config::set_string( string setting, string value )
+Config::Config(ConfigSource *cs)
{
- if(!is_config_cache_loaded()) return;
-
- ConfigValue *cv = new ConfigValue;
- cv->found = true;
- get_checksums(cv->check_sums, setting);
- cv->value = value;
-
- this->config_cache->replace_or_push_back(cv);
+ this->config_cache = NULL;
+ this->config_sources.push_back( cs );
+}
- THEKERNEL->call_event(ON_CONFIG_RELOAD);
+Config::~Config()
+{
+ config_cache_clear();
+ for(auto i : this->config_sources) {
+ delete i;
+ }
}
// Get a list of modules, used by module "pools" that look for the "enable" keyboard to find things like "moduletype.modulename.enable" as the marker of a new instance of a module