Commit Graph

324 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 944e11559c eo: add before and after macro hooks for API generation functions
Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:32:04 -07:00
Felipe Magno de Almeida 8c70b9cfd1 eo-cxx: Fix warning on weak symbols with inline functions
Removed the EOAPI which is not necessary as the function is already inlined
2016-04-05 15:42:21 -03:00
Daniel Kolesa 9b845e7135 eolian: add APIs to get all things of each type 2016-03-29 15:01:17 +01:00
Daniel Kolesa b1070f9478 eolian: fix typos in symbol names in lua bindings 2016-03-29 11:13:48 +01:00
Vitor Sousa 3e7f4c1dae eina_cxx: fix Coverity warning regarding uninitialized iterator member 2016-03-21 17:30:49 -03:00
Vitor Sousa afb6646393 efl js: Add clean up callbacks to deallocate memory used in v8::External
Add several garbage collector callbacks for cleaning allocated C and C++
data used inside v8:External objects.

Fix eo_unref of already freed object in eo_js_construct_from_eo.hh.

Ensure all structs are allocated with malloc.

Add test for garbage collection.
Had to created .sh script because shebang clause do not support multiple
arguments.
2016-03-18 17:47:09 -03:00
Vitor Sousa a6025b5d27 efl js: Finish Eina_Iterator binding 2016-03-18 17:47:09 -03:00
Lauro Moura 1422e62f30 efl js: Fix naming of manual binding functions.
Also removed references to the discarded manual binding "ecore_js_file".
2016-03-18 17:47:09 -03:00
Vitor Sousa c7550b2964 eina_cxx: Add missing methods to Eina C++ wrappers
Also fix release_native_handle type error on mutable ranges.
2016-03-18 17:47:09 -03:00
Vitor Sousa fd0cf8b764 eina_cxx: Add specialized eina::iterator for Eo* wrappers
Add specialization of eina::iterator for Eo* C++ wrappers.

Specialize ibegin/iend methods in eina::list and eina::array of
Eo* wrappers to use the new eina::iterator.

Add unit test.
2016-03-18 17:47:09 -03:00
Vitor Sousa a85348b70b efl js: Update Javascript binding to compile with new Eolian API
Reword test method names to check naming convention.
2016-03-18 17:46:38 -03:00
Stefan Schmidt e981bfc4e8 cxx: follow eoid to eo_self rename in cxx generator and bindings
Bringing efl back to a building state with cxx enabled.
2016-03-16 21:11:17 +01:00
Tom Hacohen 72c6236038 Revert "cxx: Migrate C++ binding to the new eo_add syntax"
This reverts commit 48f62ad686.
2016-03-11 12:29:03 +00:00
Vitor Sousa 7973126165 eo_cxx: correct constness of basic Eo C++ wrapper functions 2016-03-09 18:52:10 -03:00
Vitor Sousa 48f62ad686 cxx: Migrate C++ binding to the new eo_add syntax 2016-03-09 15:46:19 -03:00
Vitor Sousa f1a6ff2956 eo_cxx: Fix unused parameter warning when no constructor is required
Test Plan: compile elm

Reviewers: stefan_schmidt

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3778
2016-03-08 10:49:36 -03:00
Stefan Schmidt c634239b63 cxx bindings: get rid of Eo_Event2
This follows the change in EO and fixes some build breaks.
2016-03-07 14:18:56 +01:00
Vitor Sousa 9cbda57bf0 eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
2016-03-03 16:05:40 -03:00
Felipe Magno de Almeida 5c7d78d104 eolian-cxx: Partial fix for generation without eo_do 2016-03-03 16:05:40 -03:00
Daniel Kolesa 863212f84a eolian: more old type api removals 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8614ee1e91 elua: update eolian bindings to new typedecl api 2016-03-03 18:58:11 +00:00
Felipe Magno de Almeida d40b046685 eolian-cxx: Fix C++ events with new Eo_Event_Cb signature 2016-02-29 11:01:04 -03:00
Daniel Kolesa 30bc1d285b eolian: allow silencing of type errors in validation
This allows generators to silence type errors in validation in order
to reduce duplicate error messages when generating multiple files.
Also adjusted the C generator to only emit type errors when generating
Eo header files.

