40 #ifndef __OPENFLUID_CORE_TREE_HPP__
41 #define __OPENFLUID_CORE_TREE_HPP__
54 template<
typename K,
typename V>
61 typedef typename Children_t::iterator
iterator;
77 std::ostringstream oss;
79 if (!(oss << Key).fail())
212 auto it = m_Children.find(Key);
214 if (it == m_Children.end())
235 auto it = m_Children.find(Key);
237 if (it == m_Children.end())
259 auto it = m_Children.find(Key);
261 if (it == m_Children.end())
266 return (*it).second.getValue(DefaultVal);
280 return (m_Children.find(Key) != m_Children.end());
303 m_Children[Key].setValue(Val);
305 return m_Children[Key];
328 return m_Children[Key];
342 auto it = m_Children.find(Key);
344 if (it != m_Children.end())
346 m_Children.erase(it);
361 return m_Children.begin();
375 return m_Children.begin();
389 return m_Children.end();
403 return m_Children.end();
418 for (
auto& ChildNode : m_Children)
420 ChildNode.second.clear();
439 for (
auto& ChildNode : m_Children)
441 Size += ChildNode.second.size();
459 for (
auto& ChildNode : m_Children)
463 OutStm << std::setw(Indent);
466 OutStm <<
"[" << ChildNode.first;
467 if (ChildNode.second.hasValue())
469 OutStm <<
" -> " << ChildNode.second.getValue();
473 ChildNode.second.writeToStreamHierarchically(OutStm,Indent+4);
484 for (
auto& ChildNode : m_Children)
486 OutStm <<
"{" << ChildNode.first;
487 if (ChildNode.second.hasValue())
489 OutStm <<
"(" << ChildNode.second.getValue() <<
")";
491 ChildNode.second.writeToStreamFlat(OutStm);