efl-mono: Fix call of virtual methods after new API
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Fri, 14 Dec 2018 22:39:09 +0000 (20:39 -0200)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 18 Dec 2018 04:23:55 +0000 (13:23 +0900)
commita451cd0df9ed76d889fb972596fc79d48a7a4226
treebd5c7f1c2ec1cda0878cc82659f1c7fe5b8e3b6f
parentc25a7dd41cfc6c0506982533a9b25e26c3c86455
efl-mono: Fix call of virtual methods after new API

Summary:
After the new API, the virtual wrapper classes (*NativeInherit) just
declared the wrappers for the current class. But as they didn't have any
inheritance information, reimplementing methods from a parent Eo class
wouldn't work. (e.g. Efl.Ui.Button reimplementing Efl.Object
FinalizeAdd).

This commit changes these NativeInherit classes to mimic the inheritance
chain of their regular/abstract counterparts, reusing the virtual
wrapper implementations.

In order to access the correct Eo class created, the methods on it were
changed from static to instance methods. The instance will be held as a
class member of the regular/abstract API class to keep the delegates
alive and allow getting C Function pointers from them.

The class_initializer method was also split in two. The method
collecting the wrapper delegates was extracted in order to call the
parent ones.

Also avoid exception in cached strings queries as TryGetValue requires
non-null keys.

Test Plan: Run test suite.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7460
src/bin/eolian_mono/eolian/mono/function_definition.hh
src/bin/eolian_mono/eolian/mono/function_helpers.hh
src/bin/eolian_mono/eolian/mono/function_registration.hh
src/bin/eolian_mono/eolian/mono/klass.hh
src/bin/eolian_mono/eolian/mono/name_helpers.hh
src/bin/eolian_mono/eolian_mono.cc
src/bindings/mono/eo_mono/iwrapper.cs
src/tests/efl_mono/Eo.cs
src/tests/efl_mono/libefl_mono_native_test.c