libcamera: Hide *::Private classes with __DOXYGEN_PUBLIC__

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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2024-08-04 22:06:53 +03:00
parent 697bcf5b10
commit ff26e21339
4 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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> camera)
CameraManager *const o = LIBCAMERA_O_PTR();
o->cameraRemoved.emit(camera);
}
#endif /* __DOXYGEN_PUBLIC__ */
/**
* \class CameraManager

View file

@ -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

View file

@ -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