Page MenuHomePhabricator

csharp: cleanup concrete class
Needs RevisionPublic

Authored by YOhoho on Sep 10 2019, 4:48 AM.



Concrete class is only used to call static member of NativeMethod. they don't
need any inheritance and implementation of c functions.

Depends on D9893

Test Plan

ninja test

Diff Detail

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 13212
Build 9378: arc lint + arc unit
YOhoho created this revision.Sep 10 2019, 4:48 AM
YOhoho requested review of this revision.Sep 10 2019, 4:48 AM
lauromoura requested changes to this revision.Sep 10 2019, 7:38 PM
lauromoura added a subscriber: segfaultxavi.

I'm not sure we can remove all these functions from the Concrete classes yet.

For example, an hypothetical scenario:

  • A given method returns an interface instance, like, let's say, Efl.IModel Efl.Ui.View.GetModel()
  • The C# binding will happily try to use introspection to get the actual Efl_Class* of this instance through Globals.CreateWrapperFor
    • This makes sure we instantiate the actual generated C# class for that given Eo instance if possible.
  • But what if this is a non-generated class completely hidden from the binding? Like some kind of "private native model class"?

In this case we would rely on the Concrete class to be able to provide the C# user an instance that implements this interface. It would just wrap the Eo pointer like a regular generated class.

I'm afraid we did not have such test case in our test (thus this patch worked) (or better comments explaining the reasoning for keeping these classes around).

PS: Except for the rebase, looks good and tests passes.


There is a small conflict in this line after D9725 was merged. (It changed from sealed public to public sealed).

This revision now requires changes to proceed.Sep 10 2019, 7:38 PM