[libcamera-devel,RFC,02/17] libcamera: base: class: Link LIBCAMERA_O_PTR to Extensible documentation
diff mbox series

Message ID 20210723040036.32346-3-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Replace CameraData with Camera::Private
Related show

Commit Message

Laurent Pinchart July 23, 2021, 4 a.m. UTC
The LIBCAMERA_O_PTR macro is part of the Extensible class
infrastructure, but doesn't link to it. This makes the generated
documentation unclear. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/base/class.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Niklas Söderlund July 24, 2021, 6:49 a.m. UTC | #1
Hi Laurent,

Thanks for your work.

On 2021-07-23 07:00:21 +0300, Laurent Pinchart wrote:
> The LIBCAMERA_O_PTR macro is part of the Extensible class
> infrastructure, but doesn't link to it. This makes the generated
> documentation unclear. Fix it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/base/class.cpp | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/base/class.cpp b/src/libcamera/base/class.cpp
> index d0899671ca11..d4f0ac64ad48 100644
> --- a/src/libcamera/base/class.cpp
> +++ b/src/libcamera/base/class.cpp
> @@ -98,8 +98,9 @@ namespace libcamera {
>   * \def LIBCAMERA_O_PTR()
>   * \brief Retrieve the public instance corresponding to the private data
>   *
> - * This macro is used in any member function of the private data class to access
> - * the public class instance corresponding to the private data.
> + * This macro is part of the libcamera::Extensible class infrastructure. It may
> + * be used in any member function of a libcamera::Extensible::Private subclass
> + * to access the public class instance corresponding to the private data.
>   */
>  
>  /**
> @@ -139,6 +140,8 @@ namespace libcamera {
>   * protected and private members.
>   *
>   * The PublicClass exposes its Private data pointer through the _d() function.
> + * In the other direction, the pointer to the PublicClass can be retrieved in
> + * functions of the Private class using the LIBCAMERA_O_PTR() macro.
>   */
>  
>  /**
> -- 
> Regards,
> 
> Laurent Pinchart
>
Jacopo Mondi July 29, 2021, 8:10 p.m. UTC | #2
Hi Laurent,

On Fri, Jul 23, 2021 at 07:00:21AM +0300, Laurent Pinchart wrote:
> The LIBCAMERA_O_PTR macro is part of the Extensible class
> infrastructure, but doesn't link to it. This makes the generated
> documentation unclear. Fix it.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
>  src/libcamera/base/class.cpp | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/base/class.cpp b/src/libcamera/base/class.cpp
> index d0899671ca11..d4f0ac64ad48 100644
> --- a/src/libcamera/base/class.cpp
> +++ b/src/libcamera/base/class.cpp
> @@ -98,8 +98,9 @@ namespace libcamera {
>   * \def LIBCAMERA_O_PTR()
>   * \brief Retrieve the public instance corresponding to the private data
>   *
> - * This macro is used in any member function of the private data class to access
> - * the public class instance corresponding to the private data.
> + * This macro is part of the libcamera::Extensible class infrastructure. It may
> + * be used in any member function of a libcamera::Extensible::Private subclass
> + * to access the public class instance corresponding to the private data.
>   */
>
>  /**
> @@ -139,6 +140,8 @@ namespace libcamera {
>   * protected and private members.
>   *
>   * The PublicClass exposes its Private data pointer through the _d() function.
> + * In the other direction, the pointer to the PublicClass can be retrieved in
> + * functions of the Private class using the LIBCAMERA_O_PTR() macro.
>   */
>
>  /**
> --
> Regards,
>
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/libcamera/base/class.cpp b/src/libcamera/base/class.cpp
index d0899671ca11..d4f0ac64ad48 100644
--- a/src/libcamera/base/class.cpp
+++ b/src/libcamera/base/class.cpp
@@ -98,8 +98,9 @@  namespace libcamera {
  * \def LIBCAMERA_O_PTR()
  * \brief Retrieve the public instance corresponding to the private data
  *
- * This macro is used in any member function of the private data class to access
- * the public class instance corresponding to the private data.
+ * This macro is part of the libcamera::Extensible class infrastructure. It may
+ * be used in any member function of a libcamera::Extensible::Private subclass
+ * to access the public class instance corresponding to the private data.
  */
 
 /**
@@ -139,6 +140,8 @@  namespace libcamera {
  * protected and private members.
  *
  * The PublicClass exposes its Private data pointer through the _d() function.
+ * In the other direction, the pointer to the PublicClass can be retrieved in
+ * functions of the Private class using the LIBCAMERA_O_PTR() macro.
  */
 
 /**