summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:25:02 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:47:04 -0200
commita1f2db255b22052050baf0c04bb72146b22a6e99 (patch)
tree8499c057a7a0054f75fe3ab4719b2cc3659949d5 /src/bindings
parent7f148feea8275d4ae3a366e5aead8170498089a6 (diff)
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.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh12
-rw-r--r--src/bindings/cxx/eo_cxx/eo_cxx_interop.hh6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh b/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh
new file mode 100644
index 0000000..f2aa9e1
--- /dev/null
+++ b/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh
@@ -0,0 +1,12 @@
1#ifndef EFL_CXX_ELDBUS_MODEL_HH
2#define EFL_CXX_ELDBUS_MODEL_HH
3
4#include <Eldbus_Model.h>
5
6#ifdef EFL_BETA_API_SUPPORT
7
8#include <Eldbus_Model.eo.hh>
9
10#endif
11#endif
12
diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index 524863e..7a2f8fb 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -279,11 +279,11 @@ T convert_to_c(V&& object);
279 279
280namespace impl { 280namespace impl {
281 281
282template <typename U, typename T> 282template <typename U, typename T, typename V>
283auto convert_to_c_impl 283auto convert_to_c_impl
284(T&& v, tag<U, U>, typename std::enable_if<std::is_same<typename std::remove_reference<T>::type, U>::value>::type* =0) -> decltype(std::forward<T>(v)) 284(V&& v, tag<U, T>, typename std::enable_if<std::is_same<typename std::remove_reference<T>::type, U>::value>::type* =0) -> decltype(std::forward<V>(v))
285{ 285{
286 return std::forward<T>(v); 286 return std::forward<V>(v);
287} 287}
288 288
289template <typename T> 289template <typename T>