Page MenuHomePhabricator

eolian_csharp: hide struct native representation inside the managed struct

Authored by vitor.sousa on Mar 25 2019, 2:37 PM.



Rework the struct binding generator to declare the native struct nested inside
the managed one.
This way native structs are less likely to cause confusion; for example
with an IDE that supports automatic completion.

Get rid of struct conversion class methods in favor of using (the already
generated) implicit conversion operators.

Depends on D8469

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
vitor.sousa created this revision.Mar 25 2019, 2:37 PM
vitor.sousa requested review of this revision.Mar 25 2019, 2:37 PM

@segfaultxavi likes this!

Just tell me that the NativeStruct is private :)

Sadly, it is not =/
We need access to those structs in any object that uses them.

We could make them internal if we compromise on never using eolian_mono outside efl (e.g. external libs).
But for that we would also need to rework the generated code used in the unit tests to be compiled together with efl in the same assembly.

This revision is now accepted and ready to land.Mar 26 2019, 12:39 PM
This revision was automatically updated to reflect the committed changes.