@feature
2016-02-10 16:05:07 +00:00
Felipe Magno de Almeida 3a33ef45bd eina-cxx: Fix instantiating eina domain without eina_init
Added eina_init to eina_domain initialization as to force eina_init to
happen before initialization of global eina domains. This fixes
eolian_js domain in src/bin/eolian_js.
2016-02-03 21:18:08 -02:00
Daniel Kolesa c95350016d eolian: add parsing and generation of hot events
Unfreezable events can now be marked @hot.

@feature
2016-02-02 17:55:01 +00:00
Lauro Moura bc67b215ac js: fix binding after namespace change of connector
Summary:
Update register function after change introduced in
the commit dc56052150
changed the native API.

@fix

Reviewers: q66, cedric, felipealmeida

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-07 16:27:57 -08:00
Stefan Schmidt 2fef60b718 eina_js: Fix documentation generation
Summary:
Fix doxygen's documentation generation.
A bug in doxygen makes it fail with the _libv8_property_callback_info_test
class.
We put a #ifndef EFL_DOXYGEN around it to avoid it being seen by doxygen.

Add a NOTE comment about this.

ref T3005

@fix

Test Plan: make doc must succeed

Reviewers: felipealmeida, stefan_schmidt

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3534
2016-01-05 17:28:29 +01:00
Felipe Magno de Almeida d05a14671e eo-cxx: Removed pessimization use of std::move
Local variables, when returned, are already moved or copy-elised. The
use of std::move removes the possibility of copy-elision, making it
possibly slower. Removed the wrong std::move use.
2015-12-29 11:38:50 -02:00
Felipe Magno de Almeida a14b4bf497 eldbus-cxx: Fixed infinite recursion with post-increment operator
The pre-increment operator was being defined twice and being
implemented as a post-increment. Modified declaration to be
post-increment as it was supposed to be.
2015-12-29 11:37:27 -02:00
Felipe Magno de Almeida 7033cb5d83 eina-cxx: Fixed wrong uses of using directive
Changed using directive for types to typedef's to bring their definitions from base type. Avoiding compilation errors with clang.
2015-12-29 11:36:11 -02:00
Felipe Magno de Almeida a3db1dddd3 efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files

$ configure --with-js=nodejs

and compile normally with:

$ make
$ make install

To use, you have to require efl:

efl = require('efl')

The bindings is divided in two parts: generated and manually
written. The generation uses the Eolian library for parsing Eo files
and generate C++ code that is compiled against V8 interpreter library
to create a efl.node file that can be required in a node.js instance.

@feature
2015-12-23 23:59:40 -02:00
Daniel Kolesa b3867ce395 eolian: turn "undefined type" into its own EOLIAN_TYPE 2015-11-19 14:05:16 +00:00
Daniel Kolesa beacff7959 elua: add eolian_type_aliased_base_get to lua bindings 2015-11-19 13:19:22 +00:00
Felipe Magno de Almeida c2132a0666 eolian-cxx: Fix inheritance from C++ classes after Eo ABI breakage
Fixed removal of op field from Eo_Op_Description and removed
unnecessary use of internal Eo API to implement the Eo API function
for theh constructor of the inherited class.
2015-09-30 17:55:16 -05:00
Tom Hacohen 37f84b7e96 Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway
it's a good opportunity to drop this.

This may cause a slight performance issues with legacy events, such as
smart callbacks. This shouldn't really be a problem as we've migrated away from
them. If it does, we need to migrate the remaining parts. Only relevant
for callbacks that are added before the classes are created, which
shouldn't be possible except for smart, only for old evas callbacks.
2015-09-28 15:09:16 +01:00
Stefan Schmidt b94f9254b1 bindings/eina_cxx: add eina_cxx group as link to main page to find API docs 2015-08-11 14:04:51 +02:00
Daniel Kolesa 825349c7b8 eolian: improve function_full_c_name_get API
It's now generalized to work properly with legacy functions
as well as correctly append suffixes. Thus, it can be easily
used with the documentation generator and in other places.

