src/util/configuration.cpp
/*
 * Parsing a string as it were a TOML file.
 */
Parsing a string as it were a TOML file.
Parsing a string as it were a TOML file .
void Configuration::loadFromString(const std::string &content) {
    try {
        std::istringstream stream(content);
        cpptoml::parser p(stream);
        auto config = p.parse();
        insertIntoMainTable(config);
    } catch(cpptoml::parse_exception& e){
        std::cerr << "Configuration: string load exception: " << e.what() << std::endl;
    }
}
void Configuration :: loadFromString ( const std :: string & content ) { try { std :: istringstream stream ( content ) ; cpptoml :: parser p ( stream ) ; auto config = p . parse ( ) ; insertIntoMainTable ( config ) ; } catch ( cpptoml :: parse_exception & e ) { std :: cerr << " " << e . what ( ) << std :: endl ; } }
Parsing a string as it were a TOML file.
Parsing a string as it were a TOML file .