summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx (follow)
AgeCommit message (Collapse)Author
2018-11-23eolian: implement new inherit behaviorDaniel Kolesa
Eolian now separates 'parent' and 'extensions'. For regular classes, parent is the first item in the inherits list and extesions is the rest. For interfaces and mixins, parent is NULL and extends is the inherits list. The reason for this is the separation of them in syntax in near future. It also slightly changes the behavior; since for interfaces and mixins, parent is always NULL now, you can freely inherit from all types of classes without needing to manually put an interface type as the first item of the inherits list.
2018-08-21cxx: Remove libeolian_cxx dependency on eo_cxxLauro Moura
Summary: Fixes T7324 Reviewers: felipealmeida, bu5hm4n, zmike Reviewed By: felipealmeida, bu5hm4n, zmike Subscribers: segfaultxavi, cedric, #reviewers, #committers, zmike Tags: #efl Maniphest Tasks: T7324 Differential Revision: https://phab.enlightenment.org/D6881
2018-05-24efl: major rewrite of efl_part.Cedric BAIL
The interface efl_part_get should not be directly called from C, but the efl_part wrapper should. It rely on efl_noref to properly destroy the object. Binding can control the lifecycle of the reference the way they want by either calling the wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set doesn't need to be exposed outside of EFL anymore. Differential Revision: https://phab.enlightenment.org/D6098
2018-05-11efl_mono: Support type aliases.Lauro Moura
Summary: Due to the absence of typedef from C#, we generate thin structs with implicit operators to allow reference the data from their typedef'd name from C#. The other alternatives would be always converting to the lowest base on the alias stack (losing the meaningfulness of the typedef name) or using the 'using' directive. The latter has the restriction that it makes an alias visible only in the file they are declared. Reviewers: felipealmeida, cedric, segfaultxavi Reviewed By: segfaultxavi Subscribers: zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6157
2018-05-03efl_mono: More uniformization of the handling of namesLauro Moura
Summary: Uses a common helper to open and close namespaces, to get the managed and unmanaged name of things, the interface, concrete and inherit class names, etc. eolian_cxx: Add namespace information to func_def, as it'll avoid eolian-cxx clients dealing with the eolian C api directly when trying to access a function pointer namespace. Depends on D6048 Reviewers: felipealmeida, vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D6049
2018-05-01efl_cxx: remove eolized promises from the CXX bindingsLauro Moura
Summary: Also added a blacklist header to temporarily disable generation of eo methods with futures as arguments or return type. Once the models branch lands, we should enable future support again with eina_futures. Reviewers: cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D6018
2018-04-26efl_mono: Move event generators to its own header.Lauro Moura
Summary: Making it easier to share code between self and inherited events. During this move, the namespace and keyword headers were merged into the name_helpers header. Also added the first seed of a generic namespace reducer function, to be used by other functions in later commits. Depends on D5994 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: segfaultxavi, cedric Differential Revision: https://phab.enlightenment.org/D5995
2018-04-12efl_mono: Proper support for @class methods.Lauro Moura
Previously, class methods were implemented as regular instance methods. This commits generates C# static methods for @class methods on the *Concrete classes (and their childs).
2018-03-20eolian_cxx: Fill documentation of part_def.Lauro Moura
2018-03-20eolian-cxx: Add helper method to get all partsLauro Moura
Line get_all_methods, gets everything from the inherits too.
2018-03-16eolian_cxx: Add 'unknown' to parameter directionLauro Moura
It'll be used in eolian_mono as the 'direction' of return types in some helper functions.
2018-03-12eolian: update type/var name APIsDaniel Kolesa
2018-03-12eolian: update class name APIsDaniel Kolesa
2018-03-08eolian cxx: remove usages of obsolete file_get APIsDaniel Kolesa
2018-03-02eolian cxx,csharp: Update after eolian changesLauro Moura
Closes D5829.
2018-02-27eolian: eolian_* -> eolian_state_*, Eolian -> Eolian_StateDaniel Kolesa
2018-01-25eolian_cxx: Fix "unused parameter" warningsLauro Moura
The Klass(Klass &&other) one was causing "synthesized method ... first required here' warnings on Windows gcc-4.8.
2018-01-19cxx: Fix a trivial warningJean-Philippe Andre
2018-01-16eolian: do not require unit when stringifying typesDaniel Kolesa
As it is no longer necessary to pass unit when evaluating exprs, it is not necessary to pass it here either. Convert all the APIs to the new style and update all instances in our tree.
2018-01-16eolian: do not require unit for expr eval APIsDaniel Kolesa
The necessary information is now stored directly in the expr during database validation. Also enable expr validation for params.
2018-01-12eolian: type_typedecl_get doesn't need a unitDaniel Kolesa
2018-01-12eolian: do not require unit for type_class_getDaniel Kolesa
2018-01-12eolian_cxx: support multiple function pointersThiep Ha
2017-12-20eolian-mono: Add documentation generation supportLauro Moura
This commit adds the "documentation" generator, which gets the documentation_def attribute of the given item and generates xml comments to be exported by MCS. For items requiring some customization of the generated comments (e.g. functions and its parameters), the helpers to generate the preamble (summary), body (paragraphs) and epilogue (currently just the @since tag) were added. Currently we do not support converting Eolian references into xmldoc references. As we explicitly generate Get/Set methods for properties, for now the generator tries to get the get/set specific documentation first. If it is not present, fallback to the common docs. Later this could be changed to generate the common one as paragraphs of the Get/Set. Also some generated code like the wrappers for calling C# methods from C can be private. This will cleanup the introspection results and warnings when generating documentation. Due to this visibility change, the binbuf tests had to be changed to add redirect calls to the native methods instead of directly calling the DllImport'd methods.
2017-12-15efl_mono: tests and better support for structs, plus some other fixesVitor Sousa
Fix several integer binding type deduction based in its size on C. Generation for function pointers no longer use modified argument name which is different from the parameter name. New generation context for structs. bool from UnmanagedType.I1 to UnmanagedType.U1 (correct use inside structs according to mono documentation). byte (signed char) and int8 now is correctly represented by sbyte in C#. Check parameter direction in some out generators in parameter.hh. Add efl_libs.csv to gitignore. Make eina.Value pointer constructor public. Add missing fields to efl.kw_event.Description struct. Remove eina.File workaround (let struct gen handle it). Remove is_function_ptr bool from regular_type_def and add a typedecl_type enum to it. Also add some helper methods for easier comparison. Left some test cases commented for when pointer parameters are properly working.
2017-12-15eolian: remove remaining global state (+ modify APIs accordingly)Daniel Kolesa
2017-12-06eolian_cxx: Fix Eolian_Unit supportLauro Moura
Summary: Unit is now stored in klass_def, parameter_def and function_def for future calls to the Eolian API. Reviewers: felipealmeida, jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5613
2017-12-05eo: Move hacky API auto_unref to C onlyJean-Philippe Andre
This API is meant to be used by parts only, and by bindings dealing with part objects. This patch fixes make check which got broken in the after the previous one (cxx).
2017-12-05cxx: Fix compilation after mergeJean-Philippe Andre
This resolves a few issues and brings back the experimental features. Also, disable some of the ugliest experiments: - manual function overrides, - define APIs only in eo_cxx namespace Some APIs are generated behind EFL_CXXPERIMENT (eg. event_name_cb_add or some weak pointer stuff). I believe they are useful but would like to make sure there are no serious drawbacks with generating those.
2017-12-05cxx: Define types after forward declarationsJean-Philippe Andre
This is useful if the types refer to the current class.
2017-12-05cxx: Use per-function guards in efl objectJean-Philippe Andre
This prevents generation of del(). I also removed constructor, finalize and destructor as I believe this requires special work with eo_inherit (where did this work go??).
2017-12-05cxx: Include definition header in impl headerJean-Philippe Andre
Good for IDE's. Not extremely useful considering how unreadable those files are.
2017-12-05cxx: Add header guards for manual definitionsJean-Philippe Andre
This will be used for things like efl_del efl_part was a lucky case where the entire class was to be implemented manually, thus the global header guard was sufficient.
2017-12-05cxx: Implement support for @class static functionsJean-Philippe Andre
2017-12-05cxx: Fix indentation of ifdef guardJean-Philippe Andre
2017-12-05cxx: Implement support for partsJean-Philippe Andre
This generates methods like this: Part_Class part_name() const; Which can then be used like: slider.indicator().format_string_set("%1.1f");
2017-12-05cxx: Add header guards to .impl.hhJean-Philippe Andre
Those are included headers after all, even if they're only included once from Elementary.hh (or whatever Efl_Header.hh).
2017-12-05cxx: Avoid pedantic warning with -Wold-style-castJean-Philippe Andre
This affects the generated headers.
2017-12-05cxx: Use set for forward classesJean-Philippe Andre
This avoids duplication. Not very important as there are FWD_GUARD macros anyway.
2017-12-05cxx: Add implicit conversion to Eo* pointerJean-Philippe Andre
This is part of the experimental stuff. Allows calling C functions without using ._eo_ptr() explicitly. Probably not super useful, assuming the interfaces are done :)
2017-12-05cxx: Only use eo_cxx:: for methodsJean-Philippe Andre
Add an experimental (disabled) macro to only generate functions inside the eo_cxx equivalent of a class, instead of inside both the eo_cxx and the normal class definition. I guess the duplicated definition had something to do with doxygen, but I'm not sure this is quite necessary as doc will be generated with custom scripts.
2017-12-05cxx: No instantiate ctors for non-regular classesJean-Philippe Andre
Only regular classes can be instantiated, this should be reflected in the C++ binding as well.
2017-12-05cxx: Add define EFL_CXXPERIMENTAL for testingJean-Philippe Andre
I'll hide some controversial features behind this, until we come to an agreement with @felipealmeida and people who actually know C++ (iow: not just me^^). Features protected: - easy wref (using -> without locking) - xxx_event_cb_add() functions in object classes - instantiate(obj) to create a new object - add as a synonym for instantiate (both in efl::eo)
2017-12-05cxx: Add support for function pointersJean-Philippe Andre
This was tested on the function pointer Efl.Ui.Format_Func_Cb
2017-12-05cxx: Add strbuf to the list of recognized builtinsJean-Philippe Andre
2017-12-05cxx: Add event_cb_add functions to eventsJean-Philippe Andre
This enables a syntax like: button.clicked_event_cb_add([]() { std::cout << "Hello" << std::endl; }); I could not manage to pass the std::placeholders inside the template, depending on whether the lambda has arguments or not. Not sure if that's even possible.
2017-12-04eolian_cxx: Many changes for the C# bindingsLauro Moura
- Added helper function to get all methods of a given class (local and inherited methods) - Add filename information to klass - Added new defs: enum, value (currently only integers), struct - Generator refactoring - Eolian C compatibility
2017-11-07cxx: Fix ifdef protections in function implJean-Philippe Andre
Mote: for protected we should use "protected:" if that is somehow possible.
2017-11-07cxx: Add experimental "easy" way to use wrefJean-Philippe Andre
I hid it behind ifdef for now as I'm very much unsure of what I'm doing. This whole modern C++ thing is still weird to me :) Prerequisite: #define EFL_CXX_WREF_EASY This allows constructs such as: auto wobj = obj._get_wref(); std::cout << wobj->text_get() << std::endl;
2017-11-07cxx: Add _get_wref() convenience to all classesJean-Philippe Andre
This allows constructs like: auto w_obj = obj._get_wref(); auto cb = std::bind([w_obj]() { auto o = w_obj.lock(); if (!o) return; o->call(); }); event_add(..., obj, cb); Note: I don't like how those wref work. Close to c++ wref but far from EFL wref.