summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-28 21:32:45 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 15:01:45 +0900
commit2b0805ddce66903c73c82047772f695b70c3b810 (patch)
tree08cd3fe7f63032fa383b358fbb0642a4aa044cc2
parent052d9dda448abe4e12c3f4d1a234eb6896f6487b (diff)
cxx: Define types after forward declarations
This is useful if the types refer to the current class.
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc4
-rw-r--r--src/lib/edje/efl_canvas_layout_signal.eo2
-rw-r--r--src/lib/eolian_cxx/grammar/header.hpp2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index f3f3c36610..3720aa9251 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -161,13 +161,13 @@ generate(const Eolian_Class* klass, eolian_cxx::options_type const& opts,
161 , efl::eolian::grammar::context_null{}); 161 , efl::eolian::grammar::context_null{});
162 162
163 std::tuple<std::string, std::set<std::string>&, std::set<std::string>& 163 std::tuple<std::string, std::set<std::string>&, std::set<std::string>&
164 , std::string const&
165 , std::vector<efl::eolian::grammar::attributes::klass_def>& 164 , std::vector<efl::eolian::grammar::attributes::klass_def>&
166 , std::set<efl::eolian::grammar::attributes::klass_def> const& 165 , std::set<efl::eolian::grammar::attributes::klass_def> const&
166 , std::string const&
167 , std::vector<efl::eolian::grammar::attributes::klass_def>& 167 , std::vector<efl::eolian::grammar::attributes::klass_def>&
168 , std::vector<efl::eolian::grammar::attributes::klass_def>& 168 , std::vector<efl::eolian::grammar::attributes::klass_def>&
169 > attributes 169 > attributes
170 {guard_name, c_headers, cpp_headers, cpp_types_header, klasses, forward_klasses, klasses, klasses}; 170 {guard_name, c_headers, cpp_headers, klasses, forward_klasses, cpp_types_header, klasses, klasses};
171 171
172 if(opts.out_file == "-") 172 if(opts.out_file == "-")
173 { 173 {
diff --git a/src/lib/edje/efl_canvas_layout_signal.eo b/src/lib/edje/efl_canvas_layout_signal.eo
index 67e3f3734d..669c7e4ed9 100644
--- a/src/lib/edje/efl_canvas_layout_signal.eo
+++ b/src/lib/edje/efl_canvas_layout_signal.eo
@@ -8,8 +8,6 @@
8 match that. 8 match that.
9*/ 9*/
10 10
11//type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
12
13type Efl.Signal_Cb: __undefined_type; [[Signal callback.]] 11type Efl.Signal_Cb: __undefined_type; [[Signal callback.]]
14 12
15interface Efl.Canvas.Layout_Signal 13interface Efl.Canvas.Layout_Signal
diff --git a/src/lib/eolian_cxx/grammar/header.hpp b/src/lib/eolian_cxx/grammar/header.hpp
index 4f1df9233f..29435404dd 100644
--- a/src/lib/eolian_cxx/grammar/header.hpp
+++ b/src/lib/eolian_cxx/grammar/header.hpp
@@ -24,9 +24,9 @@ auto class_header =
24 << "#include <Eina.hh>\n" 24 << "#include <Eina.hh>\n"
25 "#include <Eo.hh>\n" 25 "#include <Eo.hh>\n"
26 << *header_include_directive // sequence<string> 26 << *header_include_directive // sequence<string>
27 << string // extra header <string>
28 << *class_declaration // sequence<class> | class 27 << *class_declaration // sequence<class> | class
29 << *class_forward_declaration // sequence<class> | class 28 << *class_forward_declaration // sequence<class> | class
29 << string // extra header <string>
30 << "\nnamespace eo_cxx {\n" 30 << "\nnamespace eo_cxx {\n"
31 << *base_class_definition // sequence<class> | class 31 << *base_class_definition // sequence<class> | class
32 << "}\n" 32 << "}\n"