/* * BaseConfiguration.h * * Created on: 26.11.2010 * Author: dennis */ #ifndef BASECONFIGURATION_H_ #define BASECONFIGURATION_H_ #include #include #include #include #include #include #include #include #include #include "../DataStructures/HashTable.h" class BaseConfiguration { public: BaseConfiguration(const char * configFile) { std::ifstream config( configFile ); if(!config) { std::cerr << "[config] .ini not found" << std::endl; return; } //parameters options.insert("*"); try { for (boost::program_options::detail::config_file_iterator i(config, options), e ; i != e; ++i) { std::cout << "[config] " << i->string_key << " = " << i->value[0] << std::endl; parameters.Add(i->string_key, i->value[0]); } } catch(std::exception& e) { std::cerr << "[config] .ini not found -> Exception: " < options; HashTable parameters; //Speichert alle Einträge aus INI Datei }; #endif /* BASECONFIGURATION_H_ */