summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-10-14 03:51:15 +0000
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-10-15 16:01:08 -0300
commit125f7b33ec9d7984c8aaeae3dcbc1a1061cba642 (patch)
treebef1c506a6a5089f8cb8b8e10b2c4cdc018347be
parent345dbe26b797bb528a98ac4f4153351093d47431 (diff)
downloadefl-125f7b33ec9d7984c8aaeae3dcbc1a1061cba642.tar.gz
csharp: Add since documentation to struct and struct fields
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D10385
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 7fb4c0cf2f..7501449407 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -435,7 +435,17 @@ struct struct_definition_generator
{
// Constructor with default parameters for easy struct initialization
if(!as_generator(
- indent << scope_tab << "/// <summary>Constructor for " << string << ".</summary>\n"
+ indent << scope_tab << "/// <summary>Constructor for " << string << ".\n"
+ ).generate(sink, struct_name, context))
+ return false;
+
+ if (!struct_.documentation.since.empty())
+ if (!as_generator(indent << scope_tab << "/// <para>Since EFL " + struct_.documentation.since + ".</para>\n"
+ ).generate(sink, attributes::unused, context))
+ return false;
+
+ if (!as_generator(
+ indent << scope_tab << "/// </summary>\n"
<< *(indent << scope_tab << field_argument_docs << "\n")
<< indent << scope_tab << "public " << string << "(\n"
<< ((indent << scope_tab << scope_tab << field_argument_default) % ",\n")
@@ -443,12 +453,22 @@ struct struct_definition_generator
<< indent << scope_tab << "{\n"
<< *(indent << scope_tab << scope_tab << field_argument_assignment << ";\n")
<< indent << scope_tab << "}\n\n")
- .generate(sink, std::make_tuple(struct_name, struct_.fields, struct_name, struct_.fields, struct_.fields), context))
+ .generate(sink, std::make_tuple(struct_.fields, struct_name, struct_.fields, struct_.fields), context))
return false;
}
if(!as_generator(
- indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
+ indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.\n"
+ ).generate(sink, attributes::unused, context))
+ return false;
+
+ if (!struct_.documentation.since.empty())
+ if (!as_generator(indent << scope_tab << "/// <para>Since EFL " + struct_.documentation.since + ".</para>\n"
+ ).generate(sink, attributes::unused, context))
+ return false;
+
+ if (!as_generator(
+ indent << scope_tab << "/// </summary>\n"
<< indent << scope_tab << "/// <param name=\"ptr\">Native pointer to be converted.</param>\n"
<< indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
<< indent << scope_tab << "{\n"