Commit Graph

20 Commits

Author SHA1 Message Date
Daniel Kolesa db57523e78 eolian: refactor parsing API and path handling
This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.

It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.

It should also be faster now.

It also fixes T7820.

@fix
2019-05-03 17:06:49 +02:00
Daniel Kolesa 3f083b3ccb eolian: add event type call convention checks for non-beta classes 2019-03-21 16:00:18 +01:00
Lauro Moura 2a003420f8 eolian-cxx: Add beta information to *_def
Summary: Fixes T7732

Reviewers: cedric, felipealmeida, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7732

Differential Revision: https://phab.enlightenment.org/D8267
2019-03-11 14:41:01 -03:00
Lauro Moura c03f272bec eolian-cxx: Add constructor_def
Summary: To be used generating argument-aware constructors in C#.

Reviewers: felipealmeida, vitor.sousa

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7794
2019-01-28 16:23:07 +09:00
Lauro Moura a5b338ded3 cxx: Add class get name attribute.
Summary:
C# generator was mistakenly reimplementing it assuming everything was
*_class_get.

Test Plan: run cxx/csharp tests

Reviewers: felipealmeida, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7522
2019-01-10 12:47:58 +01:00
Lauro Moura dd5c230353 eolian-cxx: Add parent/extensions information to klass_def
Summary: Following new Eolian api.

Test Plan: Run newly added test

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7459
2018-12-14 19:45:44 -02:00
Lauro Moura 98b716d0fa eolian-cxx: Add property_def
Summary:
While individual getters and setters are added to the list of methods of
a class, property_def will hold them as a pair.

This will help defining accessors like C#'s where they're grouped.

Also update some eolian-cxx tests that were commented out.

Depends: D7262

Test Plan: run eolian-cxx tests

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7389
2018-11-30 20:08:00 -02:00
Lauro Moura cd20ca85f4 tests: Use EFL_START/END_TEST in cxx tests
Summary: Will enable timing info in these tests.

Test Plan: run make check

Reviewers: zmike, felipealmeida, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6359
2018-06-22 12:43:47 -04:00
Lauro Moura 7d4c5f5d7c eo_cxx: Fix do_eo_add after lifecycle branch.
Summary:
Also changed the previously failing tests to use ck_assert_int_eqinstead
of fail_if for better reporting.

Test Plan: make check

Reviewers: cedric, felipealmeida

Reviewed By: cedric

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6194

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:00:42 -07:00
Jean-Philippe Andre c5d618e851 cxx: (Temporary) fix for make check
This fixes the C++ compilation tests.

list<int> is not allowed by eolian anymore, as the semantics were
unclear whether a pointer to int was passed, or if the int was stuffed
inside the list by casting.

ptr(string) is also not allowed as it's a pointer to a pointer type.

Both of the above types are strange when it comes to bindings. While C++
could probably be made to work, it's not clear we could have such types
in other bindings. Those types are in fact likely not so useful, as most
APIs can be designed around those restrictions.
2017-11-07 09:57:24 +09:00
Felipe Magno de Almeida 96d3af10bf eolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation 2017-09-28 17:50:14 -03:00
Felipe Magno de Almeida 44c0199f42 eolian-cxx: Fix instantiate constructor with lambda after disambiguation patch 2017-09-14 15:06:33 -03:00
Felipe Magno de Almeida 48b3c127f7 eo-cxx: Require instantiate keyword for constructors calling efl_add to avoid ambiguity 2017-09-08 11:47:29 +09:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Felipe Magno de Almeida 8906998ef2 eolian-cxx: Add support for ref parameters and correct ownership handling 2016-06-14 22:44:02 -03:00
Felipe Magno de Almeida 2a3d7860db eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Felipe Magno de Almeida 535a069a23 eolian-cxx: Remove .Base requirement
Remove requirement that class can't have the same name as another
class's namespace.
2016-04-21 18:31:53 -03:00
Vincent Torri ee8ff34d7b Test rework #19: Eolian_Cxx 2016-02-16 12:41:06 +00:00
Vitor Sousa ce36f0be93 eolain_cxx: Fix C++ support for new Eolian features
Added optional constructor methods for C++ Eolian wrappers.
Changed the interface of wrappers' main constructors.
If there are optional constructor methods they should be passed as variadic
template argument at the end of the constructor.
To support variadic template arguments, the optional "parent" parameter is
now the first parameter and there is another constructor without the
"parent" parameter.

Checking for @optinal and @nullable attributes instead of @nonull.
Now @nonull is the default, and eina::optional is only used when @optional
or @nullable attribute is specified.

The names of constructor methods no longer have the class name prefixed.

Added unit tests for checking the binding of optional constructors.
Added new .eo file to be used in the test.

Changed the generated documentation of constructors.

Changed the efl::eo::inherit accordingly, to address these new features.
Now the constructor methods should be explicit called in the
efl::eo::inherit constructor, which will receive them via variadic
template arguments.

Added another constructor to efl::eo::inherit for passing the parent
object.

Updated some tests and examples to follow the new interface.

Removed some code that is no longer necessary.

Also, fix Eolian C++ support for constructing properties. fix
assertion when parsing constructing properties.

Now if a property is a constructing property eolian_cxx will generate a
constructor method that have the property name (without the "_set" suffix).
2015-04-14 01:06:57 -03:00
Savio Sena ac8975a73f eolian-cxx: Added tests. 2014-07-18 18:55:56 -03:00