Commit Graph

59 Commits

Author SHA1 Message Date
Daniel Kolesa 1172bce7cc eolian_cxx: make address_of test not use multiclass inheritance 2019-01-17 16:14:46 +01:00
Stefan Schmidt ec3685f24f tests: eolian_cxx: ensure property_holder.eo file lands in dist
Summary:
In commit 98b716d0fa the new file was
added but the autotools build system not made aware that it is needed in
dist as well. The missing file broke the eolian_cxx tes suite build in
distcheck.
Depends on D7477

Reviewers: lauromoura, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7478
2018-12-20 11:49:50 +01:00
Lauro Moura dd5c230353 eolian-cxx: Add parent/extensions information to klass_def
Summary: Following new Eolian api.

Test Plan: Run newly added test

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7459
2018-12-14 19:45:44 -02:00
Lauro Moura 98b716d0fa eolian-cxx: Add property_def
Summary:
While individual getters and setters are added to the list of methods of
a class, property_def will hold them as a pair.

This will help defining accessors like C#'s where they're grouped.

Also update some eolian-cxx tests that were commented out.

Depends: D7262

Test Plan: run eolian-cxx tests

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7389
2018-11-30 20:08:00 -02:00
Felipe Magno de Almeida fb5431b7bc eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc
Summary: Test wasn't defining its own dependencies explicitly, which caused race conditions.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6959
2018-09-04 09:10:57 +09:00
Mike Blumenkrantz ad81ef1364 build: define PACKAGE_BUILD_DIR as $(abs_top_builddir) for all test suites
Summary:
this needs to be consistent so that it can be used reliably across suites

also these build flags really need to be consolidated into a single variable
that can be reused

Depends on D6666

Reviewers: devilhorns, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6731
2018-08-08 09:45:30 -04:00
Mike Blumenkrantz 1cff96fb40 build: rewrite remaining $(OBJEXT) rules
fix the naming for these targets based on automake 1.16+ presence and
naming scheme

ref D6594
fix T7154

Differential Revision: https://phab.enlightenment.org/D6675
2018-08-08 12:55:45 +02:00
Stefan Schmidt 7c24975015 build: include newly created blacklist.hpp in dist
Added in 473d5b79c5, the build systemw as
never made aware of this file. make sure we do, so it can land in dist.
2018-05-03 14:43:38 +02:00
Lauro Moura 1d48a5b0c8 efl: general distcheck fixes
Summary:
- Added missing C++ header
- Added missing elementary header
- Removed generated header from elementary_SOURCES
  (Was added by raster in 42dfee37)
  Not sure of what would be the best place for it, though.
- Removed previously removed files from elementary examples Makefile.

Test Plan: Run 'make distcheck'

Reviewers: stefan, felipealmeida

Subscribers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Lauro Moura 46b202b86c eolian-mono: Add documentation generation support
This commit adds the "documentation" generator, which gets the
documentation_def attribute of the given item and generates xml comments
to be exported by MCS.

For items requiring some customization of the generated comments (e.g.
functions and its parameters), the helpers to generate the preamble
(summary), body (paragraphs) and epilogue (currently just the @since
tag) were added.

Currently we do not support converting Eolian references into xmldoc
references.

As we explicitly generate Get/Set methods for properties, for now the
generator tries to get the get/set specific documentation first. If it
is not present, fallback to the common docs.

Later this could be changed to generate the common one as paragraphs of
the Get/Set.

Also some generated code like the wrappers for calling C# methods
from C can be private. This will cleanup the introspection results
and warnings when generating documentation.

