lib/dbus/ReadIter: add API documentation

This commit is contained in:
Max Kellermann 2018-06-03 20:05:37 +02:00
parent 6c81fa1ec5
commit d4141bf7f1
1 changed files with 8 additions and 0 deletions

View File

@ -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<typename F>
void ForEach(int arg_type, F &&f) {
for (; GetArgType() == arg_type; Next())