Lines Matching +full:key +full:- +full:release

73     node->_dynamic = _dynamic;  in copy_into()
76 base_node* new_node = (*iter).second->deep_copy(); in copy_into()
78 node->_children[(*iter).first] = new_node; in copy_into()
90 /// for invoking this twice so that the two key sets are combined if they happen
93 /// \param key Key to this node.
101 const tree_key& key, in combine_children_into() argument
109 if (node->_children.find(name) != node->_children.end()) { in combine_children_into()
117 new_node.reset((*iter1).second->deep_copy()); in combine_children_into()
119 tree_key child_key = key; in combine_children_into()
121 new_node.reset((*iter1).second->combine(child_key, in combine_children_into()
125 node->_children[name] = new_node.release(); in combine_children_into()
135 /// \param key Key to this node.
141 config::detail::inner_node::combine_into(const tree_key& key, in combine_into() argument
149 node->_dynamic = _dynamic || other._dynamic; in combine_into()
151 combine_children_into(key, _children, other._children, node); in combine_into()
152 combine_children_into(key, other._children, _children, node); in combine_into()
155 key, "'%s' is an inner node in the base tree but a leaf node in " in combine_into()
163 /// This recursive algorithm traverses the tree searching for a particular key.
168 /// \param key The key to be queried.
169 /// \param key_pos The current level within the key to be examined.
173 /// \throw unknown_key_error If the provided key is unknown.
175 config::detail::inner_node::lookup_ro(const tree_key& key, in lookup_ro() argument
178 PRE(key_pos < key.size()); in lookup_ro()
181 key[key_pos]); in lookup_ro()
183 throw unknown_key_error(key); in lookup_ro()
185 if (key_pos == key.size() - 1) { in lookup_ro()
188 PRE(key_pos < key.size() - 1); in lookup_ro()
192 return child.lookup_ro(key, key_pos + 1); in lookup_ro()
195 key, "Cannot address incomplete configuration property '%s'"); in lookup_ro()
203 /// This recursive algorithm traverses the tree searching for a particular key,
205 /// of dynamic inner nodes). The returned node is non-constant, so this can be
206 /// used by the algorithms that set key values.
208 /// \param key The key to be queried.
209 /// \param key_pos The current level within the key to be examined.
218 /// \throw unknown_key_error If the provided key is unknown.
220 config::detail::inner_node::lookup_rw(const tree_key& key, in lookup_rw() argument
224 PRE(key_pos < key.size()); in lookup_rw()
226 children_map::const_iterator child_iter = _children.find(key[key_pos]); in lookup_rw()
229 base_node* const child = (key_pos == key.size() - 1) ? in lookup_rw()
232 _children.insert(children_map::value_type(key[key_pos], child)); in lookup_rw()
233 child_iter = _children.find(key[key_pos]); in lookup_rw()
235 throw unknown_key_error(key); in lookup_rw()
239 if (key_pos == key.size() - 1) { in lookup_rw()
245 throw invalid_key_value(key, "Type mismatch"); in lookup_rw()
248 PRE(key_pos < key.size() - 1); in lookup_rw()
252 return child.lookup_rw(key, key_pos + 1, new_node); in lookup_rw()
255 key, "Cannot address incomplete configuration property '%s'"); in lookup_rw()
261 /// Converts the subtree to a collection of key/value string pairs.
265 /// \param key The path to the current node.
268 const tree_key& key) const in all_properties()
272 tree_key child_key = key; in all_properties()
295 /// \return A dynamically-allocated node.
301 return new_node.release(); in deep_copy()
307 /// \param key Key to this node.
314 config::detail::static_inner_node::combine(const tree_key& key, in combine() argument
318 combine_into(key, other, new_node.get()); in combine()
319 return new_node.release(); in combine()
323 /// Registers a key as valid and having a specific type.
326 /// tree-related issues. The reasons is that define() is a method that does not
327 /// depend on user input: it is intended to pre-populate the tree with a
330 /// \param key The key to be registered.
331 /// \param key_pos The current level within the key to be examined.
335 config::detail::static_inner_node::define(const tree_key& key, in define() argument
339 PRE(key_pos < key.size()); in define()
341 if (key_pos == key.size() - 1) { in define()
342 PRE_MSG(_children.find(key[key_pos]) == _children.end(), in define()
343 "Key already defined"); in define()
344 _children.insert(children_map::value_type(key[key_pos], new_node())); in define()
346 PRE(key_pos < key.size() - 1); in define()
348 key[key_pos]); in define()
352 _children.insert(children_map::value_type(key[key_pos], child_ptr)); in define()
353 child_ptr->define(key, key_pos + 1, new_node); in define()
358 child.define(key, key_pos + 1, new_node); in define()
376 /// \return A dynamically-allocated node.
382 return new_node.release(); in deep_copy()
388 /// \param key Key to this node.
395 config::detail::dynamic_inner_node::combine(const tree_key& key, in combine() argument
399 combine_into(key, other, new_node.get()); in combine()
400 return new_node.release(); in combine()
412 /// \param key Key to this node.
419 config::leaf_node::combine(const detail::tree_key& key, in combine() argument
432 key, "'%s' is a leaf node in the base tree but an inner node in " in combine()
440 /// \return A dynamically-allocated node.
445 new_node->_value = _value; in deep_copy()
446 return new_node.release(); in deep_copy()
479 /// \return A dynamically-allocated node.
484 new_node->_value = _value; in deep_copy()
485 return new_node.release(); in deep_copy()
531 /// \return A dynamically-allocated node.
536 new_node->_value = _value; in deep_copy()
537 return new_node.release(); in deep_copy()
570 /// \return A dynamically-allocated node.
575 new_node->_value = _value; in deep_copy()
576 return new_node.release(); in deep_copy()