refactors
[clinton/Smoothieware.git] / src / libs / Config.cpp
index b4e11b7..9036b34 100644 (file)
@@ -48,9 +48,19 @@ Config::Config()
         this->config_sources.push_back( fcs );
 }
 
-void Config::on_module_loaded() {}
+Config::Config(ConfigSource *cs)
+{
+    this->config_cache = NULL;
+    this->config_sources.push_back( cs );
+}
 
-void Config::on_console_line_received( void *argument ) {}
+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
 void Config::get_module_list(vector<uint16_t> *list, uint16_t family)