Commit Graph

24 Commits

Author SHA1 Message Date
Vitor Sousa ed75aa32d6 cxx: General C++ Eo wrapper generation improvement
Using a new architecture in the generated files that simplify multiple
inheritance and allows the use of interface types as parameters.

No longer using a hand-crafted C++ header for eo_base.eo.
This file was added to the generation process.

Updated all files that are dependent in the hand-crafted eo_base
C++ header.

Now there is a class that contains the essentials functions of the former
eo::base wrapper and that is used to create (through inheritance) the
"concrete" classes for all Eo generated wrappers.

No longer binding any function or property that are protected, private or
legacy for now.

eolian_type_instance is now a struct with general information for the
whole type.

Added the new header file namespace_generator.hh to hold namespace
generation grammars.

Separated declaration and definition of Eo wrappers methods.

Referring for most objects by its full name (starting at the global
namespace ::) in the generated files.

Created additional helper grammars to avoid code replication.

Removed a TODO comment referring to a doubt about inheritance of
constructor methods.
Added a TODO comment regarding memory allocation for callbacks in static
member functions.
2015-01-05 15:52:27 -02:00
Vitor Sousa ed8ce801cb eolian_cxx: Assertions to ensure C++ wrapper compatibility with Eo*
Added static assertion in the generated header to ensure that the wrapper
have the same size of Eo*, thus grating compatibility between these types.

Added static assertion in the generated header to ensure that the wrapper
have standard layout. This should ensure correct type sizes when dealing
with inheritance.

Created a test to ensure that eo::base and the eolian wrappers have the
same size of a Eo*.

Added eolian_cxx_test_wrapper.cc to the list of test source files in
Makefile_Eolian_Cxx.am.
2015-01-05 15:52:27 -02:00
Stefan Schmidt 5f8e66a367 makefile_eolian_cxx: Fix indent and trailing whitespace
Purely cosmetic as I stumbled over it when looking at the file.
2014-11-17 16:48:13 +01:00
Stefan Schmidt bfdc83b85f build_eolian_cxx_test: Set dependencies correctly and remove BUILT_SOURCES
This took quite a while to figure out. The two object names for the cxx callback
test and callback.c have been to close. callback.c needs the eolian headers and
the CXX test needs the eolian_cxx headers.

Split it up and set the deps correctly. If you always run check with something
like -j 9 you might have never noticed as it was very likely that the headers
have been generated due to the wrong dep before.
2014-08-05 17:39:49 +02:00
Stefan Schmidt fd2b089552 Revert "Eolian CXX: Get rid of built sources for the callbacks test sources."
This reverts commit 638e72fda4.

After this change the files did not end up in the tarball and failing make distcheck

../../src/tests/eolian_cxx/callback.c:11:25: fatal error: callback.eo.h: No such file or directory
2014-08-04 15:18:21 +02:00
Tom Hacohen 638e72fda4 Eolian CXX: Get rid of built sources for the callbacks test sources.
This is not needed now that dependencies are well in place.
2014-08-04 13:29:20 +01:00
Stefan Schmidt c30e14c708 tests/eolian_cxx: Package callback.eo file into tarball in all cases.
When running make distcheck with release mode enabled the callback.eo
file did not find its way into the tarball and failed the build.
2014-07-31 11:21:20 +02:00
Savio Sena 1d271ed1bc autotools: Fix eolian_cxx tests.
Added callback.eo.c and callback.eo.h as dependencies to
eolian_cxx_test_callback.c and also added all generated files to CLEANFILES.
2014-07-30 23:07:43 -03:00
Carsten Haitzler 4d8dcab8f0 Revert "tests/eolian_cxx: Add another generated file to BUILT_SOURCES"
This reverts commit 577a6bfbba.

