libcamera: value_node: Support adding nested children in one operation

The GlobalConfiguration class will need to add nested children to a
ValueNode. Add a new overload to the add() function for this purpose.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2025-10-28 17:56:44 +02:00
parent eafc366012
commit 719dbcdcde
2 changed files with 61 additions and 0 deletions
+3
View File
@@ -8,6 +8,7 @@
#pragma once
#include <initializer_list>
#include <iterator>
#include <map>
#include <memory>
@@ -239,6 +240,8 @@ public:
ValueNode *add(std::unique_ptr<ValueNode> &&child);
ValueNode *add(std::string key, std::unique_ptr<ValueNode> &&child);
ValueNode *add(std::initializer_list<std::string_view> path,
std::unique_ptr<ValueNode> &&child);
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(ValueNode)