cxx: Define types after forward declarations

This is useful if the types refer to the current class.
This commit is contained in:
Jean-Philippe Andre 2017-11-28 21:32:45 +09:00
parent 052d9dda44
commit 2b0805ddce
3 changed files with 3 additions and 5 deletions

View File

@ -161,13 +161,13 @@ generate(const Eolian_Class* klass, eolian_cxx::options_type const& opts,
, efl::eolian::grammar::context_null{});
std::tuple<std::string, std::set<std::string>&, std::set<std::string>&
, std::string const&
, std::vector<efl::eolian::grammar::attributes::klass_def>&
, std::set<efl::eolian::grammar::attributes::klass_def> const&
, std::string const&
, std::vector<efl::eolian::grammar::attributes::klass_def>&
, std::vector<efl::eolian::grammar::attributes::klass_def>&
> attributes
{guard_name, c_headers, cpp_headers, cpp_types_header, klasses, forward_klasses, klasses, klasses};
{guard_name, c_headers, cpp_headers, klasses, forward_klasses, cpp_types_header, klasses, klasses};
if(opts.out_file == "-")
{

View File

@ -8,8 +8,6 @@
match that.
*/
//type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
type Efl.Signal_Cb: __undefined_type; [[Signal callback.]]
interface Efl.Canvas.Layout_Signal

View File

@ -24,9 +24,9 @@ auto class_header =
<< "#include <Eina.hh>\n"
"#include <Eo.hh>\n"
<< *header_include_directive // sequence<string>
<< string // extra header <string>
<< *class_declaration // sequence<class> | class
<< *class_forward_declaration // sequence<class> | class
<< string // extra header <string>
<< "\nnamespace eo_cxx {\n"
<< *base_class_definition // sequence<class> | class
<< "}\n"