mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
qapi: Implement boxed event argument documentation
Generate a reference "Arguments: the members of ...", just like we do
for commands since commit c2dd311cb7
"qapi2texi: Implement boxed
argument documentation".
No change to generated QMP documentation; we don't yet use boxed
events outside tests/.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191024110237.30963-7-armbru@redhat.com>
This commit is contained in:
parent
6d570ca10e
commit
b621a26040
4 changed files with 13 additions and 4 deletions
|
@ -266,9 +266,17 @@ class QAPISchemaGenDocVisitor(QAPISchemaVisitor):
|
||||||
|
|
||||||
def visit_event(self, name, info, ifcond, arg_type, boxed):
|
def visit_event(self, name, info, ifcond, arg_type, boxed):
|
||||||
doc = self.cur_doc
|
doc = self.cur_doc
|
||||||
|
if boxed:
|
||||||
|
body = texi_body(doc)
|
||||||
|
body += ('\n@b{Arguments:} the members of @code{%s}\n'
|
||||||
|
% arg_type.name)
|
||||||
|
body += texi_features(doc)
|
||||||
|
body += texi_sections(doc, ifcond)
|
||||||
|
else:
|
||||||
|
body = texi_entity(doc, 'Arguments', ifcond)
|
||||||
self._gen.add(MSG_FMT(type='Event',
|
self._gen.add(MSG_FMT(type='Event',
|
||||||
name=doc.symbol,
|
name=doc.symbol,
|
||||||
body=texi_entity(doc, 'Arguments', ifcond)))
|
body=body))
|
||||||
|
|
||||||
def symbol(self, doc, entity):
|
def symbol(self, doc, entity):
|
||||||
if self._gen._body:
|
if self._gen._body:
|
||||||
|
|
|
@ -160,7 +160,6 @@
|
||||||
|
|
||||||
##
|
##
|
||||||
# @EVT-BOXED:
|
# @EVT-BOXED:
|
||||||
# BUG: generated doc misses arguments
|
|
||||||
##
|
##
|
||||||
{ 'event': 'EVT-BOXED', 'boxed': true,
|
{ 'event': 'EVT-BOXED', 'boxed': true,
|
||||||
'data': 'Object' }
|
'data': 'Object' }
|
||||||
|
|
|
@ -196,4 +196,4 @@ another feature
|
||||||
<- out
|
<- out
|
||||||
doc symbol=EVT-BOXED
|
doc symbol=EVT-BOXED
|
||||||
body=
|
body=
|
||||||
BUG: generated doc misses arguments
|
|
||||||
|
|
|
@ -279,7 +279,9 @@ another feature
|
||||||
|
|
||||||
@deftypefn Event {} EVT-BOXED
|
@deftypefn Event {} EVT-BOXED
|
||||||
|
|
||||||
BUG: generated doc misses arguments
|
|
||||||
|
|
||||||
|
@b{Arguments:} the members of @code{Object}
|
||||||
|
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue