Packets: Add StringParser ostream operation
[senf.git] / Utils / Console / Config.cc
index 77d712a..f844f8a 100644 (file)
@@ -57,6 +57,12 @@ senf::console::detail::RestrictedExecutor::operator()(std::ostream & output,
     execute(output, command);
 }
 
+prefix_ senf::console::GenericNode &
+senf::console::detail::RestrictedExecutor::getNode(ParseCommandInfo const & command)
+{
+    return executor_.getNode(command);
+}
+
 prefix_ bool senf::console::detail::RestrictedExecutor::parsed(GenericNode & node)
     const
 {
@@ -120,9 +126,8 @@ prefix_ void senf::console::ConfigBundle::parse(DirectoryNode & restrict)
 
 prefix_ void senf::console::ConfigBundle::parseInternal()
 {
-    Sources::const_iterator i (sources_.begin());
-    Sources::const_iterator const i_end (sources_.end());
-    for (; i != i_end; ++i)
+    // It is valid to add additional sources at the end while parsing ...
+    for (Sources::const_iterator i (sources_.begin()); i != sources_.end(); ++i)
         (*i)->parse(executor_);
 }