summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-06-28 18:20:01 -0300
committerJaehyun-Cho <35288529+Jaehyun-Cho@users.noreply.github.com>2019-07-05 09:57:23 +0900
commit73df0d47ff914211ee0a0b5fe46a381f1cd30f10 (patch)
tree4c805aafe893038363f97bd1b18be7264536d08d /src/bin/eolian_mono/eolian/mono/klass.hh
parenta94c72f4dec91153d45b5e98bdb169b56fe0132b (diff)
csharp: encapsulate some internal code of EoWrapper
Summary: Encapsulate some parts of EoWrapper making them less accessible to lib users. This can avoid unnecessary and risky usage of code that is only intended for internal usage. `inherited` field was made private and renamed to `generated`. Now its value can only be obtained through the `IsGeneratedBindingClass` property. `handle` field was made private. `eventLock` was renamed to `eflBindingEventLock` `ConstructingHandle` property set was made private. Constructors that are used to create new EFL# managed objects by wrapping a preexisting eo handle now receive a specific struct wrapping the handle pointer. This can avoid faulty interactions with the Reflection engine used only for generated classes that implement this constructor. Test Plan: meson test Reviewers: lauromoura, felipealmeida, YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9212
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 8b018f6..8f99326 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -214,7 +214,7 @@ struct klass
214 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" 214 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
215 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n" 215 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
216 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n" 216 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
217 << scope_tab << "private " << concrete_name << "(System.IntPtr raw) : base(raw)\n" 217 << scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
218 << scope_tab << "{\n" 218 << scope_tab << "{\n"
219 << scope_tab << "}\n\n" 219 << scope_tab << "}\n\n"
220 ) 220 )
@@ -511,7 +511,7 @@ struct klass
511 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n" 511 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
512 << scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n" 512 << scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
513 << scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n" 513 << scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n"
514 << scope_tab << "protected " << inherit_name << "(System.IntPtr raw) : base(raw)\n" 514 << scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
515 << scope_tab << "{\n" 515 << scope_tab << "{\n"
516 << scope_tab << "}\n\n" 516 << scope_tab << "}\n\n"
517 ).generate(sink, std::make_tuple(constructors, constructors, constructors), context)) 517 ).generate(sink, std::make_tuple(constructors, constructors, constructors), context))
@@ -526,7 +526,7 @@ struct klass
526 scope_tab << "[Efl.Eo.PrivateNativeClass]\n" 526 scope_tab << "[Efl.Eo.PrivateNativeClass]\n"
527 << scope_tab << "private class " << inherit_name << "Realized : " << inherit_name << "\n" 527 << scope_tab << "private class " << inherit_name << "Realized : " << inherit_name << "\n"
528 << scope_tab << "{\n" 528 << scope_tab << "{\n"
529 << scope_tab << scope_tab << "private " << inherit_name << "Realized(IntPtr ptr) : base(ptr)\n" 529 << scope_tab << scope_tab << "private " << inherit_name << "Realized(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
530 << scope_tab << scope_tab << "{\n" 530 << scope_tab << scope_tab << "{\n"
531 << scope_tab << scope_tab << "}\n" 531 << scope_tab << scope_tab << "}\n"
532 << scope_tab << "}\n" 532 << scope_tab << "}\n"