{"id":25750,"url":"https://patchwork.libcamera.org/api/1.1/patches/25750/?format=json","web_url":"https://patchwork.libcamera.org/patch/25750/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260113000808.15395-31-laurent.pinchart@ideasonboard.com>","date":"2026-01-13T00:08:02","name":"[30/36] libcamera: value_node: Support looking up nested children in one operation","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"2406f5d30bfece8180b3b81343127f8822ac7360","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25750/mbox/","series":[{"id":5703,"url":"https://patchwork.libcamera.org/api/1.1/series/5703/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5703","date":"2026-01-13T00:07:32","name":"libcamera: Global configuration file improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/5703/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25750/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25750/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 5610BC32AF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jan 2026 00:09:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2E4762013;\n\tTue, 13 Jan 2026 01:09:20 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC00561FF4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:09:18 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi\n\t[81.175.209.152])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 2FE73BCA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"N4h9ifE9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768262933;\n\tbh=swlUtzW82ngKAGHFFUN5/TSMXj/Bxv99B2kP9bfB6Bc=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=N4h9ifE9ssQ79ggYRQbWYozyLs/TB+ivjdEJuYaq3kAbvAJ18gSFOE2zsal1renRT\n\tqX75JYZTqD8rGFzayGAwiZJlJj/+gRgN5yjGGq+7c6eRvii/Jxk5Yd9kLTv2b0/DEH\n\t3i0C8W/2kg+kEwqVfeIWY0vUMJi3we/O0MQpwdWo=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH 30/36] libcamera: value_node: Support looking up nested\n\tchildren in one operation","Date":"Tue, 13 Jan 2026 02:08:02 +0200","Message-ID":"<20260113000808.15395-31-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>","References":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/value_node.h |  1 +\n src/libcamera/value_node.cpp            | 23 +++++++++++++++++++++++\n 2 files changed, 24 insertions(+)","diff":"diff --git a/include/libcamera/internal/value_node.h b/include/libcamera/internal/value_node.h\nindex abb0991fd87e..da72651d2161 100644\n--- a/include/libcamera/internal/value_node.h\n+++ b/include/libcamera/internal/value_node.h\n@@ -235,6 +235,7 @@ public:\n \tbool contains(std::string_view key) const;\n \tValueNode *at(std::string_view key);\n \tconst ValueNode &operator[](std::string_view key) const;\n+\tconst ValueNode &operator[](std::initializer_list<std::string_view> path) const;\n \n \tValueNode *add(std::unique_ptr<ValueNode> child);\n \tValueNode *add(std::string key, std::unique_ptr<ValueNode> child);\ndiff --git a/src/libcamera/value_node.cpp b/src/libcamera/value_node.cpp\nindex 1256adf8361d..55d5a1a29991 100644\n--- a/src/libcamera/value_node.cpp\n+++ b/src/libcamera/value_node.cpp\n@@ -487,6 +487,29 @@ const ValueNode &ValueNode::operator[](std::string_view key) const\n \treturn *iter->second;\n }\n \n+/**\n+ * \\brief Retrieve a descendant node by path\n+ * \\param[in] path The path\n+ *\n+ * This function retrieves a descendant of a ValueNode by following a \\a path.\n+ * The path is a list of keys that index nested dictionary nodes. If any node\n+ * along the path is not a Dictionary node, an empty node is returned.\n+ *\n+ * \\return The ValueNode corresponding to the \\a path\n+ */\n+const ValueNode &ValueNode::operator[](std::initializer_list<std::string_view> path) const\n+{\n+\tconst ValueNode *node = this;\n+\n+\tfor (const auto part : path) {\n+\t\tnode = &(*node)[part];\n+\t\tif (!*node)\n+\t\t\treturn empty;\n+\t}\n+\n+\treturn *node;\n+}\n+\n /**\n  * \\brief Add a child node to a list\n  * \\param[in] child The child node\n","prefixes":["30/36"]}