[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-6.2 05/10] docs: qom: Add subsection headings to declaration/
|
From: |
Eduardo Habkost |
|
Subject: |
[PATCH for-6.2 05/10] docs: qom: Add subsection headings to declaration/definition macros section |
|
Date: |
Thu, 29 Jul 2021 13:55:49 -0400 |
Add two new subsection headings to make the separation between
"declaration macros" and "definition macros" more visible.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
docs/devel/qom.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst
index 3f48016aa8f..05d045bf570 100644
--- a/docs/devel/qom.rst
+++ b/docs/devel/qom.rst
@@ -285,6 +285,9 @@ convention. To reduce the amount of boilerplate code that
needs to be
written for a new type there are two sets of macros to generate the
common parts in a standard format.
+Type declaration macros
+-----------------------
+
A type is declared using the ``OBJECT_DECLARE`` macro family. In types
which do not require any virtual functions in the class, the
`OBJECT_DECLARE_SIMPLE_TYPE` macro is suitable, and is commonly placed
@@ -323,6 +326,9 @@ struct, then the alternative `OBJECT_DECLARE_TYPE()` macro
can be
used. This does the same as `OBJECT_DECLARE_SIMPLE_TYPE()`, but without
the 'struct MyDeviceClass' definition.
+Type definition macros
+----------------------
+
To implement the type, the ``OBJECT_DEFINE`` macro family is available.
In the simple case the `OBJECT_DEFINE_TYPE()` macro is suitable:
--
2.31.1
- [PATCH for-6.2 00/10] QOM documentation updates, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 03/10] docs: qom: Fix autoptr expansion example, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 04/10] docs: qom: Fix "API Reference" heading level, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 02/10] docs: qom: Use Sphinx cross references more often, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 01/10] docs: qom: Replace old GTK-Doc #symbol syntax with `symbol`, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 05/10] docs: qom: Add subsection headings to declaration/definition macros section,
Eduardo Habkost <=
- [PATCH for-6.2 06/10] docs: qom: Remove unnecessary class typedefs from example, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 07/10] docs: qom: Fix OBJECT_DECLARE_SIMPLE_TYPE documentation, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 09/10] docs: qom: Remove OBJECT_CHECK macro examples, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 08/10] docs: qom: Show actual typecast functions in examples, Eduardo Habkost, 2021/07/29
- [PATCH for-6.2 10/10] MAINTAINERS: Add qom.rst to QOM section, Eduardo Habkost, 2021/07/29