summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-08-19 21:31:20 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-08-19 21:41:29 -0300
commitcc49c1034b1114e1ce9d10d8651ec6d24c1faaa1 (patch)
treefe13ff532336c143320afa99dcf7e937ee21d28e /src/bin/eolian_mono/eolian/mono/klass.hh
parent2a0eeba4e5fdd0de0c46000fa783cb59f7d716e7 (diff)
csharp: MVVM parts support
Summary: Parts binding will follow a similar approach to regular property binding: `var error = factory.PartName().PropertyName().Bind(modelProperty);` * Changed both `Bind()` overloads to return the error code from `efl_ui_property_bind` * Also properties from interfaces implemented didn't have their `Bindable` wrapper methds available. Depends on D9563 Reviewers: felipealmeida, cedric, SanghyeonLee, woohyun Reviewed By: cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D9564
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index f118dea..9c466d7 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -348,14 +348,24 @@ struct klass
348 if(!name_helpers::close_namespaces(sink, cls.namespaces, context)) 348 if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
349 return false; 349 return false;
350 350
351 std::vector<attributes::property_def> implementable_properties;
352 std::copy(cls.properties.begin(), cls.properties.end(), std::back_inserter(implementable_properties));
353
354 for (auto&& klass : helpers::non_implemented_interfaces(cls, context))
355 {
356 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
357 std::copy(c.properties.begin(), c.properties.end(), std::back_inserter(implementable_properties));
358 }
359
351 if(!as_generator 360 if(!as_generator
352 (lit("#pragma warning disable CS1591\n") // Disabling warnings as DocFx will hide these classes 361 (lit("#pragma warning disable CS1591\n") // Disabling warnings as DocFx will hide these classes
353 <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls) 362 <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls)
354 << "_ExtensionMethods {\n" 363 << "_ExtensionMethods {\n"
355 << *((scope_tab << property_extension_method_definition(cls)) << "\n") 364 << *((scope_tab << property_extension_method_definition(cls)) << "\n")
365 << *((scope_tab << part_extension_method_definition(cls)) << "\n")
356 << "}\n" 366 << "}\n"
357 << lit("#pragma warning restore CS1591\n")) 367 << lit("#pragma warning restore CS1591\n"))
358 .generate(sink, std::make_tuple(cls.namespaces, cls.properties), context)) 368 .generate(sink, std::make_tuple(cls.namespaces, implementable_properties, cls.parts), context))
359 return false; 369 return false;
360 370
361 return true; 371 return true;