Due to this visibility change, the binbuf tests had to be changed
to add redirect calls to the native methods instead of directly
calling the DllImport'd methods.
2017-12-20 19:57:17 -02:00
Felipe Magno de Almeida e67d6484b8 efl-cxx: Fixes to make dist 2017-12-13 14:13:09 -02:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Felipe Magno de Almeida 7f148feea8 eolian-cxx: Added cyclic compilation test 2017-01-18 22:46:26 -02:00
Felipe Magno de Almeida 2bdad3f1d6 eo-cxx: race for promises 2016-09-14 00:33:22 -03:00
Felipe Magno de Almeida a63cfcafc7 eolian-cxx: Implement future template class for C++ 2016-09-11 23:44:05 -03:00
Stefan Schmidt 93eadd76d6 build: split EXTRA_DIST files in src/ off from DISTFILES and handle separately
This is again to avoid the "Argument list too long" error we are hitting more and
more now. Given we just merged elementary, emotion generic players, evas generic
loaders and elm_code it is not surprising we are hitting it again.

This time the number of files being hold in DISTFILES has just grown to big so a
make dist was no longer possible. If one looks at what the DISTFILES variable
from automake holds you can image it grows a lot with all the source files plus
generated files we have in tree now.

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)

To cut off a big chunk but still keep all the other automagic in place for
SOURCE files I went and renamed the EXTRA_DIST in src/ to EXTRA_DIST2 and handle
the files in a dist-hook now.

Another thing to note here is that this also only happens as we have the one big
Makefile with includes. If we go back to per directory Makefiles this problem
should vanish as well. In any case we need a solution for 1.18 now and this is
what I have to offer. If you have a cleaner solution in mind feel welcome to
test it out and if everything we need keeps working (make, make examples,
make check, make benchmark, make dist and make distcheck) go ahead.
2016-06-10 13:04:18 +02:00
Felipe Magno de Almeida 2a3d7860db eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Stefan Schmidt 93ab200d67 eolian-cxx: ship new complex.eo file in dist 2016-05-24 11:42:02 +02:00
Felipe Magno de Almeida 8fd1656898 eolian-cxx: Add test for list and array complex types 2016-05-23 16:08:41 -03:00
Felipe Magno de Almeida e3c8b280c6 c++: Reorganized C++ binding generation
Moved all generation to a single Makefile_Cxx.am file instead of
throughout the whole project. And fixed C++ generation on Elementary
after elm merge.
2016-05-23 15:05:50 -03:00
Felipe Magno de Almeida 6124039c8f eolian-cxx: Added test for the removal of the .Base class requirement
Test creates class with the same name as the namespace of another class
2016-05-04 21:14:26 -03:00
Stefan Schmidt 29397ad8d7 tests: eolian_cxx: fix distcheck after new name_name.eo file got added
We need to ship this file in axtra dst and also make sure we clean up the
generated files afterwards.
2016-04-25 15:16:18 +02:00
Felipe Magno de Almeida 535a069a23 eolian-cxx: Remove .Base requirement
Remove requirement that class can't have the same name as another
class's namespace.
2016-04-21 18:31:53 -03:00
Vincent Torri ee8ff34d7b Test rework #19: Eolian_Cxx 2016-02-16 12:41:06 +00:00
Daniel Kolesa ce65929422 autotools: remove EOLIAN_FLAGS
We don't need to specify each dir separately as Eolian
has been searching recursively for quite a while.
2015-06-01 17:28:45 +01:00
Stefan Schmidt d48c5accea Revert "autotools: enable make check per individual modules."
This reverts commit 35119e7bfd.

Reverted to bring make check back in a working state. Also the way we
want to handle a more modular testing needs discussion.
2015-05-07 20:50:56 +02:00
kabeer khan 35119e7bfd autotools: enable make check per individual modules.
Currently make check runs tests of whole EFL.Enabled running
of tests of individual modules by make check-<modulename>

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:07 +02:00
Felipe Magno de Almeida 94b8dbcbfc eolian-cxx: Fix dependency problem in makefile
Fixed lacking explicit dependency for C Eolian headers, causing random compilation errors in test for eolian-cxx.
2015-04-14 09:09:17 -03:00
Felipe Magno de Almeida b55a8104ad cxx: Made automake files depend on their C counterparts for compilation
Avoids redundancy and maintenance for non-C++ developers.
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 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 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 a732cd2f42 eolian_cxx: Fix occasional build error with eolian_cxx_test_wrapper.cc 2015-02-23 17:53:59 -03: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 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