summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-07-11 15:50:33 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-07-11 15:51:38 -0300
commita19bb21edf75256e8dfe043d591d05bbf23a29a3 (patch)
tree789cd6ca9f52637b1fd1889a15a58998c70c7cb3 /src/bin/eolian_mono/eolian/mono/klass.hh
parent89399672b7a90451071d03b9403d8c8b698d67e1 (diff)
csharp: Tag exported API items.
Summary: Attributes to be used by the API export tool. For end users, no changes in the public API (except for a new attribute in generated classes). Also simplifies constructor forwarding by not needing to pass the type of the first "generated" class to compare. Currently only automatically generated items are tagged. Depends: D9259 Reviewers: vitor.sousa, felipealmeida Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9270
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 99dac21..a98866e 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -106,6 +106,9 @@ struct klass
106 .generate(sink, attributes::unused, iface_cxt)) 106 .generate(sink, attributes::unused, iface_cxt))
107 return false; 107 return false;
108 108
109 if(!as_generator("[Efl.Eo.BindingEntity]\n").generate(sink, attributes::unused, iface_cxt))
110 return false;
111
109 if(!as_generator 112 if(!as_generator
110 ( 113 (
111 "public " /*<< class_type*/ "interface" /*<<*/ " " << string << " : " 114 "public " /*<< class_type*/ "interface" /*<<*/ " " << string << " : "
@@ -279,6 +282,7 @@ struct klass
279 ( 282 (
280 documentation 283 documentation
281 << "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n" 284 << "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n"
285 << "[Efl.Eo.BindingEntity]\n"
282 << "public " << class_type << " " << name_helpers::klass_concrete_name(cls) << " : " 286 << "public " << class_type << " " << name_helpers::klass_concrete_name(cls) << " : "
283 << (klass_full_concrete_or_interface_name % ",") // classes 287 << (klass_full_concrete_or_interface_name % ",") // classes
284 << (root ? "Efl.Eo.EoWrapper" : "") // ... or root 288 << (root ? "Efl.Eo.EoWrapper" : "") // ... or root
@@ -502,7 +506,7 @@ struct klass
502 // For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters. 506 // For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters.
503 << scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null") << "\n" 507 << scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null") << "\n"
504 << scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") : " 508 << scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") : "
505 << "base(" << name_helpers::klass_get_name(cls) << "(), typeof(" << inherit_name << "), parent)\n" 509 << "base(" << name_helpers::klass_get_name(cls) << "(), parent)\n"
506 << scope_tab << "{\n" 510 << scope_tab << "{\n"
507 << (*(scope_tab << scope_tab << constructor_invocation << "\n")) 511 << (*(scope_tab << scope_tab << constructor_invocation << "\n"))
508 << scope_tab << scope_tab << "FinishInstantiation();\n" 512 << scope_tab << scope_tab << "FinishInstantiation();\n"
@@ -542,9 +546,8 @@ struct klass
542 scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n" 546 scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
543 << scope_tab << "/// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n" 547 << scope_tab << "/// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n"
544 << scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n" 548 << scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n"
545 << scope_tab << "/// <param name=\"managedType\">The managed type of the public constructor that originated this call.</param>\n"
546 << scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n" 549 << scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n"
547 << scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)\n" 550 << scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)\n"
548 << scope_tab << "{\n" 551 << scope_tab << "{\n"
549 << scope_tab << "}\n\n" 552 << scope_tab << "}\n\n"
550 ).generate(sink, attributes::unused, context); 553 ).generate(sink, attributes::unused, context);