summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-11 15:46:12 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-11 16:08:04 -0300
commitf29ceef5002f7ab2a0f400adbed20299737bce20 (patch)
tree2324619326073a6a55f286723802553743feb3f9 /src/bin/eolian_mono/eolian/mono/klass.hh
parent2a003420f83134331c8b404df1905cba538cfad6 (diff)
efl-csharp: Respect beta for classes and other stuff.
Summary: In order to work around an issue with Efl.App, which is stable but inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the inheritance chain are simply skipped. Also changed the class used int test for inheritance from C# Efl.Loop is stable but internally it uses a @beta class as argument to its Register() method in the constructor. When instantiating a user-defined C# subclass, the binding calls the C# override in the NativeInherit class and the marshalling fails as no code is generated for the beta class. Also moved Efl.Part test to a beta class. Efl.Part is still beta. Regarding parts, they are skipped if its class is @beta too. Also rejected all elm_* files in elm public eo files. They should get back in as they are converted to Efl.Ui.* api. An exception is elm_interface_scrollable.eo, as efl_ui_panel depends on it. Fixes T7730 Test Plan: Run tests Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7730 Differential Revision: https://phab.enlightenment.org/D8268
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 0689648..a9f270d 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -95,6 +95,13 @@ struct klass
95 bool generate(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const 95 bool generate(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const
96 { 96 {
97 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "klass_generator: " << cls.eolian_name << std::endl; 97 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "klass_generator: " << cls.eolian_name << std::endl;
98
99 if (blacklist::is_class_blacklisted(cls, context))
100 {
101 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "class " << cls.eolian_name << " is blacklisted. Skipping." << std::endl;
102 return true;
103 }
104
98 std::string suffix, class_type; 105 std::string suffix, class_type;
99 switch(cls.type) 106 switch(cls.type)
100 { 107 {
@@ -183,7 +190,7 @@ struct klass
183 return false; 190 return false;
184 191
185 bool root = !helpers::has_regular_ancestor(cls); 192 bool root = !helpers::has_regular_ancestor(cls);
186 std::set<attributes::klass_name, attributes::compare_klass_name_by_name> inherit_interfaces = helpers::non_implemented_interfaces(cls); 193 std::set<attributes::klass_name, attributes::compare_klass_name_by_name> inherit_interfaces = helpers::non_implemented_interfaces(cls, context);
187 std::vector<attributes::klass_name> inherit_classes; 194 std::vector<attributes::klass_name> inherit_classes;
188 std::copy_if(cls.immediate_inherits.begin(), cls.immediate_inherits.end() 195 std::copy_if(cls.immediate_inherits.begin(), cls.immediate_inherits.end()
189 , std::back_inserter(inherit_classes) 196 , std::back_inserter(inherit_classes)
@@ -268,7 +275,7 @@ struct klass
268 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, concrete_cxt)) 275 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, concrete_cxt))
269 return false; 276 return false;
270 277
271 for (auto&& klass : helpers::non_implemented_interfaces(cls)) 278 for (auto&& klass : helpers::non_implemented_interfaces(cls, concrete_cxt))
272 { 279 {
273 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); 280 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
274 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, concrete_cxt)) 281 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, concrete_cxt))
@@ -340,7 +347,7 @@ struct klass
340 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, inherit_cxt)) 347 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, inherit_cxt))
341 return false; 348 return false;
342 349
343 for (auto&& klass : helpers::non_implemented_interfaces(cls)) 350 for (auto&& klass : helpers::non_implemented_interfaces(cls, inherit_cxt))
344 { 351 {
345 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); 352 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
346 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, inherit_cxt)) 353 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, inherit_cxt))
@@ -644,7 +651,7 @@ struct klass
644 if (!as_generator(*(event_registration(cls, cls))).generate(sink, cls.events, context)) 651 if (!as_generator(*(event_registration(cls, cls))).generate(sink, cls.events, context))
645 return false; 652 return false;
646 653
647 for (auto&& c : helpers::non_implemented_interfaces(cls)) 654 for (auto&& c : helpers::non_implemented_interfaces(cls, context))
648 { 655 {
649 // Only non-regular types (which declare events through interfaces) need to register them. 656 // Only non-regular types (which declare events through interfaces) need to register them.
650 if (c.type == attributes::class_type::regular) 657 if (c.type == attributes::class_type::regular)
@@ -742,7 +749,7 @@ struct klass
742 // Inherited events 749 // Inherited events
743 750
744 // For now, as mixins can inherit from regular classes, we can't filter out inherited events. 751 // For now, as mixins can inherit from regular classes, we can't filter out inherited events.
745 auto inherits = helpers::non_implemented_interfaces(cls); 752 auto inherits = helpers::non_implemented_interfaces(cls, context);
746 for (auto&& c : inherits) 753 for (auto&& c : inherits)
747 { 754 {
748 attributes::klass_def klass(get_klass(c, cls.unit), cls.unit); 755 attributes::klass_def klass(get_klass(c, cls.unit), cls.unit);