@feature
2015-07-08 12:10:20 +01:00
Daniel Kolesa cd7a78f2a5 eolian: add API: eolian_declaration_get_by_name
Sorry for last minute new API, but this one is necessary to implement
proper verification of references in docs, which I would like to have
in 1.15. It allows you to retrieve any kind of declaration by full
namespace, so that you can check for an existence of an Eolian decl,
rather than checking every type individually.

@feature
2015-07-07 10:57:24 +01:00
Vitor Sousa dae35333fd eolian_cxx: Use C++ wrappers instead of native types as parameters
Summary:
Using C++ wrapper types in the signature of methods of the generated
classes.
Now, when the type is an Eo type defined in Eolian, eolian_cxx will detect
it and use the equivalent C++ wrapper.

Types defined in Eolian no longer need to be specified in the lookup table,
so removed them from there.

Disable wrapping of non-const char*. The current wrapper (unique_ptr) is
not suited for some required operations like ownership acquisition from
C code.

Fix constructing properties that only have the "set" method.

Fix translation of non-const parameters.

Modified Makefiles to allow proper inclusion of evas_cxx headers required
by some tests and examples.

Move one auxiliary function to another reader to make it more accessible.

@feature

Reviewers: felipealmeida, q66, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2752
2015-06-24 15:23:01 +01:00
Daniel Kolesa 51f49642b4 eolian: remove the outdated and ugly database printer (needs rework) 2015-06-17 14:26:07 +01:00
Daniel Kolesa cf2e94e11b elua: unexpose "old" documentation api from eolian bindings 2015-06-10 17:36:33 +01:00
Daniel Kolesa 944e9eb5b0 elua: bind recent eolian APIs to eolian lua api 2015-06-10 17:30:42 +01:00
Daniel Kolesa 934cfb621c eo_cxx: remove unused parameter 2015-05-29 11:10:41 +01:00
Tom Hacohen 52d998f475 Eo base: Remove the free_func parameter from key_data_set.
This was not really useful and against the Eolian guidelines.
While I promised I won't break things until the 27th, I was ill
(still am), so I'm giving myself a 1 day pass. :P
2015-05-28 17:47:59 +01:00
Daniel Kolesa 3aabb41d1d elua: make eo bindings work with the new generated format 2015-05-28 15:54:35 +01:00
Daniel Kolesa a7dea04b26 eolian: merge eo_file_parse and eot_file_parse 2015-05-22 17:32:21 +01:00
Vitor Sousa f45f3e9f13 eina_cxx, eldbus_cxx: Fix perfect forwarding of arguments
Summary:
Changed some std::move clauses to std::forward<Type> in order to allow
perfect forwarding.

@fix

Reviewers: felipealmeida, JackDanielZ, tasn, q66

Reviewed By: q66

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2508
2015-05-22 10:31:18 +01:00
Daniel Kolesa 54974b074b eolian: remove const_get/const_set support
This was made obsolete by per-accessor values. It was
also hacky and i've wanted to remove it for a while.
2015-05-20 18:05:45 +01:00
Daniel Kolesa 6b91b1bd12 eolian: allow keys/values in property get/set
Sometimes it is necessary to specify a different set of values for a
getter or a setter. This commit allows such specializations. This also
renders @const_get and @const_set useless (soon to be removed).

To function correctly, this required adjustment of several public APIs
as well as deprecation of eolian_function_parameter_get_by_name.

This function was not used in any generator and was pretty much
useless in the first place, so it was removed.

