Home | History | Annotate | Download | only in config

Lines Matching defs:tree

35 #include "utils/config/tree.ipp"
43 /// Gets the tree singleton stored in the Lua state.
46 /// "tree" with a pointer to the singleton.
48 /// \return A reference to the tree associated with the Lua state.
50 /// \throw syntax_error If the tree cannot be located.
51 config::tree&
57 state.push_string("tree");
60 throw config::syntax_error("Cannot find tree singleton; global state "
62 config::tree& tree = **state.to_userdata< config::tree* >();
64 return tree;
68 /// Gets a fully-qualified tree key from the state.
73 /// considered to be the prefix of the tree key.
161 config::tree& tree = get_global_tree(state);
162 tree.set_lua(dotted_key, state, -1);
170 // key of the tree results in a call to __newindex instead of __index.
218 const config::tree& tree = get_global_tree(state);
220 if (tree.is_set(tree_key)) {
221 // Publish the pre-recorded value in the tree to the Lua state,
223 tree.push_lua(tree_key, state);
248 /// Install wrappers for globals to set values in the configuration tree.
255 /// \param out_tree The tree with the layout definition and where the
258 config::redirect(lutok::state& state, tree& out_tree)
275 state.push_string("tree");
276 config::tree** tree = state.new_userdata< config::tree* >();
277 *tree = &out_tree;