26 #include <unordered_map> 33 #include "aossl/core/include/kv_store.h" 35 #ifndef AOSSL_PROPERTIES_INCLUDE_PROPERTIES_READER_H_ 36 #define AOSSL_PROPERTIES_INCLUDE_PROPERTIES_READER_H_ 41 std::string config_file;
49 std::ifstream file(file_path.c_str());
52 while (getline(file, line)) {
56 if (line.length() > 0) {
57 if (!(line[0] ==
'/' && line[1] ==
'/')) {
58 std::size_t eq_pos = line.find(
"=", 0);
59 if (eq_pos != std::string::npos) {
60 std::string var_name = line.substr(0, eq_pos);
61 std::string var_value = \
62 line.substr(eq_pos+1, line.length() - eq_pos);
79 #endif // AOSSL_PROPERTIES_INCLUDE_PROPERTIES_READER_H_ void load_config()
Re-load configuration.
Definition: properties_reader.h:74
Key Value Store.
Definition: kv_store.h:42
void set_opt(std::string &key, std::string &value)
Set an option.
Definition: kv_store.h:83
Definition: properties_reader.h:40