eolian_cxx: Fix: Using binding type for @out parameter instead of native type
authorVitor Sousa <vitorsousasilva@gmail.com>
Tue, 25 Nov 2014 18:18:08 +0000 (16:18 -0200)
committerVitor Sousa <vitorsousasilva@gmail.com>
Mon, 5 Jan 2015 17:52:27 +0000 (15:52 -0200)
commitd5ec6c41d9bbd9e028503fe98dc6679f8c754140
tree7f25de4940876272593b084e3fc449e516f84dba
parent890ce1f9cf902ccd0011a4041fd90d05f93f3c8a
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.
src/bin/eolian_cxx/eolian_wrappers.hh
src/bindings/eo_cxx/eo_cxx_interop.hh
src/lib/eolian_cxx/eo_types.hh
src/lib/eolian_cxx/grammar/type_generator.hh