summaryrefslogtreecommitdiff
path: root/src/tests/eina_cxx (follow)
AgeCommit message (Collapse)Author
2014-04-09eina-cxx: Modified eina C++ log use syntaxFelipe Magno de Almeida
Summary: Modified syntax for eina C++ log to imitate the macro call as returning a stream. So, instead of: EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain, "foo " << 5); It is now used as: EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain) << "foo " << 5; Which more closely resambles using IOStreams in C++. @feature Reviewers: cedric, barbieri, smohanty Reviewed By: barbieri CC: cedric Differential Revision: https://phab.enlightenment.org/D623
2014-03-10eina-cxx: Added malloc_clone_allocator to use with POD's when wrapping Eina ↵Felipe Magno de Almeida
C structures Summary: Added efl::eina::malloc_clone_allocator to be used with ptr_* data structures for wrapping structures allocated by EFL in C. This allows for example: void foo(Eina_List* l) { efl::eina::ptr_list<int, efl::eina::malloc_clone_allocator> list(l); } If the standard efl::eina::heap_no_clone_allocator is used, the deallocation code uses C++ delete operator, which causes undefined behavior because the allocation was originally done with malloc. Reviewers: cedric CC: savio, cedric Differential Revision: https://phab.enlightenment.org/D614
2014-03-10eina-cxx: Added eina_log support for C++, using IOStreams syntaxFelipe Magno de Almeida
Summary: Added eina_log support for C++ using the following macros: For logging into a domain: EINA_CXX_DOM_LOG EINA_CXX_DOM_LOG_CRIT EINA_CXX_DOM_LOG_ERR EINA_CXX_DOM_LOG_INFO EINA_CXX_DOM_LOG_DBG EINA_CXX_DOM_LOG_WARN And for logging into the default domain: EINA_CXX_LOG EINA_CXX_LOG_CRIT EINA_CXX_LOG_ERR EINA_CXX_LOG_INFO EINA_CXX_LOG_DBG EINA_CXX_LOG_WARN The usage is simple as can be seen in the tests: efl::eina::log_domain domain("error_domain_name"); domain.set_level(efl::eina::log_level::critical); EINA_CXX_DOM_LOG_CRIT(domain, "something went wrong with the following error: " << error); @feature Reviewers: cedric CC: raster, savio, cedric, sanjeev Differential Revision: https://phab.enlightenment.org/D605
2014-03-10eina-cxx: Added range types for containersFelipe Magno de Almeida
Summary: Added inarray, inlist, ptr_array and ptr_list's range types named: range_inarray, range_inlist, range_ptr_array and range_ptr_list. Each has two "flavours": mutable and not mutable. The const versions are parameterized by a const parameter. For example: range_ptr_list<int const> and the mutable doesn't have the const, so: range_ptr_list<int>. The difference between the two is that the const versions can't modify the elements from the sequence, while the mutable allows so. Also, the const receives a Eina_Array const* while the mutable must have a Eina_Array*. Reviewers: cedric CC: savio, cedric Differential Revision: https://phab.enlightenment.org/D613
2014-03-07eina-cxx: renamed efl::eina::eina_value to efl::eina::valueFelipe Magno de Almeida
Reviewers: cedric CC: savio, cedric Differential Revision: https://phab.enlightenment.org/D606 Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-25eina: add a C++ bindings to Eina @feature.Felipe Magno de Almeida
The goal of this library is to make the life of C++ developers easier when having to manipulate Eina datatype by providing a layer to abstract those data type in C++. Check examples for now. Documentation will come soon, but we are pushing that rather sooner to get feedback on those bindings. As you will notice, this library is just composed of headers. There is no .so and we do think it is better this way. Reducing ABI and API stability issue for applications developers who are the primary target of this binding. Also please note that you will need to have C++11 to use this binding. Signed-off-by: Cedric Bail <cedric.bail@free.fr>