@fix
2015-05-20 17:42:44 +01:00
Daniel Kolesa 5c199857c9 eolian: distinguish between get/set for property keys/values retrieval 2015-05-20 17:03:37 +01:00
Daniel Kolesa 957a89168b eolian: precompute all enum field values (faster runtime, constness) 2015-05-13 18:10:02 +01:00
Daniel Kolesa d2365e6267 eolian: allow forced retrieval of enum field values 2015-05-13 17:57:03 +01:00
Daniel Kolesa ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Felipe Magno de Almeida eaa6961378 eina-cxx: Fix compilation error on clang
Clang implicitly deletes the default-constructor on range_ptrlist, which must be explicitly defined.
2015-04-14 01:06:57 -03: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
Vitor Sousa 72604d4957 eina_cxx: Add methods to get an eina::accessor from an eina::ptr_array
eina::ptr_array was missing the methods to get an eina::accessor from it.
Added these methods.
2015-04-14 01:06:57 -03:00
Vitor Sousa 5619c6bc8d eina_cxx: Fix compatibility between eina::optionals of convertible types
Now an eina::optional that wraps a specific type can be constructed or
have content assigned to it using another eina::optional that wraps a
different type, provided that the two wrapped types are convertible
between each other.

Added "disengage" member function to be able to disengage a R-value
eina::optional of different contained type.
It also adds for increased convenience.

Fix constructing an engaged eina::optional from an disengaged one.

Fix small assertion problem of trying to construct an eina::optional
already flagged as engaged.

Fix incorrect use of std::move. Changed it to std::forward.

Added constexpr property for trivial constructors.

Added auxiliary function "make_optional".

Added unit test to check compatibility between eina::optionals of
convertible types.
2015-04-14 01:06:57 -03:00
Vitor Sousa 5043dcb830 eo_cxx: Fix signal_connection disconnect crash
Fixed crash when disconnecting event inside of its own event callback.
Instead of deleting the callback object immediately during disconnection
(which causes the callback to be freed), the deletion is now scheduled
for later (using ecore_main_loop_thread_safe_call_async).

Updated some Makefiles to proper include ecore now that it is used in
all event wrappers.

Added a unit test to verify crashes under these circumstances.
2015-04-14 01:06:57 -03:00
Vitor Sousa 3b441cdf4a ecore_cxx: Fix perfect forward of callback argument 2015-04-14 01:06:57 -03:00
Vitor Sousa d530389898 eolian_cxx: Add protected methods and events to C++ wrappers and fixes
Using eina::string_view in eolian generated interfaces (instead of
std::string) to allow lightweight passing of both C strings and C++
std::string.

Also, No longer using eina::optional in generated headers for types
that already implements the concept of null state (like Eo wrappers
and eina_accessor).

Also fix allocating callback objects require by class methods
(i.e. static) in static vectors so the memory will be freed when the
programs exit.

Added a new test case for testing callbacks on class methods.

Moved method definitions and supplementary code from generated C++
wrappers to auxiliary header file (.eo.impl.hh) generated together
with the main ".eo.hh" file. Updated Makefiles to list such files in
the compilation and cleanup processes. Updated .gitignore to include
these new generated files.

Made general adjustments on the documentation of generated C++ wrappers

Added "PREDEFINED" preprocessor macro definition in the Doxyfile.in in
order to make some adjustments for better documentation in the C++
generated headers.  Excluding generation of documentation for classes
in the "eo_cxx" namespace (the namespace for "abstract" eolian C++
wrappers).  Now generating the documentation for the events too.
Hiding some auxiliary code from being documented. Some aesthetic
adjustments for generated white space. Generate documentation for the
main constructor of C++ wrappers and added auxiliary grammars to list
parameters names.
2015-04-14 01:06:57 -03:00
Vitor Sousa be58d02cb6 eina_cxx: Add eina::string_view class (non owning reference to string)
Add an implementation of string_view to Eina C++. It is a non owning
reference to a string that allows lightweight argument passing of both
C++ std::string and C strings (const char*) on interfaces.
2015-04-14 01:06:57 -03:00
Cedric BAIL 1a6dfd76e7 eo_cxx: fix after change in internal function naming of Eo. 2015-04-03 16:22:06 +02:00
Daniel Kolesa e663773d9e elua: only check gettability in __index with no keys 2015-04-01 14:22:00 +01:00
Daniel Kolesa 34beed984d elua: clarify comments in eo.lua (explain how the property system works) 2015-04-01 14:20:08 +01:00
Daniel Kolesa c37f68ee46 elua: cast data, not cbs (data stores the cb id) 2015-03-19 15:01:16 +00:00
Daniel Kolesa 9ef2b35317 Revert "elua: more reliable eoid->lua number conversion"
This reverts commit 8bb13b626f.

