From d4141bf7f1a3ad2ddb718e85d585dd8dc87ab5cd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 3 Jun 2018 20:05:37 +0200 Subject: [PATCH] lib/dbus/ReadIter: add API documentation --- src/lib/dbus/ReadIter.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/dbus/ReadIter.hxx b/src/lib/dbus/ReadIter.hxx index 305f2de03..d51dd371c 100644 --- a/src/lib/dbus/ReadIter.hxx +++ b/src/lib/dbus/ReadIter.hxx @@ -74,10 +74,18 @@ public: return value; } + /** + * Create a new iterator which recurses into a container + * value. + */ ReadMessageIter Recurse() noexcept { return {RecurseTag(), *this}; } + /** + * Invoke a function for each element (including the current + * one), as long as the argument type is the specified one. + */ template void ForEach(int arg_type, F &&f) { for (; GetArgType() == arg_type; Next())