eolian_cxx: Fix callback handling on generated wrappers
authorVitor Sousa <vitorsousasilva@gmail.com>
Wed, 19 Nov 2014 15:59:21 +0000 (13:59 -0200)
committerVitor Sousa <vitorsousasilva@gmail.com>
Mon, 5 Jan 2015 17:52:27 +0000 (15:52 -0200)
commit64dede1cf1d0ab84bb8b0acfb76637621ddcdc8c
tree34f05da881f37bbbae6fd831c31b71cf692f5250
parent2b94d874fec07f3a9defee7e8d3737610af691bd
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.
src/bindings/eo_cxx/eo_cxx_interop.hh
src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh
src/lib/eolian_cxx/grammar/eo_class_functions_generator.hh
src/lib/eolian_cxx/grammar/inheritance_base_generator.hh
src/lib/eolian_cxx/grammar/parameters_generator.hh
src/lib/eolian_cxx/grammar/type_generator.hh