summaryrefslogtreecommitdiff
path: root/src
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 /src
parent345dbe26b797bb528a98ac4f4153351093d47431 (diff)
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
Diffstat (limited to 'src')
-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 7fb4c0c..7501449 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
435 { 435 {
436 // Constructor with default parameters for easy struct initialization 436 // Constructor with default parameters for easy struct initialization
437 if(!as_generator( 437 if(!as_generator(
438 indent << scope_tab << "/// <summary>Constructor for " << string << ".</summary>\n" 438 indent << scope_tab << "/// <summary>Constructor for " << string << ".\n"
439 ).generate(sink, struct_name, context))
440 return false;
441
442 if (!struct_.documentation.since.empty())
443 if (!as_generator(indent << scope_tab << "/// <para>Since EFL " + struct_.documentation.since + ".</para>\n"
444 ).generate(sink, attributes::unused, context))
445 return false;
446
447 if (!as_generator(
448 indent << scope_tab << "/// </summary>\n"
439 << *(indent << scope_tab << field_argument_docs << "\n") 449 << *(indent << scope_tab << field_argument_docs << "\n")
440 << indent << scope_tab << "public " << string << "(\n" 450 << indent << scope_tab << "public " << string << "(\n"
441 << ((indent << scope_tab << scope_tab << field_argument_default) % ",\n") 451 << ((indent << scope_tab << scope_tab << field_argument_default) % ",\n")
@@ -443,12 +453,22 @@ struct struct_definition_generator
443 << indent << scope_tab << "{\n" 453 << indent << scope_tab << "{\n"
444 << *(indent << scope_tab << scope_tab << field_argument_assignment << ";\n") 454 << *(indent << scope_tab << scope_tab << field_argument_assignment << ";\n")
445 << indent << scope_tab << "}\n\n") 455 << indent << scope_tab << "}\n\n")
446 .generate(sink, std::make_tuple(struct_name, struct_.fields, struct_name, struct_.fields, struct_.fields), context)) 456 .generate(sink, std::make_tuple(struct_.fields, struct_name, struct_.fields, struct_.fields), context))
447 return false; 457 return false;
448 } 458 }
449 459
450 if(!as_generator( 460 if(!as_generator(
451 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.</summary>\n" 461 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.\n"
462 ).generate(sink, attributes::unused, context))
463 return false;
464
465 if (!struct_.documentation.since.empty())
466 if (!as_generator(indent << scope_tab << "/// <para>Since EFL " + struct_.documentation.since + ".</para>\n"
467 ).generate(sink, attributes::unused, context))
468 return false;
469
470 if (!as_generator(
471 indent << scope_tab << "/// </summary>\n"
452 << indent << scope_tab << "/// <param name=\"ptr\">Native pointer to be converted.</param>\n" 472 << indent << scope_tab << "/// <param name=\"ptr\">Native pointer to be converted.</param>\n"
453 << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n" 473 << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
454 << indent << scope_tab << "{\n" 474 << indent << scope_tab << "{\n"