Lines Matching +full:- +full:- +full:with +full:- +full:config

4 // Redistribution and use in source and binary forms, with or without
12 // documentation and/or other materials provided with the distribution.
29 #include "engine/config.hpp"
32 # include "config.h"
39 #include "utils/config/exceptions.hpp"
40 #include "utils/config/parser.hpp"
41 #include "utils/config/tree.ipp"
46 namespace config = utils::config;
59 /// entry to prevent collisions with the keys defined in here.
61 init_tree(config::tree& tree) in init_tree()
63 tree.define< config::string_node >("architecture"); in init_tree()
64 tree.define< config::strings_set_node >("execenvs"); in init_tree()
65 tree.define< config::positive_int_node >("parallelism"); in init_tree()
66 tree.define< config::string_node >("platform"); in init_tree()
72 /// Fills in a configuration tree with default values.
77 set_defaults(config::tree& tree) in set_defaults()
79 tree.set< config::string_node >("architecture", KYUA_ARCHITECTURE); in set_defaults()
83 if (em->is_supported()) in set_defaults()
84 supported.insert(em->name()); in set_defaults()
86 tree.set< config::strings_set_node >("execenvs", supported); in set_defaults()
90 // the new parallel implementation as of 2015-02-27 though. in set_defaults()
91 tree.set< config::positive_int_node >("parallelism", 1); in set_defaults()
92 tree.set< config::string_node >("platform", KYUA_PLATFORM); in set_defaults()
97 class config_parser : public config::parser {
101 /// syntax() method. We populate the configuration tree from here with the
108 /// \throw config::syntax_error If the syntax_format/syntax_version
111 setup(config::tree& tree, const int syntax_version) in setup()
114 throw config::syntax_error(F("Unsupported config version %s") % in setup()
128 explicit config_parser(config::tree& tree_) : in config_parser()
129 config::parser(tree_) in config_parser()
140 /// \return A dynamically-allocated node.
141 config::detail::base_node*
145 new_node->_value = _value; in deep_copy()
171 config::typed_leaf_node< passwd::user >::set( in set_lua()
172 passwd::find_user_by_uid(state.to_integer(-1))); in set_lua()
174 config::typed_leaf_node< passwd::user >::set( in set_lua()
175 passwd::find_user_by_name(state.to_string(-1))); in set_lua()
177 throw config::value_error("Invalid user identifier"); in set_lua()
190 config::typed_leaf_node< passwd::user >::set( in set_string()
197 throw error(F("Cannot find user with name '%s'") % raw_value); in set_string()
201 config::typed_leaf_node< passwd::user >::set( in set_string()
204 throw error(F("Cannot find user with UID %s") % uid); in set_string()
218 return config::typed_leaf_node< passwd::user >::value().name; in to_string()
222 /// Constructs a config with the built-in settings.
225 config::tree
228 config::tree tree(false); in default_config()
235 /// Constructs a config with the built-in settings.
238 config::tree
241 config::tree tree(false); in empty_config()
244 // Tests of Kyua itself tend to use an empty config, i.e. default in empty_config()
248 tree.set< config::strings_set_node >("execenvs", supported); in empty_config()
258 /// \return High-level representation of the configuration file.
262 config::tree
265 config::tree tree(false); in load_config()
268 } catch (const config::error& e) { in load_config()