Seems like this method is not so reliable after all :) Results
in precision loss for Eo IDs, so revert to the old hacky way.
2015-03-19 14:59:15 +00:00
Daniel Kolesa 0bd2fc15e9 elua: unexpose callback add/del events 2015-03-06 14:38:12 +00:00
Daniel Kolesa 8bb13b626f elua: more reliable eoid->lua number conversion 2015-03-06 14:36:25 +00:00
Daniel Kolesa e75cf0db13 elua: remove irrelevant comment 2015-03-06 14:29:37 +00:00
Daniel Kolesa bcc5ba83b3 elua: a func-to-idx cache for eo callbacks 2015-03-06 14:25:29 +00:00
Daniel Kolesa 00e2f5d882 elua: connect the del event on first callback connect 2015-03-04 10:32:16 +00:00
Daniel Kolesa 8eca257bf8 elua: connect del callback by default 2015-03-03 16:38:24 +00:00
Daniel Kolesa a8cfea6911 elua: better callback resource handling 2015-03-03 16:28:41 +00:00
Daniel Kolesa adbac89310 elua: implement callback disconnect + better error handling 2015-03-03 16:16:59 +00:00
Daniel Kolesa e55ecf6d4c elua: initial better callback system with indirection 2015-03-03 16:08:22 +00:00
Daniel Kolesa 4b01fd6298 elua: eo_class_addr_get -> eo_obj_addr_get 2015-03-03 15:59:16 +00:00
Daniel Kolesa c0e20c0c3d elua: callback stubs for basic event handling 2015-03-03 15:43:02 +00:00
Daniel Kolesa c9c13bd650 elua: callback updates in eo bindings
Priority is now supported. Some initial infra for disconnect
has been added.
2015-03-03 15:30:35 +00:00
Daniel Kolesa 34387cfba4 elua: unregister all classes on eo.lua shutdown 2015-03-03 14:05:55 +00:00
Daniel Kolesa 72b26fd49b elua: minor eo bindings optimization 2015-02-26 17:07:33 +00:00
Daniel Kolesa b4dee8db54 elua: update eo bindings for lualian generated code 2015-02-26 15:36:15 +00:00
Daniel Kolesa 212571c406 elua: guarantee multiple inheritance availability on any object 2015-02-25 15:11:52 +00:00
Daniel Kolesa 7806e79024 elua: better mixin behavior (+ fix bad lookup) 2015-02-25 14:01:45 +00:00
Daniel Kolesa f0bf599435 elua: slightly less broken mixin behavior 2015-02-25 12:09:16 +00:00
Daniel Kolesa 4301690535 eolian: add APIs for nullable/optional (+ lua bindings) 2015-02-12 13:24:06 +00:00
Daniel Zaoui d95224b5a7 Eo: add function name to the eo_do pre and post hooks.
This is useful to determine the Eolian class/function.
2015-01-11 16:28:44 +02:00
Daniel Kolesa f58f59d635 elua: convert some eolian binding API results to numbers
This might fix some bugs and is the right thing to do anyway.
2015-01-09 15:45:03 +00:00
Felipe Magno de Almeida c57fa54fc8 eolian-cxx: Fixed mixed inheritance between C and C++ classes
Removed genereation for Eo.Base primitive methods which segfault'ed
on parent_set function.
2015-01-05 18:59:09 -02:00
Vitor Sousa 666b0da912 eolian_cxx: Using eina::optional to handle parameters without @nonull property 2015-01-05 15:52:27 -02:00
Vitor Sousa b713342987 eina_cxx: Allow creating an eina::optional<T> from a type convertible to T 2015-01-05 15:52:27 -02:00
Vitor Sousa 11eff05ead eo_cxx: Implicit conversion from C++ wrapper to void* via address_of operator 2015-01-05 15:52:27 -02:00
Vitor Sousa 4222cd3f50 eolian_cxx: Fix compilation of inheritance from Eolian generated classes
Updated the code for the "inheritance helper" functions and classes
to be in conformance with the new wrapper architecture.

