=?utf-8?q?=5Bvaladoc=5D_doclets/gtkdoc=3A_Add_gtk-doc_headers_for_propert?= =?utf-8?q?y_accessor_=E2=80=98result=5Flength=E2=80=99_parameters?=
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] doclets/gtkdoc: Add gtk-doc headers for property accessor âresult_lengthâ parameters
- Date: Fri, 17 Aug 2012 23:25:14 +0000 (UTC)
commit 154ff25d16594692f8b2329ff23bbaa3edf915ba
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 16 20:19:07 2012 +0200
doclets/gtkdoc: Add gtk-doc headers for property accessor âresult_lengthâ parameters
When getting or setting arrays, Vala generates input or output
result length parameters, which need to have some (boilerplate)
documentation.
src/doclets/gtkdoc/generator.vala | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/doclets/gtkdoc/generator.vala b/src/doclets/gtkdoc/generator.vala
index 985d660..e904d77 100644
--- a/src/doclets/gtkdoc/generator.vala
+++ b/src/doclets/gtkdoc/generator.vala
@@ -621,6 +621,13 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
getter_gcomment.returns = "the value of the %s property".printf (get_docbook_link (prop));
getter_gcomment.brief_comment = "Get and return the current value of the %s property.".printf (get_docbook_link (prop));
+ if (prop.property_type != null && prop.property_type.data_type is Api.Array) {
+ var array_type = prop.property_type.data_type;
+ for (uint dim = 1; array_type != null && array_type is Api.Array; dim++, array_type = ((Api.Array) array_type).data_type) {
+ gcomment.headers.add (new Header ("result_length%u".printf (dim), "return location for the length of the property's value"));
+ }
+ }
+
/* Copy versioning headers such as deprecation and since lines. */
getter_gcomment.versioning = gcomment.versioning;
}
@@ -631,6 +638,13 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
setter_gcomment.headers.add (new Header ("value", "the new value of the %s property".printf (get_docbook_link (prop)), 2));
setter_gcomment.brief_comment = "Set the value of the %s property to @value.".printf (get_docbook_link (prop));
+ if (prop.property_type != null && prop.property_type.data_type is Api.Array) {
+ var array_type = prop.property_type.data_type;
+ for (uint dim = 1; array_type != null && array_type is Api.Array; dim++, array_type = ((Api.Array) array_type).data_type) {
+ gcomment.headers.add (new Header ("value_length%u".printf (dim), "length of the property's new value"));
+ }
+ }
+
/* Copy versioning headers such as deprecation and since lines. */
setter_gcomment.versioning = gcomment.versioning;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]