Commit Graph

227 Commits

Author SHA1 Message Date
Savio Sena 0cc5f5c94d eolian-cxx: Added generation of call_constructor for parent_type. 2014-07-25 11:32:56 -03:00
Savio Sena fb82d67ab1 eolian-cxx: Fixed inheritance operations generation rules.
The generated code was not converting the types from C to C++ correctly.
2014-07-24 19:52:23 -03:00
Savio Sena bd68d29968 eolian-cxx: Added grammar rule parameters_cxx_list.
Now with the correct semantics: list parameters converting to C++.
2014-07-24 19:52:23 -03:00
Savio Sena 90f46e36f2 eolian-cxx: Renamed parameters_cxx_list -> constructor_parameters_list 2014-07-24 19:52:23 -03:00
Savio Sena cc04dff0b9 eolian-cxx: Removed unused code.
Sanitized grammar removing old code which is not unecessary for good.
2014-07-24 19:52:23 -03:00
Savio Sena dcb75cdc1d eolian-cxx: Fixed a bug in the generator.
It was not considering the variable name correctly.
2014-07-24 19:52:23 -03:00
Felipe Magno de Almeida ad66192465 eolian-cxx: Fixed generation using abstract return-type instead of C type
The _tmp_ret variable should use the native C type and not the
abstracted C++ type.
2014-07-18 19:20:55 -03:00
Felipe Magno de Almeida c1e8918b88 eolian-cxx: Fixed inheritance feature with callbacks
The addition of callbacks was making the inheritance to fail. Fixed
generation by using the C types, instead of the abstracted callback
types for the wrapper functions.
2014-07-18 19:00:35 -03:00
Felipe Magno de Almeida 907544be7b eolian-cxx: Various and various fixes with callbacks
Mimic the callback function generation for other functions that were
being generated incorrectly and inconsistently.
2014-07-18 18:59:12 -03:00
Felipe Magno de Almeida 15d85d7dc6 eolian-cxx: Workaround for callbacks without void* data parameter 2014-07-18 18:57:14 -03:00
Felipe Magno de Almeida 7e84cc0154 eo-cxx: Added a few complex types to lookup table 2014-07-18 18:57:14 -03:00
Felipe Magno de Almeida 401cc81355 eolian-cxx: Workaround for multiple callbacks without corresponding void*data
Added workaround for generating classes with methods that have more
than one callback but doesn't have a corresponding void* data
parameter. E.g., elm_box.eo.
2014-07-18 18:57:14 -03:00
Felipe Magno de Almeida bb1e5248c4 eolian-cxx: Fixed double qualifying operator on generated code
Fixed the generation of double qualifying operators on extension
inheritance for classes defined in the global namespace.
2014-07-18 18:57:14 -03:00
Savio Sena e807421f60 eolian-cxx: Fixed complex-types. 2014-07-18 18:57:13 -03:00
Savio Sena 04d90ae131 eolian-cxx: Relevant cosmetics. 2014-07-18 18:57:13 -03:00
Felipe Magno de Almeida 377bb449ba eolian-cxx: Added empty wrapper constructor
Added empty wrapper constructor to generation from std::nullptr_t and
allowed efl::eo::base to be empty with proper copy-constructors and
assignment operators.
2014-07-18 18:57:13 -03:00
Felipe Magno de Almeida 6109d17de1 eolian-cxx: Fixed inheritance extensions not proper qualifying the base class
The generator now globally qualifies the base names, so it works
outside the efl namespace
2014-07-18 18:57:13 -03:00
Savio Sena 67e187bebc eolian-cxx: Fixed the translation of the native type. 2014-07-18 18:57:13 -03:00
Savio Sena 027fa407bd eolian-cxx: Fixed a bug in class validator. 2014-07-18 18:57:13 -03:00
Savio Sena 78e396ac19 eolian-cxx: Initial version of complex types / callbacks / events implementation. 2014-07-18 18:57:13 -03:00
Felipe Magno de Almeida 5e5b00bc90 eolian-cxx: Disabled temporarily the inheritance feature
This feature is buggy when using multi-level namespaces. I disabled it
temporarily and will fix it ASAP and re-enable it.
2014-07-18 12:28:03 -03:00
Savio Sena ce63b16f40 eolian-cxx: Make proper handling of namespaces.
Summary:
The generation of class prefixes was not taking into account the full
classname -- the namespace was not being prepended to it. Fixed that and
also re-organized the code a bit, removed some Wshadow warnings also.

This commit fixes 'make examples' and 'make check'.

Reviewers: tasn, cedric, q66

CC: felipealmeida, smohanty, cedric

Differential Revision: https://phab.enlightenment.org/D1100
2014-07-01 10:55:45 +01: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
Savio Sena a9babe8053 eolian-cxx: remove annoying compilation warnings and messages
Summary:
- remove an automake warning caused by a variable redefinition
- remove unnecessary verbosity during debug compilation

Reviewers: cedric, smohanty

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-10 10:15:37 +02:00
Savio Sena e4f16cb2c5 eolian_cxx: pass eo_class by reference instead of by value.
Summary: This patch gets rid of a "defect" pointed out by Coverty Scan -- as per jackdanielz request.
CID 1211985.

Reviewers: cedric, smohanty, JackDanielZ

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 13:02:43 +02:00
Savio Sena e61004e30f eolian_cxx: remove warnings from bin and lib.
Reviewers: cedric, smohanty, stefan_schmidt, stefan

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-07 00:18:43 +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