This brings efl back to building - it entirely stopped building for me
with this change so even if this tried to fix something... it made
just regular building of efl at all cease to work here which i'd say
is bad (if this just fixes a dist problem - at least dist is broken,
but regular build is not - we are in better shape).
2014-07-30 21:40:16 +09:00
Stefan Schmidt 577a6bfbba tests/eolian_cxx: Add another generated file to BUILT_SOURCES
If not put into BUILT_SOURCES it will not be added to CLEANFILES
and thus staying around as uncleaned file which make distcheck
complain about it.
2014-07-30 10:53:15 +02:00
Savio Sena 356640dc36 autotools: Added missing .eo to EXTRA_DIST
This fixes "make dist".
2014-07-21 21:12:00 -03:00
Felipe Magno de Almeida 9c6c7728c0 eolian-cxx: Added callback test
Added test for callback generation and uses
2014-07-18 18:59:44 -03:00
Savio Sena 78e396ac19 eolian-cxx: Initial version of complex types / callbacks / events implementation. 2014-07-18 18:57:13 -03:00
Savio Sena ac8975a73f eolian-cxx: Added tests. 2014-07-18 18:55:56 -03:00
Cedric BAIL da438beea5 eolian_cxx: add missing file for make dist. 2014-07-07 14:44:08 +02:00
Daniel Kolesa c05493b480 eolian-cxx: Added namespaces and more (see below)
Implemented namespaces
Added eolian_wrappers.hh with C++ code wrapping Eolain API
Changed eolian_cxx program options. Now they're eolian_gen's
Added functions to safe_str.hh (safe_lower, safe_upper, normalize_spaces, path_base)
Added a mocked version of type_lookup.hh in advance. The full
version will come as soon as complex-types are added.

Made apply again by Daniel Kolesa, original implementation by Savio Sena.
2014-06-30 19:35:06 +01:00
Guillaume Friloux 9bee17a0aa Dont install c++ headers of bindings when --disable-c++11 is used. 2014-06-02 15:54:06 +02:00
Savio Sena 6bfa07cb2f autotools: Fix eolianc-xx header distribution.
Summary:
Sorry, last patch added the headers to the correct relative
location but replaced dist with nodist which is incorrect. nodist is
for generated headers only.

Reviewers: cedric, raster

Reviewed By: raster

CC: felipealmeida, smohanty, cedric

Differential Revision: https://phab.enlightenment.org/D898
2014-05-26 15:47:44 +09:00
Savio Sena 58bdac7977 autotools: fix Eolian-Cxx installation.
Summary: grammar/* is now installed to the correct destination.

Reviewers: tasn, cedric

CC: JackDanielZ, felipealmeida, smohanty, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-24 02:27:52 +02:00
Cedric Bail 5c7c38c025 eolian_cxx: oops, forgot to disable build of Eolian_Cxx if C++11 is not available. 2014-05-04 13:11:11 +02:00
Felipe Magno de Almeida 8149823897 eolian-cxx: fix make distcheck and automake files for Eolian C++
Summary:
Fixed distcheck for Eolian C++. Made the generated files as
nodist so it doesn't get picked up for generation way too
early.

Reviewers: cedric, seoz

CC: cedric

Maniphest Tasks: T1220

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-04 12:21:30 +02:00
Cedric Bail 0c0fe54c73 eolian_cxx: add forgotten include for packaging. 2014-05-04 02:17:45 +02:00
Cedric Bail 3924b8c3fe eolian_cxx: fix include for cross compiling on Windows. 2014-05-04 01:58:53 +02:00
Savio Sena 46b6e8a563 eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary:
This patch adds 'eolian_cxx' -- a C++ bindings generator --
to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate
.eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated
bindings).

src/bin/eolian_cxx: The eolian_cxx program.
src/lib/eolian_cxx: A header-only library that implements the C++ code
generation that binds the .eo classes.

=Examples=

src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example,
it just uses some "dummy" generated C++ classes.

src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how
pure C++ classes inherit from .eo generated classes.

src/examples/evas/evas_cxx_rectangle.cc: More realistic example using
the generated bindings Evas Cxx. Still a bit shallow because we don't
have full fledged .eo descriptions yet, but will be improved.

=Important=

The generated code is not supported and not a stable API/ABI. It is
here to gather people interest and get review before we set things in
stone for release 1.11.

@feature

Reviewers: cedric, smohanty, raster, stefan_schmidt

CC: felipealmeida, JackDanielZ, cedric, stefan

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-03 00:56:32 +02:00