From patchwork Fri Jul 23 04:00:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13087 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 3DADFC322B for ; Fri, 23 Jul 2021 04:00:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAC29687B4; Fri, 23 Jul 2021 06:00:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pvqHwvME"; dkim-atps=neutral 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 700CE6877A for ; Fri, 23 Jul 2021 06:00:43 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E5BC03F2 for ; Fri, 23 Jul 2021 06:00:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627012843; bh=UG9ct1KXXPEd4vIWbovc+WYBYilIrGIsVtS/6JPe8Hk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pvqHwvMEn2B4ll5y0rXz9MdRJ9nq62zEYKRTpmh4JP0eN0KUJ3tV68rpFyeb8UJP5 WSqbPQMmlZIDsRgMrY/QmC4wv1Tn6hp7GipB9GZosRO3gLB4fhz0NsLJ4MVF8a4L3Z aezC0qjPBdE361C3j0BIXMdzYG1kNDGa9nAjJaj8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 23 Jul 2021 07:00:20 +0300 Message-Id: <20210723040036.32346-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210723040036.32346-1-laurent.pinchart@ideasonboard.com> References: <20210723040036.32346-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 01/17] libcamera: base: class: Document Extensible::_d() functions 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Extensible::_d() functions are meant to be called by users of the class. Document them. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- include/libcamera/base/class.h | 2 -- src/libcamera/base/class.cpp | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/include/libcamera/base/class.h b/include/libcamera/base/class.h index c2e1d3534ed1..9c7f0f2e6e27 100644 --- a/include/libcamera/base/class.h +++ b/include/libcamera/base/class.h @@ -88,7 +88,6 @@ public: Extensible(Private *d); protected: -#ifndef __DOXYGEN__ template const T *_d() const { @@ -100,7 +99,6 @@ protected: { return static_cast(d_.get()); } -#endif private: const std::unique_ptr d_; diff --git a/src/libcamera/base/class.cpp b/src/libcamera/base/class.cpp index 26b4967726d6..d0899671ca11 100644 --- a/src/libcamera/base/class.cpp +++ b/src/libcamera/base/class.cpp @@ -150,6 +150,23 @@ Extensible::Extensible(Extensible::Private *d) { } +/** + * \fn Extensible::_d() const + * \brief Retrieve the private data instance + * + * This template function isn't meant to be called directly. Instead, classes + * derived from Extensible get, through the LIBCAMERA_DECLARE_PRIVATE() macro, + * overriden _d() functions that return the correct pointer type to the + * corresponding derived Private class. + * + * \return A pointer to the private data instance + */ + +/** + * \fn Extensible::_d() + * \copydoc Extensible::_d() const + */ + /** * \var Extensible::d_ * \brief Pointer to the private data instance