[libcamera-devel] [RFC PATCH 2/6] utils: ipc: Prevent struct constructors from being parsed by doxygen

Paul Elder paul.elder at ideasonboard.com
Mon May 24 10:40:25 CEST 2021


Currently the generated constructors for structs defined in mojom files
is being parsed by mojom. As the parameters are simply the struct
members, they are already documented, and the documentation of the
constructor is pointless. Protect them against being parsed by doxygen.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
 .../generators/libcamera_templates/definition_functions.tmpl   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utils/ipc/generators/libcamera_templates/definition_functions.tmpl b/utils/ipc/generators/libcamera_templates/definition_functions.tmpl
index cdd75f89..94bb4918 100644
--- a/utils/ipc/generators/libcamera_templates/definition_functions.tmpl
+++ b/utils/ipc/generators/libcamera_templates/definition_functions.tmpl
@@ -25,6 +25,7 @@ enum {{enum.mojom_name}} {
 struct {{struct.mojom_name}}
 {
 public:
+#ifndef __DOXYGEN__
 	{{struct.mojom_name}}() {%- if struct|has_default_fields %}
 		:{% endif %}
 {%- for field in struct.fields|with_default_values -%}
@@ -44,6 +45,8 @@ public:
 {%- endfor %}
 	{
 	}
+#endif
+
 {% for field in struct.fields %}
 	{{field|name}} {{field.mojom_name}};
 {%- endfor %}
-- 
2.27.0



More information about the libcamera-devel mailing list