From patchwork Fri Jun 3 09:32:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16136 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 9751ABD161 for ; Fri, 3 Jun 2022 09:32:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 22A6665636; Fri, 3 Jun 2022 11:32:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1654248753; bh=PCV5TAWAfQurnwu5FEQr/0YAFQAQWdTrxgPzPVu5flU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fwUJ+Kqih6h6VfzHzOSpspH0bw8w/0/kXqtOuVoD15cwJrVTGKAaDtdX9Ds+RoI2x +SxpaQvIf/kC9zgCUYZYG4xKR9pa8dIYaHmuRJ63rl51KyigtsNzhXeltXg2PERh7K p8CahiXeWYa+a0b/u0jwxC2Zxz0UNQ1ixD3ppyg3a27z1GXj7WzQsBs5wEOmT4o8zt R0pHWRqYjUNuQ7VQb8uQ6hxxEm7aOXvPa+g4RdyGOppV+TWwcekXzB8zp3WF408Aoo gRE8XSOVX8gGi0SOtjDii+cwk6JzztWhcOlBtZdbEizUOcX4qwawD3pbUvo4HVWq8j YfaEcoI/83rcw== Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AE928633A6 for ; Fri, 3 Jun 2022 11:32:31 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id C140124000E; Fri, 3 Jun 2022 09:32:30 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Jun 2022 11:32:24 +0200 Message-Id: <20220603093224.28579-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: request: Add operator<<() 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: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" With the recent addition of operator<<() to most libcamera core classes to replace usage of the toString() function, the Request class was left behind. Add operator<<() for the Request class. Signed-off-by: Jacopo Mondi --- include/libcamera/request.h | 3 +++ src/libcamera/request.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 1eb537e9b09b..dffde1536cad 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -75,4 +76,6 @@ private: Status status_; }; +std::ostream &operator<<(std::ostream &out, const Request &r); + } /* namespace libcamera */ diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 5704972d86af..f630f0818cbd 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -594,4 +594,16 @@ std::string Request::toString() const return ss.str(); } +/** + * \brief Insert a text representation of a Request into an output stream + * \param[in] out The output stream + * \param[in] r The Request + * \return The output stream \a out + */ +std::ostream &operator<<(std::ostream &out, const Request &r) +{ + out << r.toString(); + return out; +} + } /* namespace libcamera */