From patchwork Mon Aug 5 14:36:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20791 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 0803DC323E for ; Mon, 5 Aug 2024 14:37:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 96E68633BD; Mon, 5 Aug 2024 16:37:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ICCxet07"; 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 82F5163387 for ; Mon, 5 Aug 2024 16:37:24 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED46C581 for ; Mon, 5 Aug 2024 16:36:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1722868593; bh=IfyWtTa8yIn6QCZl6VGj/05aOsTlQNTCaR5WUCHzGck=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ICCxet07Stf7icmZ4/snjS8jSHHaEFW5P/F8A0rWtQmLGfgiS8MbcQbiGhtIYA2lN BMjd2n5zloGhQKhaAk1uYN1/tB1AG6dpLzXLVjRtMrdk7IHpEy84ij9OjpEU9AiUFn JwpujR20B95MQlrcoErJhfq+mP2LuLY3KVGrFZDs= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v5 05/18] libcamera: Hide *::Private classes with __DOXYGEN_PUBLIC__ Date: Mon, 5 Aug 2024 17:36:41 +0300 Message-ID: <20240805143654.20870-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240805143654.20870-1-laurent.pinchart@ideasonboard.com> References: <20240805143654.20870-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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 *::Private classes are part of the internal API, as their name implies. They are defined in internal headers, but implemented in the same source file as their public counterparts. This will cause Doxygen to complain about missing class definition when splitting the public and internal API documents, as the internal headers won't be parsed by Doxygen for the public API documentation. Marking the classes with \internal isn't enough. The directive prevents the documentation block from being included in the output, but this occurs at the generation stage, after the documentation blocks are parsed. Fix this by completely hidding the implementation of the *::Private classes from Doxygen using preprocessor conditional compilation. To do so, introduce a new macro, __DOXYGEN_PUBLIC__, that will be defined for the public API documentation only. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Daniel Scally --- src/libcamera/camera.cpp | 2 ++ src/libcamera/camera_manager.cpp | 2 ++ src/libcamera/framebuffer.cpp | 2 ++ src/libcamera/request.cpp | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 3c8f30d54401..aca466c9ba72 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -565,6 +565,7 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF * \brief The vector of stream configurations */ +#ifndef __DOXYGEN_PUBLIC__ /** * \class Camera::Private * \brief Base class for camera private data @@ -725,6 +726,7 @@ void Camera::Private::setState(State state) { state_.store(state, std::memory_order_release); } +#endif /* __DOXYGEN_PUBLIC__ */ /** * \class Camera diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 5a21132a08c2..fa44e33a135d 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -35,6 +35,7 @@ namespace libcamera { LOG_DEFINE_CATEGORY(Camera) +#ifndef __DOXYGEN_PUBLIC__ CameraManager::Private::Private() : initialized_(false) { @@ -249,6 +250,7 @@ void CameraManager::Private::removeCamera(std::shared_ptr camera) CameraManager *const o = LIBCAMERA_O_PTR(); o->cameraRemoved.emit(camera); } +#endif /* __DOXYGEN_PUBLIC__ */ /** * \class CameraManager diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp index f39db1223432..826848f75a56 100644 --- a/src/libcamera/framebuffer.cpp +++ b/src/libcamera/framebuffer.cpp @@ -107,6 +107,7 @@ LOG_DEFINE_CATEGORY(Buffer) * \return The array of per-plane metadata */ +#ifndef __DOXYGEN_PUBLIC__ /** * \class FrameBuffer::Private * \brief Base class for FrameBuffer private data @@ -209,6 +210,7 @@ FrameBuffer::Private::~Private() * \brief Retrieve the dynamic metadata * \return Dynamic metadata for the frame contained in the buffer */ +#endif /* __DOXYGEN_PUBLIC__ */ /** * \class FrameBuffer diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 24fa3a57312e..8c56ed30d0c4 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -38,6 +38,7 @@ namespace libcamera { LOG_DEFINE_CATEGORY(Request) +#ifndef __DOXYGEN_PUBLIC__ /** * \class Request::Private * \brief Request private data @@ -306,6 +307,7 @@ void Request::Private::timeout() emitPrepareCompleted(); } +#endif /* __DOXYGEN_PUBLIC__ */ /** * \enum Request::Status