From patchwork Tue Jul 19 21:02:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16693 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D4EBFBD1F1 for ; Tue, 19 Jul 2022 21:03:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F8A963315; Tue, 19 Jul 2022 23:03:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658264616; bh=8xIqQM5tBMEKVoJyB+lQ5aFpa0WhHh0Gy4HlsKsFCh4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=PZ1uIgHYh+UARGU4iWJs4oEyAAqPfG7xdQbOE0ufnbiEAzwh3+OjCM4bI0WfdRV7s RWb3uJuEu1BNouZ3O6A+TRiCANDz7aFlI3iN+o4J7Lgjsp221gLWptspTXVwf3IQcK m3atNREdU2xqvHjLJfIlZGOmRrVtljfBK2soHpo7zOmAjvEXNMvj820o/ahBgkmI+0 bbHqy7ZNPgQvS329nsK+PQGNGEcfu1QS8UOUdjNRU6UuI7L9KPqelsyULJ1CBSVSCf 9EQlUE2TZotdJkA712Kx8e/YG5kMVDkjEWvD3HZda83k9C+bIzUsdRiMHkAAl0YKhX p86Dg13HkRBbA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 360C3603F4 for ; Tue, 19 Jul 2022 23:03:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="f1BlCl6s"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B4D866EE; Tue, 19 Jul 2022 23:03:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658264614; bh=8xIqQM5tBMEKVoJyB+lQ5aFpa0WhHh0Gy4HlsKsFCh4=; h=From:To:Cc:Subject:Date:From; b=f1BlCl6sm1FuSDB39oa/z9T8W8byV1TNUXo/WTuzM7oRWim5/Xh5Ae9kfTlZG8gNP ZPcynXSHu3+oaxiKxiTMrxUiaDXhuL8qnppPB+f30kzDBKKl3eb6oxT0bW8LwgtNOR n+OAt/kZjAlXU8PRP83IO49LbEvZ8UCL4Z3T78Ls= To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 00:02:57 +0300 Message-Id: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] licamera: controls: Drop unnecessary template qualifiers in documentation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The doxygen document blocks of various ControlList function qualify functions with full template and return type specification. This isn't needed, and the extra verbosity makes the documentation blocks more difficult to read. Drop the template qualifiers and return types. The generated documentation is not affected. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain --- src/libcamera/controls.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) base-commit: 62e32042aee4042b6a931bc27a6ad11384b521f5 diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 03ac6345247c..3fd535f204b2 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -954,7 +954,7 @@ bool ControlList::contains(unsigned int id) const } /** - * \fn template T ControlList::get(const Control &ctrl) const + * \fn ControlList::get(const Control &ctrl) const * \brief Get the value of control \a ctrl * \param[in] ctrl The control * @@ -969,7 +969,7 @@ bool ControlList::contains(unsigned int id) const */ /** - * \fn template void ControlList::set(const Control &ctrl, const V &value) + * \fn ControlList::set(const Control &ctrl, const V &value) * \brief Set the control \a ctrl value to \a value * \param[in] ctrl The control * \param[in] value The control value @@ -983,8 +983,7 @@ bool ControlList::contains(unsigned int id) const */ /** - * \fn template \ - * void ControlList::set(const Control &ctrl, const std::initializer_list &value) + * \fn ControlList::set(const Control &ctrl, const std::initializer_list &value) * \copydoc ControlList::set(const Control &ctrl, const V &value) */ From patchwork Tue Jul 19 21:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16694 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 85533C3274 for ; Tue, 19 Jul 2022 21:03:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3DBA963312; Tue, 19 Jul 2022 23:03:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658264617; bh=u5SY/OnBxRRhzFtdPPAPoIOJg06p67BHMAmDkreXsfQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DIwTsF8SBTNqjJ6WfH2wCT8CuogxbxOXRBE6FjcivXXZ9DAJCYh4Brh+4A6MuJIqt qwvhC0yhI7p9hQlaQ4w0/Wb0wZ9anPN+G7eb6Eqnu93vEhwpPKCUVlooOYzrWYLbFr 2VUCUe6W72ydfTB/COkd8V0bKeymEa7GL4w5SLQp+lCDiG2yOl0u7ZgRrRncp5vyd0 MsNAbcYCu1ottDxpooRPl1f9AujCpMRA8mduelM1eoS2bnEVM+Rec64YVNq7Rq4mTL 5jLTQfM1gmBKB3MpY92W9ZvyvhBVZWFYwEsefwV4IwfHWibgbd0IN2bRSYCYOAPY7N brxo9cnSX/pOg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 945AE603F4 for ; Tue, 19 Jul 2022 23:03:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZHEQ6F64"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 24C66896; Tue, 19 Jul 2022 23:03:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658264615; bh=u5SY/OnBxRRhzFtdPPAPoIOJg06p67BHMAmDkreXsfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZHEQ6F64xjqssLQUn6cd6FhJBuzgIG/u+fhgK+qZDHsWL641feyJALa4M6zZ/Vp8V bOBeG3w860iHv0z98jEvbI0yQ3HOqtSsZ+vhhbYT5qOcPEUBDYHXFRJaLoft7hvc4B 4AU0BcWoCouMF5ucl1d76zVXGB840r4tSJWZwPLM= To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 00:02:58 +0300 Message-Id: <20220719210258.5602-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> References: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] licamera: controls: Update ControlList::get() documentation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The ControlList::get(const Control &ctrl) function has been modified in commit 1c4d48018505 ("libcamera: controls: Use std::optional to handle invalid control values") to return an std::optional<>, but its documentation wasn't updated. Fix it. Fixes: 1c4d48018505 ("libcamera: controls: Use std::optional to handle invalid control values") Signed-off-by: Laurent Pinchart --- src/libcamera/controls.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 3fd535f204b2..20c27e65e725 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -958,14 +958,8 @@ bool ControlList::contains(unsigned int id) const * \brief Get the value of control \a ctrl * \param[in] ctrl The control * - * The behaviour is undefined if the control \a ctrl is not present in the - * list. Use ControlList::contains() to test for the presence of a control in - * the list before retrieving its value. - * - * The control value type shall match the type T, otherwise the behaviour is - * undefined. - * - * \return The control value + * \return A std::optional containing the control value, or std::nullopt if + * the control \a ctrl is not present in the list */ /** From patchwork Tue Jul 19 21:33:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16695 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C48B8BE173 for ; Tue, 19 Jul 2022 21:33:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DC27463315; Tue, 19 Jul 2022 23:33:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658266433; bh=DVoD73zdvZrY7noMQ4ePjUlWxuFH19HP45H8FN07T1c=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=xWv8/ziKzbjv4pfzLcr7XxEB9JCUX4JtJFixuVVMfykSrffetDLQKkK9yqYLxHz+i 6aLdHN4hKu0wiA+KtqURpIYUfI/TiSdalr27LRfhOEG/Jciyq5ETUGrlX1y+yAt8BZ KkDcZEdjMXud11nVwQCpGLxRCEyRhaIqamzx9LHPccTsvKsUdjbhjZJMMCLRmA3yWM ThoxHwSyTXQ854kt99bXBCunMyh7Dbb9f6v7FzQzk7Qg5WSe+tDcxNv+/Z8BYh6kAT lheII3gA5TBKe/doxFk9uD87El5M4/zXhV/faFGvWcMT8r0zfELDCa/JUi6NwQru9h zOr6DXOHrpWgA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6713C603F4 for ; Tue, 19 Jul 2022 23:33:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L2STuPsd"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C715E6EE; Tue, 19 Jul 2022 23:33:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658266432; bh=DVoD73zdvZrY7noMQ4ePjUlWxuFH19HP45H8FN07T1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2STuPsdQjosOzyxjuUArnvv38+EeM/QvYKy7gsL2cY45mxp9OKIxL0nv/MD8u9IT Mm02gD18zgPOZHAOGLRFWvKXx+SH+pI77LMAqIQZGjvIRzqLMCP+bLAs74O9yALmgh 9j/4NAf/rdiiTcYGA/AmvDqQ+MWh5ib1v+QANet8= To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 00:33:13 +0300 Message-Id: <20220719213314.11717-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> References: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/2] test: control_list: Use get() to test for control presence X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Now that the ControlList::get() function returns an std::optional<>, it is the preferred way to test if a control is present in a ControlList. Use it in the test to prepare for removal of ControlList::contains(). Signed-off-by: Laurent Pinchart --- test/controls/control_list.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp index 70cf61b85cbc..c03f230e0a12 100644 --- a/test/controls/control_list.cpp +++ b/test/controls/control_list.cpp @@ -50,7 +50,7 @@ protected: return TestFail; } - if (list.contains(controls::Brightness)) { + if (list.get(controls::Brightness)) { cout << "List should not contain Brightness control" << endl; return TestFail; } @@ -80,7 +80,7 @@ protected: return TestFail; } - if (!list.contains(controls::Brightness)) { + if (!list.get(controls::Brightness)) { cout << "List should contain Brightness control" << endl; return TestFail; } @@ -99,7 +99,7 @@ protected: return TestFail; } - if (list.contains(controls::Contrast)) { + if (list.get(controls::Contrast)) { cout << "List should not contain Contract control" << endl; return TestFail; } @@ -108,8 +108,8 @@ protected: list.set(controls::Brightness, 0.0f); list.set(controls::Contrast, 1.5f); - if (!list.contains(controls::Brightness) || - !list.contains(controls::Contrast)) { + if (!list.get(controls::Brightness) || + !list.get(controls::Contrast)) { cout << "List should contain Brightness and Contrast controls" << endl; return TestFail; @@ -145,7 +145,7 @@ protected: */ list.set(controls::AwbEnable, true); - if (list.contains(controls::AwbEnable)) { + if (list.get(controls::AwbEnable)) { cout << "List shouldn't contain AwbEnable control" << endl; return TestFail; } @@ -171,9 +171,9 @@ protected: return TestFail; } - if (!mergeList.contains(controls::Brightness) || - !mergeList.contains(controls::Contrast) || - !mergeList.contains(controls::Saturation)) { + if (!mergeList.get(controls::Brightness) || + !mergeList.get(controls::Contrast) || + !mergeList.get(controls::Saturation)) { cout << "Merged list does not contain all controls" << endl; return TestFail; } From patchwork Tue Jul 19 21:33:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16696 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CD32FBE173 for ; Tue, 19 Jul 2022 21:33:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 049E363312; Tue, 19 Jul 2022 23:33:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658266435; bh=d7N6GiwgiM2ATu82McMNeRHJeJNGhk3rw/CPJAFEId8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=iGHLKOShMzl85MT8wPZ7XRYXxjNifKz4JpPB/nqNh9MNVyUUk2ZRVF+JCD/7465KY gZ+xBC5caq6HoTXN96RmQTNK0om9YnkcVxQSJnm3mdqJYhLfG+4mOniPAVTDHdjUZm ZTLu3l482wv1o5M+w4GawBaDu518fd3MZEZ+9hZOBbdJW+j2MiJYbfgkDiSbo4Jsvr mJsOwdfGhDgmBE9EQWtr8Yi7kXSWt7qZgKtP/DrCAQ3DzYaPnG+mzL9NbRjJWAJErO gBGcTdJ4jqo5Ls6igTVkfylMtoCw6jL1cdYtjkFv16AYgcpIJe8Iiil5HipsITeY4J F/FXyLlMPE3Ug== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A8D076048A for ; Tue, 19 Jul 2022 23:33:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tIvWxNfD"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32A88896; Tue, 19 Jul 2022 23:33:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658266432; bh=d7N6GiwgiM2ATu82McMNeRHJeJNGhk3rw/CPJAFEId8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tIvWxNfDBGhBULfowpFRFQmRXpFYn4U1lKHTPHBt0GGiPwfBvJ7r3cVq8VAHOT/jl 1XryiBW4AwyjA0EsFFcZz9zuq2cP9sO84A2dex/ShfUancIrwL6oY2fXLv/fpZwgfC 3nlUXGNOlBt+PsYgUuhtpH2w0oeTZdxaRRZYQVmk= To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 00:33:14 +0300 Message-Id: <20220719213314.11717-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220719213314.11717-1-laurent.pinchart@ideasonboard.com> References: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> <20220719213314.11717-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/2] libcamera: controls: Drop ControlList::contains() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The ControlList::contains(const ControlId &id) function isn't used, as it has been replaced by usage of the get() function. Document get as being the preferred way to check for the presence of a control in a ControlList, and drop the contains() function. Signed-off-by: Laurent Pinchart --- include/libcamera/controls.h | 1 - src/libcamera/controls.cpp | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 192be78434dc..85a56e621561 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -370,7 +370,6 @@ public: void clear() { controls_.clear(); } void merge(const ControlList &source); - bool contains(const ControlId &id) const; bool contains(unsigned int id) const; template diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 20c27e65e725..df1f0d94c2e6 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -931,17 +931,6 @@ void ControlList::merge(const ControlList &source) } } -/** - * \brief Check if the list contains a control with the specified \a id - * \param[in] id The control ID - * - * \return True if the list contains a matching control, false otherwise - */ -bool ControlList::contains(const ControlId &id) const -{ - return controls_.find(id.id()) != controls_.end(); -} - /** * \brief Check if the list contains a control with the specified \a id * \param[in] id The control numerical ID @@ -958,6 +947,10 @@ bool ControlList::contains(unsigned int id) const * \brief Get the value of control \a ctrl * \param[in] ctrl The control * + * Beside getting the value of a control, this function can also be used to + * check if a control is present in the ControlList by converting the returned + * std::optional to bool (or calling its has_value() function). + * * \return A std::optional containing the control value, or std::nullopt if * the control \a ctrl is not present in the list */