diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-03-05 13:45:14 +0200 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-03-06 15:12:51 +0200 |
commit | 7aebf671bff158bee3ef2876b03b90e0fc2c6984 (patch) | |
tree | da4a9175b7e6fe42318bc3b7a1229d0e940bcf7c /src/bin/eolian/eo1_generator.c | |
parent | b5f0df20dc049888463c7b7caa1819ba5c91bb0c (diff) |
Eolian/Generator: Switch set/get functions generation.
We want to generate first set properties and then get properties to be
in accordance with the current op ids order.
Diffstat (limited to 'src/bin/eolian/eo1_generator.c')
-rw-r--r-- | src/bin/eolian/eo1_generator.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c index f41a72f04e..1fbdca990a 100644 --- a/src/bin/eolian/eo1_generator.c +++ b/src/bin/eolian/eo1_generator.c | |||
@@ -278,18 +278,18 @@ eo1_header_generate(const char *classname, Eina_Strbuf *buf) | |||
278 | _template_fill(str_subid, tmpl_eo_subid, classname, funcname, EINA_FALSE); | 278 | _template_fill(str_subid, tmpl_eo_subid, classname, funcname, EINA_FALSE); |
279 | eo1_fundef_generate(classname, (Eolian_Function)data, UNRESOLVED, str_hdr); | 279 | eo1_fundef_generate(classname, (Eolian_Function)data, UNRESOLVED, str_hdr); |
280 | } | 280 | } |
281 | if (prop_read) | ||
282 | { | ||
283 | sprintf(tmpstr, "%s_get", funcname); | ||
284 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); | ||
285 | eo1_fundef_generate(classname, (Eolian_Function)data, GET, str_hdr); | ||
286 | } | ||
287 | if (prop_write) | 281 | if (prop_write) |
288 | { | 282 | { |
289 | sprintf(tmpstr, "%s_set", funcname); | 283 | sprintf(tmpstr, "%s_set", funcname); |
290 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); | 284 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); |
291 | eo1_fundef_generate(classname, (Eolian_Function)data, SET, str_hdr); | 285 | eo1_fundef_generate(classname, (Eolian_Function)data, SET, str_hdr); |
292 | } | 286 | } |
287 | if (prop_read) | ||
288 | { | ||
289 | sprintf(tmpstr, "%s_get", funcname); | ||
290 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); | ||
291 | eo1_fundef_generate(classname, (Eolian_Function)data, GET, str_hdr); | ||
292 | } | ||
293 | } | 293 | } |
294 | 294 | ||
295 | eina_strbuf_replace_all(str_hdr, "@#list_subid", eina_strbuf_string_get(str_subid)); | 295 | eina_strbuf_replace_all(str_hdr, "@#list_subid", eina_strbuf_string_get(str_subid)); |
@@ -621,18 +621,18 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
621 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; | 621 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; |
622 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; | 622 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; |
623 | 623 | ||
624 | if (prop_read) | 624 | if (prop_write) |
625 | { | 625 | { |
626 | sprintf(tmpstr, "%s_get", funcname); | 626 | sprintf(tmpstr, "%s_set", funcname); |
627 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); | 627 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); |
628 | eo1_bind_func_generate(classname, in_prop, GET, str_bodyf, impl_class); | 628 | eo1_bind_func_generate(classname, in_prop, SET, str_bodyf, impl_class); |
629 | } | 629 | } |
630 | 630 | ||
631 | if (prop_write) | 631 | if (prop_read) |
632 | { | 632 | { |
633 | sprintf(tmpstr, "%s_set", funcname); | 633 | sprintf(tmpstr, "%s_get", funcname); |
634 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); | 634 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); |
635 | eo1_bind_func_generate(classname, in_prop, SET, str_bodyf, impl_class); | 635 | eo1_bind_func_generate(classname, in_prop, GET, str_bodyf, impl_class); |
636 | } | 636 | } |
637 | } | 637 | } |
638 | eina_strbuf_free(tmpl_impl); | 638 | eina_strbuf_free(tmpl_impl); |
@@ -664,15 +664,15 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
664 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; | 664 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; |
665 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; | 665 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; |
666 | 666 | ||
667 | if (prop_read) | 667 | if (prop_write) |
668 | { | 668 | { |
669 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment_get")); | 669 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment_set")); |
670 | 670 | ||
671 | sprintf(tmpstr, "%s_get", funcname); | 671 | sprintf(tmpstr, "%s_set", funcname); |
672 | eo1_eo_op_desc_generate(classname, tmpstr, tmpbuf); | 672 | eo1_eo_op_desc_generate(classname, tmpstr, tmpbuf); |
673 | eina_strbuf_replace_all(tmpbuf, "@#desc", desc); | 673 | eina_strbuf_replace_all(tmpbuf, "@#desc", desc); |
674 | free(desc); | ||
675 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | 674 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); |
675 | free(desc); | ||
676 | 676 | ||
677 | if (!eolian_function_is_virtual_pure(fn)) | 677 | if (!eolian_function_is_virtual_pure(fn)) |
678 | eo1_eo_func_desc_generate(classname, tmpstr, tmpbuf); | 678 | eo1_eo_func_desc_generate(classname, tmpstr, tmpbuf); |
@@ -680,15 +680,15 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
680 | eina_strbuf_reset(tmpbuf); | 680 | eina_strbuf_reset(tmpbuf); |
681 | eina_strbuf_append(str_func, eina_strbuf_string_get(tmpbuf)); | 681 | eina_strbuf_append(str_func, eina_strbuf_string_get(tmpbuf)); |
682 | } | 682 | } |
683 | if (prop_write) | 683 | if (prop_read) |
684 | { | 684 | { |
685 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment_set")); | 685 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment_get")); |
686 | 686 | ||
687 | sprintf(tmpstr, "%s_set", funcname); | 687 | sprintf(tmpstr, "%s_get", funcname); |
688 | eo1_eo_op_desc_generate(classname, tmpstr, tmpbuf); | 688 | eo1_eo_op_desc_generate(classname, tmpstr, tmpbuf); |
689 | eina_strbuf_replace_all(tmpbuf, "@#desc", desc); | 689 | eina_strbuf_replace_all(tmpbuf, "@#desc", desc); |
690 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | ||
691 | free(desc); | 690 | free(desc); |
691 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | ||
692 | 692 | ||
693 | if (!eolian_function_is_virtual_pure(fn)) | 693 | if (!eolian_function_is_virtual_pure(fn)) |
694 | eo1_eo_func_desc_generate(classname, tmpstr, tmpbuf); | 694 | eo1_eo_func_desc_generate(classname, tmpstr, tmpbuf); |