From patchwork Mon Jun 8 23:28:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 4000 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 58EC463CC7 for ; Tue, 9 Jun 2020 01:25:28 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id CD218240004; Mon, 8 Jun 2020 23:25:27 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 9 Jun 2020 01:28:43 +0200 Message-Id: <20200608232844.10150-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200608232844.10150-1-jacopo@jmondi.org> References: <20200608232844.10150-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/6] libcamera: formats: Expose std::map::value_type 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-List-Received-Date: Mon, 08 Jun 2020 23:25:29 -0000 In order to prepare to replace usage of custom map in pipeline handlers, expose the formats map value_type type definition, to allow pipeline handlers to use STL functions to iterate the class. Signed-off-by: Jacopo Mondi --- include/libcamera/internal/formats.h | 2 ++ src/libcamera/formats.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index 914fdde27d0c..1361b55d63d2 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -22,6 +22,8 @@ template class ImageFormats { public: + using value_type = typename std::map>::value_type; + using iterator = typename std::map>::iterator; using const_iterator = typename std::map>::const_iterator; diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 9f46f82c9059..5037c5928669 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -34,6 +34,11 @@ LOG_DEFINE_CATEGORY(Formats) * Sizes are stored as a list of SizeRange. */ +/** + * \typedef ImageFormats::value_type + * \brief Value type of the entries in the formats map + */ + /** * \typedef ImageFormats::iterator * \brief Iterator for the formats map