[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 21/35] docs/qapi-domain: add qapi:struct directive
From: |
John Snow |
Subject: |
[RFC PATCH v2 21/35] docs/qapi-domain: add qapi:struct directive |
Date: |
Thu, 12 Dec 2024 20:12:50 -0500 |
Adds the .. qapi:struct:: directive, object, and :qapi:struct:`name`
cross-referencing role.
As per usual, QAPI cross-referencing for types in the member field list
will be added in a forthcoming commit.
Signed-off-by: John Snow <jsnow@redhat.com>
---
docs/sphinx/qapi-domain.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/sphinx/qapi-domain.py b/docs/sphinx/qapi-domain.py
index e042421016f..d94d84bc186 100644
--- a/docs/sphinx/qapi-domain.py
+++ b/docs/sphinx/qapi-domain.py
@@ -344,6 +344,12 @@ class QAPIEvent(QAPIObjectWithMembers):
pass
+class QAPIStruct(QAPIObjectWithMembers):
+ """Description of a QAPI Struct."""
+
+ pass
+
+
class QAPIModule(SphinxDirective):
"""
Directive to mark description of a new module.
@@ -506,6 +512,7 @@ class QAPIDomain(Domain):
"command": ObjType(_("command"), "cmd", "obj"),
"event": ObjType(_("event"), "event", "obj"),
"enum": ObjType(_("enum"), "enum", "obj", "type"),
+ "struct": ObjType(_("struct"), "struct", "obj", "type"),
"alternate": ObjType(_("alternate"), "alt", "obj", "type"),
}
@@ -516,6 +523,7 @@ class QAPIDomain(Domain):
"command": QAPICommand,
"event": QAPIEvent,
"enum": QAPIEnum,
+ "struct": QAPIStruct,
"alternate": QAPIAlternate,
}
@@ -527,6 +535,7 @@ class QAPIDomain(Domain):
"cmd": QAPIXRefRole(),
"event": QAPIXRefRole(),
"enum": QAPIXRefRole(),
+ "struct": QAPIXRefRole(),
"alt": QAPIXRefRole(),
# reference any data type (excludes modules, commands, events)
"type": QAPIXRefRole(),
--
2.47.0
- [RFC PATCH v2 27/35] docs/qapi-domain: add type cross-refs to field lists, (continued)
- [RFC PATCH v2 27/35] docs/qapi-domain: add type cross-refs to field lists, John Snow, 2024/12/12
- [RFC PATCH v2 25/35] docs/qapi-domain: add :ifcond: directive option, John Snow, 2024/12/12
- [RFC PATCH v2 30/35] docs/qapi-domain: implement error context reporting fix, John Snow, 2024/12/12
- [RFC PATCH v2 28/35] docs/qapi-domain: add CSS styling, John Snow, 2024/12/12
- [RFC PATCH v2 29/35] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve, John Snow, 2024/12/12
- [RFC PATCH v2 31/35] docs/qapi-domain: collapsible branches, John Snow, 2024/12/12
- [RFC PATCH v2 32/35] WIP: 3.x - XREF, John Snow, 2024/12/12
- [RFC PATCH v2 35/35] WIP: 3.x css theming for missing xref, John Snow, 2024/12/12
- [RFC PATCH v2 34/35] WIP: 3.x ObjectDesc compat, John Snow, 2024/12/12
- [RFC PATCH v2 33/35] WIP: 3.x ParserFix, John Snow, 2024/12/12
- [RFC PATCH v2 21/35] docs/qapi-domain: add qapi:struct directive,
John Snow <=