{"id":25730,"url":"https://patchwork.libcamera.org/api/1.1/patches/25730/?format=json","web_url":"https://patchwork.libcamera.org/patch/25730/","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-11-laurent.pinchart@ideasonboard.com>","date":"2026-01-13T00:07:42","name":"[10/36] libcamera: yaml_parser: Rename Getter to Accessor","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"944602aae546129b782c6d917e20c3d3eef11731","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/25730/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/25730/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25730/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 004C4BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jan 2026 00:08:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8EE9061FD9;\n\tTue, 13 Jan 2026 01:08:46 +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 D001061FD1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:44 +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 275DF50A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:19 +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=\"BwYVPv/c\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768262899;\n\tbh=dcgyHiAYwxc6UdyxdPeoYi9mEglAy8imsqnuuKRslNc=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=BwYVPv/ckMcCjkGfDmO37kd3L0HqHIikQPYsT0s3al5PoLTCBegvN5G4B9EgZCm34\n\tE/Y32ZQdAHlFAOHV3kb9/C3fOT25J/cWx6fuyuFgucxXOgHX0iEvXR3LGVEexW2bXU\n\t/9u71oqPpijqEvz55k6XFWG2hRdhgx6ha6LGwwwg=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH 10/36] libcamera: yaml_parser: Rename Getter to Accessor","Date":"Tue, 13 Jan 2026 02:07:42 +0200","Message-ID":"<20260113000808.15395-11-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":"In preparation for support to set the value of a YamlObject, rename the\nGetter structure to Accessor. The structure will be extended with a\nset() function.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/matrix.h      |  2 +-\n include/libcamera/internal/vector.h      |  2 +-\n include/libcamera/internal/yaml_parser.h |  6 +++---\n src/ipa/libipa/lsc_polynomial.h          |  2 +-\n src/ipa/libipa/pwl.cpp                   |  2 +-\n src/libcamera/yaml_parser.cpp            | 24 ++++++++++++------------\n 6 files changed, 19 insertions(+), 19 deletions(-)","diff":"diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h\nindex 1842389f2b22..67761cb6037d 100644\n--- a/include/libcamera/internal/matrix.h\n+++ b/include/libcamera/internal/matrix.h\n@@ -200,7 +200,7 @@ std::ostream &operator<<(std::ostream &out, const Matrix<T, Rows, Cols> &m)\n }\n \n template<typename T, unsigned int Rows, unsigned int Cols>\n-struct YamlObject::Getter<Matrix<T, Rows, Cols>> {\n+struct YamlObject::Accessor<Matrix<T, Rows, Cols>> {\n \tstd::optional<Matrix<T, Rows, Cols>> get(const YamlObject &obj) const\n \t{\n \t\tif (!matrixValidateYaml(obj, Rows * Cols))\ndiff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h\nindex 16b6aef0b38f..cfd8882ce0e6 100644\n--- a/include/libcamera/internal/vector.h\n+++ b/include/libcamera/internal/vector.h\n@@ -347,7 +347,7 @@ std::ostream &operator<<(std::ostream &out, const Vector<T, Rows> &v)\n }\n \n template<typename T, unsigned int Rows>\n-struct YamlObject::Getter<Vector<T, Rows>> {\n+struct YamlObject::Accessor<Vector<T, Rows>> {\n \tstd::optional<Vector<T, Rows>> get(const YamlObject &obj) const\n \t{\n \t\tif (!vectorValidateYaml(obj, Rows))\ndiff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h\nindex 03d6a05e2d0f..0ff026706682 100644\n--- a/include/libcamera/internal/yaml_parser.h\n+++ b/include/libcamera/internal/yaml_parser.h\n@@ -173,7 +173,7 @@ public:\n \ttemplate<typename T>\n \tstd::optional<T> get() const\n \t{\n-\t\treturn Getter<T>{}.get(*this);\n+\t\treturn Accessor<T>{}.get(*this);\n \t}\n \n \ttemplate<typename T, typename U>\n@@ -213,7 +213,7 @@ private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(YamlObject)\n \n \ttemplate<typename T>\n-\tfriend struct Getter;\n+\tfriend struct Accessor;\n \tfriend class YamlParserContext;\n \n \tenum class Type {\n@@ -224,7 +224,7 @@ private:\n \t};\n \n \ttemplate<typename T, typename Enable = void>\n-\tstruct Getter {\n+\tstruct Accessor {\n \t\tstd::optional<T> get(const YamlObject &obj) const;\n \t};\n \ndiff --git a/src/ipa/libipa/lsc_polynomial.h b/src/ipa/libipa/lsc_polynomial.h\nindex c898faeb13db..df3a0d4b39c4 100644\n--- a/src/ipa/libipa/lsc_polynomial.h\n+++ b/src/ipa/libipa/lsc_polynomial.h\n@@ -81,7 +81,7 @@ private:\n #ifndef __DOXYGEN__\n \n template<>\n-struct YamlObject::Getter<ipa::LscPolynomial> {\n+struct YamlObject::Accessor<ipa::LscPolynomial> {\n \tstd::optional<ipa::LscPolynomial> get(const YamlObject &obj) const\n \t{\n \t\tstd::optional<double> cx = obj[\"cx\"].get<double>();\ndiff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\nindex 72b63c4d068d..f38573e69c13 100644\n--- a/src/ipa/libipa/pwl.cpp\n+++ b/src/ipa/libipa/pwl.cpp\n@@ -435,7 +435,7 @@ std::string Pwl::toString() const\n  */\n template<>\n std::optional<ipa::Pwl>\n-YamlObject::Getter<ipa::Pwl>::get(const YamlObject &obj) const\n+YamlObject::Accessor<ipa::Pwl>::get(const YamlObject &obj) const\n {\n \t/* Treat a single value as single point PWL. */\n \tif (obj.isValue()) {\ndiff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp\nindex 72580e901ddd..a21e589fdd86 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -134,7 +134,7 @@ std::size_t YamlObject::size() const\n \n template<>\n std::optional<bool>\n-YamlObject::Getter<bool>::get(const YamlObject &obj) const\n+YamlObject::Accessor<bool>::get(const YamlObject &obj) const\n {\n \tif (obj.type_ != Type::Value)\n \t\treturn std::nullopt;\n@@ -148,7 +148,7 @@ YamlObject::Getter<bool>::get(const YamlObject &obj) const\n }\n \n template<typename T>\n-struct YamlObject::Getter<T, std::enable_if_t<\n+struct YamlObject::Accessor<T, std::enable_if_t<\n \tstd::is_same_v<int8_t, T> ||\n \tstd::is_same_v<uint8_t, T> ||\n \tstd::is_same_v<int16_t, T> ||\n@@ -173,23 +173,23 @@ struct YamlObject::Getter<T, std::enable_if_t<\n \t}\n };\n \n-template struct YamlObject::Getter<int8_t>;\n-template struct YamlObject::Getter<uint8_t>;\n-template struct YamlObject::Getter<int16_t>;\n-template struct YamlObject::Getter<uint16_t>;\n-template struct YamlObject::Getter<int32_t>;\n-template struct YamlObject::Getter<uint32_t>;\n+template struct YamlObject::Accessor<int8_t>;\n+template struct YamlObject::Accessor<uint8_t>;\n+template struct YamlObject::Accessor<int16_t>;\n+template struct YamlObject::Accessor<uint16_t>;\n+template struct YamlObject::Accessor<int32_t>;\n+template struct YamlObject::Accessor<uint32_t>;\n \n template<>\n std::optional<float>\n-YamlObject::Getter<float>::get(const YamlObject &obj) const\n+YamlObject::Accessor<float>::get(const YamlObject &obj) const\n {\n \treturn obj.get<double>();\n }\n \n template<>\n std::optional<double>\n-YamlObject::Getter<double>::get(const YamlObject &obj) const\n+YamlObject::Accessor<double>::get(const YamlObject &obj) const\n {\n \tif (obj.type_ != Type::Value)\n \t\treturn std::nullopt;\n@@ -210,7 +210,7 @@ YamlObject::Getter<double>::get(const YamlObject &obj) const\n \n template<>\n std::optional<std::string>\n-YamlObject::Getter<std::string>::get(const YamlObject &obj) const\n+YamlObject::Accessor<std::string>::get(const YamlObject &obj) const\n {\n \tif (obj.type_ != Type::Value)\n \t\treturn std::nullopt;\n@@ -220,7 +220,7 @@ YamlObject::Getter<std::string>::get(const YamlObject &obj) const\n \n template<>\n std::optional<Size>\n-YamlObject::Getter<Size>::get(const YamlObject &obj) const\n+YamlObject::Accessor<Size>::get(const YamlObject &obj) const\n {\n \tif (obj.type_ != Type::List)\n \t\treturn std::nullopt;\n","prefixes":["10/36"]}