libcamera: value_node: Add mutable adapters
The ValueNode class was initially designed to store read-only property trees. It is useful to also provide mutable access. Add non-const adapters and iterators and adapters. This allows obtaining a mutable ValueNode instance when traversing a tree. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
This commit is contained in:
@@ -337,6 +337,11 @@ template struct ValueNode::Accessor<std::vector<uint32_t>>;
|
||||
template struct ValueNode::Accessor<std::vector<std::string>>;
|
||||
#endif /* __DOXYGEN__ */
|
||||
|
||||
/**
|
||||
* \fn ValueNode::asDict()
|
||||
* \copydoc ValueNode::asDict() const
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn ValueNode::asDict() const
|
||||
* \brief Wrap a dictionary ValueNode in an adapter that exposes iterators
|
||||
@@ -357,6 +362,11 @@ template struct ValueNode::Accessor<std::vector<std::string>>;
|
||||
* \return An adapter of unspecified type compatible with range-based for loops
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn ValueNode::asList()
|
||||
* \copydoc ValueNode::asList() const
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn ValueNode::asList() const
|
||||
* \brief Wrap a list ValueNode in an adapter that exposes iterators
|
||||
|
||||
Reference in New Issue
Block a user