Member variable "parents" of efl::eo::eo_class struct was split in two
member variables, "ancestors" and "parents", the former containing all
Eo class ancestors and the later only the direct bases.
Changed all required files accordingly.

Check to avoid using biding string when the parameter is @out now matches
any variation of "char".

Add default constructor to efl::eo::concrete in order to allow it to be
NULL initialized in the "inheritance helper" classes.

Removed conflicting parent_set member function in the efl::eo::inherit
class.

Removed the "inheritance_extension_function" generator since it is no
longer used.
2015-01-05 15:52:27 -02:00
Larry Jr 2b12114777 allow C++ user create new classes inheriting from Eolian generated Classes 2015-01-05 15:52:27 -02:00
Vitor Sousa 0685885c2a eolian_cxx: Add implicit conversion of the returned pointer of C++ wrappers
Overloaded address-of operator for C++ Eolian wrappers for implicit converting
to any ancestor pointer type when getting the object memory address.

Added new grammars to aid the creation of the pointer wrappers
responsible of doing the implicit conversions.

Added a unit test which checks the address-of overload for arbitrary classes.
Added new .eo files to be used in it.
2015-01-05 15:52:27 -02:00
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 d5ec6c41d9 eolian_cxx: Fix: Using binding type for @out parameter instead of native type
No longer reverting to the native type when the parameter has "@out"
direction.

Added "is_out" member variable to eolian_type class.
With that, generators can keep track of the direction of the parameters.
Also added helper functions "type_is_out" and "type_is_complex".

Created "to_native" functions in eo_cxx_interop.hh to convert binding types
from C++ arguments to the actual C function arguments.
Added static assertions in these functions to enforce compatibility
between the binding and the native type (Required by @out parameters).

Reworked the overload of the "to_c" function for eo::base derivated
objects. Now there is a overload that rely in the compatibility
between the native type and the wrapper, enabling a wrapper to be used as
an output parameter.
2015-01-05 15:52:27 -02:00
Vitor Sousa 64dede1cf1 eolian_cxx: Fix callback handling on generated wrappers
Added callbacks to the event EO_EV_DEL for deleting heap-allocated
function objects. This will enforce that the allocated memory,
necessary for maintaining these callable objects alive, is freed at
least when the underlaying Eo object is destroyed.

Functions and constructor methods are now able to have multiple
callback types.

Removed some unused generators, since they become inconsistent now that
functions are required to handle multiple callback types.

Allocating callback objects in the constructor methods instead of
delaying it until the final constructor is called.

Created some generators to avoid code repetition.

Now the generator parameters_forward_to_c replicate the behavior of the
generator parameters_list. The generator parameters_list was, then,
removed since it have a less intuitive name.

Added a TODO comment regarding the behaviour of simple not translating
callbacks that are not followed by a user data pointer.

The generator parameter_type was moved from "parameters_generator.hh" to
"type_generator.hh" for more consistency and convenience.
2015-01-05 15:52:27 -02:00
Vitor Sousa 2b94d874fe eo_cxx: Fix leakage of eo objects by removing unnecessary "eo_ref"
Removed the call to eo_ref in the conversion from eo::base to the native
Eo* (in "to_c" function) in order to avoid eo objects being leaked.
2015-01-05 15:52:27 -02:00
Vitor Sousa fb5ba0f758 eina_cxx: Fix eina::array cend method recursive calling itself
@fix
2015-01-05 15:52:27 -02:00
Vitor Sousa ee81566ac8 eina_cxx: Fix eina::accessor for C++ Eo wrappers
Created a specialization of the eina::accessor for C++ Eo wrappers.

Created an override of the "accessor" methods in the eina::list specialization
for Eo wrappers (in eina_list.hh). It is necessary to create accessors with the
correct type.

Created specializations of std::is_base_of to avoid compilation errors related
with _Eo_Opaque type.

Added new test cases in "eina_cxx_test_accessor.cc" to test the accessor
specialization.

Added efl::eina::eina_init to the existing test cases to correctly do the
on demand initialization required by the tests.

@fix
2015-01-05 15:52:27 -02:00