diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-04-06 16:41:45 +0300 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-04-08 04:27:01 +0300 |
commit | 912409df3cee321a354d8de6cef95ed3d4e77a54 (patch) | |
tree | 31dcc34b3756337de4a4a59c807c78c5c211b6b9 /src/bin/eolian/eo1_generator.c | |
parent | 2373269ad7322f487520d0c7e1a7a237e5553f12 (diff) |
Eolian: rename enums.
Add the EOLIAN namespace to the function types.
Diffstat (limited to 'src/bin/eolian/eo1_generator.c')
-rw-r--r-- | src/bin/eolian/eo1_generator.c | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c index 52a4ef7fa8..0a9aeb9c97 100644 --- a/src/bin/eolian/eo1_generator.c +++ b/src/bin/eolian/eo1_generator.c | |||
@@ -140,8 +140,8 @@ eo1_fundef_generate(const char *classname, Eolian_Function func, Eolian_Function | |||
140 | char *tmpstr = malloc(0x1FF); | 140 | char *tmpstr = malloc(0x1FF); |
141 | 141 | ||
142 | char *fsuffix = ""; | 142 | char *fsuffix = ""; |
143 | if (ftype == GET) fsuffix = "_get"; | 143 | if (ftype == EOLIAN_PROP_GET) fsuffix = "_get"; |
144 | if (ftype == SET) fsuffix = "_set"; | 144 | if (ftype == EOLIAN_PROP_SET) fsuffix = "_set"; |
145 | 145 | ||
146 | sprintf (funcname, "%s%s", eolian_function_name_get(func), fsuffix); | 146 | sprintf (funcname, "%s%s", eolian_function_name_get(func), fsuffix); |
147 | sprintf (descname, "comment%s", fsuffix); | 147 | sprintf (descname, "comment%s", fsuffix); |
@@ -196,13 +196,13 @@ eo1_fundef_generate(const char *classname, Eolian_Function func, Eolian_Function | |||
196 | Eina_Bool add_star = EINA_FALSE; | 196 | Eina_Bool add_star = EINA_FALSE; |
197 | Eolian_Parameter_Dir pdir; | 197 | Eolian_Parameter_Dir pdir; |
198 | eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc); | 198 | eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc); |
199 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == GET); | 199 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET); |
200 | if (ftype == GET) { | 200 | if (ftype == EOLIAN_PROP_GET) { |
201 | add_star = EINA_TRUE; | 201 | add_star = EINA_TRUE; |
202 | pdir = EOLIAN_OUT_PARAM; | 202 | pdir = EOLIAN_OUT_PARAM; |
203 | } | 203 | } |
204 | if (ftype == SET) pdir = EOLIAN_IN_PARAM; | 204 | if (ftype == EOLIAN_PROP_SET) pdir = EOLIAN_IN_PARAM; |
205 | if (ftype == UNRESOLVED || ftype == METHOD_FUNC) add_star = (pdir == EOLIAN_OUT_PARAM); | 205 | if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM); |
206 | Eina_Bool had_star = !!strchr(ptype, '*'); | 206 | Eina_Bool had_star = !!strchr(ptype, '*'); |
207 | 207 | ||
208 | const char *dir_str = str_dir[(int)pdir]; | 208 | const char *dir_str = str_dir[(int)pdir]; |
@@ -246,7 +246,7 @@ eo1_fundef_generate(const char *classname, Eolian_Function func, Eolian_Function | |||
246 | Eina_Bool | 246 | Eina_Bool |
247 | eo1_header_generate(const char *classname, Eina_Strbuf *buf) | 247 | eo1_header_generate(const char *classname, Eina_Strbuf *buf) |
248 | { | 248 | { |
249 | const Eolian_Function_Type ftype_order[] = {CONSTRUCTOR, PROPERTY_FUNC, METHOD_FUNC}; | 249 | const Eolian_Function_Type ftype_order[] = {EOLIAN_CTOR, EOLIAN_PROPERTY, EOLIAN_METHOD}; |
250 | const Eina_List *l; | 250 | const Eina_List *l; |
251 | void *data; | 251 | void *data; |
252 | char *tmpstr = malloc(0x1FF); | 252 | char *tmpstr = malloc(0x1FF); |
@@ -259,10 +259,10 @@ eo1_header_generate(const char *classname, Eina_Strbuf *buf) | |||
259 | return EINA_FALSE; | 259 | return EINA_FALSE; |
260 | } | 260 | } |
261 | 261 | ||
262 | if (eolian_class_functions_list_get(classname, CONSTRUCTOR) || | 262 | if (eolian_class_functions_list_get(classname, EOLIAN_CTOR) || |
263 | eolian_class_functions_list_get(classname, DESTRUCTOR) || | 263 | eolian_class_functions_list_get(classname, EOLIAN_DTOR) || |
264 | eolian_class_functions_list_get(classname, PROPERTY_FUNC) || | 264 | eolian_class_functions_list_get(classname, EOLIAN_PROPERTY) || |
265 | eolian_class_functions_list_get(classname, METHOD_FUNC)) | 265 | eolian_class_functions_list_get(classname, EOLIAN_METHOD)) |
266 | { | 266 | { |
267 | no_ids = EINA_FALSE; | 267 | no_ids = EINA_FALSE; |
268 | } | 268 | } |
@@ -308,25 +308,25 @@ eo1_header_generate(const char *classname, Eina_Strbuf *buf) | |||
308 | { | 308 | { |
309 | const Eolian_Function_Type ftype = eolian_function_type_get((Eolian_Function)data); | 309 | const Eolian_Function_Type ftype = eolian_function_type_get((Eolian_Function)data); |
310 | const char *funcname = eolian_function_name_get((Eolian_Function)data); | 310 | const char *funcname = eolian_function_name_get((Eolian_Function)data); |
311 | Eina_Bool prop_read = (ftype == PROPERTY_FUNC || ftype == GET ) ? EINA_TRUE : EINA_FALSE ; | 311 | Eina_Bool prop_read = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_GET ) ? EINA_TRUE : EINA_FALSE ; |
312 | Eina_Bool prop_write = (ftype == PROPERTY_FUNC || ftype == SET ) ? EINA_TRUE : EINA_FALSE ; | 312 | Eina_Bool prop_write = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_SET ) ? EINA_TRUE : EINA_FALSE ; |
313 | 313 | ||
314 | if (!prop_read && !prop_write) | 314 | if (!prop_read && !prop_write) |
315 | { | 315 | { |
316 | _template_fill(str_subid, tmpl_eo_subid, classname, funcname, EINA_FALSE); | 316 | _template_fill(str_subid, tmpl_eo_subid, classname, funcname, EINA_FALSE); |
317 | eo1_fundef_generate(classname, (Eolian_Function)data, UNRESOLVED, str_hdr); | 317 | eo1_fundef_generate(classname, (Eolian_Function)data, EOLIAN_UNRESOLVED, str_hdr); |
318 | } | 318 | } |
319 | if (prop_write) | 319 | if (prop_write) |
320 | { | 320 | { |
321 | sprintf(tmpstr, "%s_set", funcname); | 321 | sprintf(tmpstr, "%s_set", funcname); |
322 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); | 322 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); |
323 | eo1_fundef_generate(classname, (Eolian_Function)data, SET, str_hdr); | 323 | eo1_fundef_generate(classname, (Eolian_Function)data, EOLIAN_PROP_SET, str_hdr); |
324 | } | 324 | } |
325 | if (prop_read) | 325 | if (prop_read) |
326 | { | 326 | { |
327 | sprintf(tmpstr, "%s_get", funcname); | 327 | sprintf(tmpstr, "%s_get", funcname); |
328 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); | 328 | _template_fill(str_subid, tmpl_eo_subid, classname, tmpstr, EINA_FALSE); |
329 | eo1_fundef_generate(classname, (Eolian_Function)data, GET, str_hdr); | 329 | eo1_fundef_generate(classname, (Eolian_Function)data, EOLIAN_PROP_GET, str_hdr); |
330 | } | 330 | } |
331 | eina_strbuf_replace_all(str_subid, "@#EOPREFIX", current_eo_prefix_upper); | 331 | eina_strbuf_replace_all(str_subid, "@#EOPREFIX", current_eo_prefix_upper); |
332 | } | 332 | } |
@@ -378,7 +378,7 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun | |||
378 | rettype = eolian_function_return_type_get(funcid, ftype); | 378 | rettype = eolian_function_return_type_get(funcid, ftype); |
379 | if (rettype && !strcmp(rettype, "void")) rettype = NULL; | 379 | if (rettype && !strcmp(rettype, "void")) rettype = NULL; |
380 | retname = "ret"; | 380 | retname = "ret"; |
381 | if (ftype == GET) | 381 | if (ftype == EOLIAN_PROP_GET) |
382 | { | 382 | { |
383 | suffix = "_get"; | 383 | suffix = "_get"; |
384 | add_star = EINA_TRUE; | 384 | add_star = EINA_TRUE; |
@@ -394,7 +394,7 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun | |||
394 | } | 394 | } |
395 | } | 395 | } |
396 | } | 396 | } |
397 | if (ftype == SET) | 397 | if (ftype == EOLIAN_PROP_SET) |
398 | { | 398 | { |
399 | suffix = "_set"; | 399 | suffix = "_set"; |
400 | } | 400 | } |
@@ -413,13 +413,13 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun | |||
413 | const char *pname; | 413 | const char *pname; |
414 | const char *ptype; | 414 | const char *ptype; |
415 | eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, NULL); | 415 | eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, NULL); |
416 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == GET); | 416 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET); |
417 | eina_strbuf_append_printf(va_args, " %s%s %s = va_arg(*list, %s%s);\n", | 417 | eina_strbuf_append_printf(va_args, " %s%s %s = va_arg(*list, %s%s);\n", |
418 | ftype == GET && is_const?"const ":"", ptype, pname, | 418 | ftype == EOLIAN_PROP_GET && is_const?"const ":"", ptype, pname, |
419 | ftype == GET && is_const?"const ":"", _varg_upgr(ptype)); | 419 | ftype == EOLIAN_PROP_GET && is_const?"const ":"", _varg_upgr(ptype)); |
420 | eina_strbuf_append_printf(params, ", %s", pname); | 420 | eina_strbuf_append_printf(params, ", %s", pname); |
421 | eina_strbuf_append_printf(full_params, ", %s%s %s", | 421 | eina_strbuf_append_printf(full_params, ", %s%s %s", |
422 | ftype == GET && eolian_parameter_const_attribute_get(data, ftype == GET)?"const ":"", | 422 | ftype == EOLIAN_PROP_GET && eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"", |
423 | ptype, pname); | 423 | ptype, pname); |
424 | } | 424 | } |
425 | if (!var_as_ret) | 425 | if (!var_as_ret) |
@@ -430,9 +430,9 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun | |||
430 | const char *ptype; | 430 | const char *ptype; |
431 | Eolian_Parameter_Dir pdir; | 431 | Eolian_Parameter_Dir pdir; |
432 | eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, NULL); | 432 | eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, NULL); |
433 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == GET); | 433 | Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET); |
434 | Eina_Bool had_star = !!strchr(ptype, '*'); | 434 | Eina_Bool had_star = !!strchr(ptype, '*'); |
435 | if (ftype == UNRESOLVED || ftype == METHOD_FUNC) add_star = (pdir == EOLIAN_OUT_PARAM); | 435 | if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM); |
436 | eina_strbuf_append_printf(va_args, " %s%s%s%s%s = va_arg(*list, %s%s%s%s);\n", | 436 | eina_strbuf_append_printf(va_args, " %s%s%s%s%s = va_arg(*list, %s%s%s%s);\n", |
437 | is_const?"const ":"", ptype, had_star?"":" ", add_star?"*":"", pname, | 437 | is_const?"const ":"", ptype, had_star?"":" ", add_star?"*":"", pname, |
438 | is_const?"const ":"", add_star ? ptype : _varg_upgr(ptype), !had_star && add_star?" ":"", add_star?"*":""); | 438 | is_const?"const ":"", add_star ? ptype : _varg_upgr(ptype), !had_star && add_star?" ":"", add_star?"*":""); |
@@ -536,10 +536,10 @@ eo1_source_beginning_generate(const char *classname, Eina_Strbuf *buf) | |||
536 | Eina_Strbuf *tmpbuf = eina_strbuf_new(); | 536 | Eina_Strbuf *tmpbuf = eina_strbuf_new(); |
537 | Eina_Strbuf *str_ev = eina_strbuf_new(); | 537 | Eina_Strbuf *str_ev = eina_strbuf_new(); |
538 | 538 | ||
539 | if (eolian_class_functions_list_get(classname, CONSTRUCTOR) || | 539 | if (eolian_class_functions_list_get(classname, EOLIAN_CTOR) || |
540 | eolian_class_functions_list_get(classname, DESTRUCTOR) || | 540 | eolian_class_functions_list_get(classname, EOLIAN_DTOR) || |
541 | eolian_class_functions_list_get(classname, PROPERTY_FUNC) || | 541 | eolian_class_functions_list_get(classname, EOLIAN_PROPERTY) || |
542 | eolian_class_functions_list_get(classname, METHOD_FUNC)) | 542 | eolian_class_functions_list_get(classname, EOLIAN_METHOD)) |
543 | { | 543 | { |
544 | _template_fill(NULL, NULL, classname, NULL, EINA_TRUE); | 544 | _template_fill(NULL, NULL, classname, NULL, EINA_TRUE); |
545 | eina_strbuf_append_printf(buf, "EAPI Eo_Op @#EOPREFIX_BASE_ID = EO_NOOP;\n"); | 545 | eina_strbuf_append_printf(buf, "EAPI Eo_Op @#EOPREFIX_BASE_ID = EO_NOOP;\n"); |
@@ -644,14 +644,14 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
644 | if (ctor_fn) | 644 | if (ctor_fn) |
645 | { | 645 | { |
646 | _template_fill(str_func, tmpl_eobase_func_desc, classname, "constructor", EINA_FALSE); | 646 | _template_fill(str_func, tmpl_eobase_func_desc, classname, "constructor", EINA_FALSE); |
647 | eo1_bind_func_generate(classname, ctor_fn, UNRESOLVED, str_bodyf, NULL); | 647 | eo1_bind_func_generate(classname, ctor_fn, EOLIAN_UNRESOLVED, str_bodyf, NULL); |
648 | } | 648 | } |
649 | // default destructor | 649 | // default destructor |
650 | Eolian_Function dtor_fn = eolian_class_default_destructor_get(classname); | 650 | Eolian_Function dtor_fn = eolian_class_default_destructor_get(classname); |
651 | if (dtor_fn) | 651 | if (dtor_fn) |
652 | { | 652 | { |
653 | _template_fill(str_func, tmpl_eobase_func_desc, classname, "destructor", EINA_FALSE); | 653 | _template_fill(str_func, tmpl_eobase_func_desc, classname, "destructor", EINA_FALSE); |
654 | eo1_bind_func_generate(classname, dtor_fn, UNRESOLVED, str_bodyf, NULL); | 654 | eo1_bind_func_generate(classname, dtor_fn, EOLIAN_UNRESOLVED, str_bodyf, NULL); |
655 | } | 655 | } |
656 | 656 | ||
657 | //Implements - TODO one generate func def for all | 657 | //Implements - TODO one generate func def for all |
@@ -681,11 +681,11 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
681 | Eolian_Function in_prop = NULL; | 681 | Eolian_Function in_prop = NULL; |
682 | const Eina_List *itr2; | 682 | const Eina_List *itr2; |
683 | Eolian_Function fnid; | 683 | Eolian_Function fnid; |
684 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, CONSTRUCTOR), itr2, fnid) | 684 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, EOLIAN_CTOR), itr2, fnid) |
685 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_meth = fnid; | 685 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_meth = fnid; |
686 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, METHOD_FUNC), itr2, fnid) | 686 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, EOLIAN_METHOD), itr2, fnid) |
687 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_meth = fnid; | 687 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_meth = fnid; |
688 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, PROPERTY_FUNC), itr2, fnid) | 688 | EINA_LIST_FOREACH(eolian_class_functions_list_get((char *)impl_class, EOLIAN_PROPERTY), itr2, fnid) |
689 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_prop = fnid; | 689 | if (fnid && !strcmp(eolian_function_name_get(fnid), funcname)) in_prop = fnid; |
690 | 690 | ||
691 | if (!in_meth && !in_prop) | 691 | if (!in_meth && !in_prop) |
@@ -694,15 +694,15 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
694 | goto end; | 694 | goto end; |
695 | } | 695 | } |
696 | 696 | ||
697 | /* e.g event_freeze can be a property or a method. If a type is explicit (property SET/GET), | 697 | /* e.g event_freeze can be a property or a method. If a type is explicit (property EOLIAN_PROP_SET/EOLIAN_PROP_GET), |
698 | * we assume it can't be a method. | 698 | * we assume it can't be a method. |
699 | */ | 699 | */ |
700 | if ((in_meth && in_prop) && (ftype == SET || ftype == GET)) in_meth = NULL; | 700 | if ((in_meth && in_prop) && (ftype == EOLIAN_PROP_SET || ftype == EOLIAN_PROP_GET)) in_meth = NULL; |
701 | 701 | ||
702 | if (in_meth) | 702 | if (in_meth) |
703 | { | 703 | { |
704 | _template_fill(str_func, tmpl_impl_str, impl_class, funcname, EINA_FALSE); | 704 | _template_fill(str_func, tmpl_impl_str, impl_class, funcname, EINA_FALSE); |
705 | eo1_bind_func_generate(classname, in_meth, UNRESOLVED, str_bodyf, impl_class); | 705 | eo1_bind_func_generate(classname, in_meth, EOLIAN_UNRESOLVED, str_bodyf, impl_class); |
706 | continue; | 706 | continue; |
707 | } | 707 | } |
708 | 708 | ||
@@ -710,29 +710,29 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
710 | { | 710 | { |
711 | char tmpstr[0xFF]; | 711 | char tmpstr[0xFF]; |
712 | 712 | ||
713 | if ((ftype != GET) && (ftype != SET)) ftype = eolian_function_type_get(in_prop); | 713 | if ((ftype != EOLIAN_PROP_GET) && (ftype != EOLIAN_PROP_SET)) ftype = eolian_function_type_get(in_prop); |
714 | 714 | ||
715 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; | 715 | Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE; |
716 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; | 716 | Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE; |
717 | 717 | ||
718 | if (prop_write) | 718 | if (prop_write) |
719 | { | 719 | { |
720 | sprintf(tmpstr, "%s_set", funcname); | 720 | sprintf(tmpstr, "%s_set", funcname); |
721 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); | 721 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); |
722 | eo1_bind_func_generate(classname, in_prop, SET, str_bodyf, impl_class); | 722 | eo1_bind_func_generate(classname, in_prop, EOLIAN_PROP_SET, str_bodyf, impl_class); |
723 | } | 723 | } |
724 | 724 | ||
725 | if (prop_read) | 725 | if (prop_read) |
726 | { | 726 | { |
727 | sprintf(tmpstr, "%s_get", funcname); | 727 | sprintf(tmpstr, "%s_get", funcname); |
728 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); | 728 | _template_fill(str_func, tmpl_impl_str, impl_class, tmpstr, EINA_FALSE); |
729 | eo1_bind_func_generate(classname, in_prop, GET, str_bodyf, impl_class); | 729 | eo1_bind_func_generate(classname, in_prop, EOLIAN_PROP_GET, str_bodyf, impl_class); |
730 | } | 730 | } |
731 | } | 731 | } |
732 | } | 732 | } |
733 | 733 | ||
734 | //Constructors | 734 | //Constructors |
735 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, CONSTRUCTOR), itr, fn) | 735 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, EOLIAN_CTOR), itr, fn) |
736 | { | 736 | { |
737 | const char *funcname = eolian_function_name_get(fn); | 737 | const char *funcname = eolian_function_name_get(fn); |
738 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment")); | 738 | char *desc = _source_desc_get(eolian_function_description_get(fn, "comment")); |
@@ -743,18 +743,18 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
743 | eo1_eo_func_desc_generate(classname, NULL, funcname, tmpbuf); | 743 | eo1_eo_func_desc_generate(classname, NULL, funcname, tmpbuf); |
744 | eina_strbuf_append(str_func, eina_strbuf_string_get(tmpbuf)); | 744 | eina_strbuf_append(str_func, eina_strbuf_string_get(tmpbuf)); |
745 | 745 | ||
746 | eo1_bind_func_generate(classname, fn, UNRESOLVED, str_bodyf, NULL); | 746 | eo1_bind_func_generate(classname, fn, EOLIAN_UNRESOLVED, str_bodyf, NULL); |
747 | } | 747 | } |
748 | 748 | ||
749 | //Properties | 749 | //Properties |
750 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, PROPERTY_FUNC), itr, fn) | 750 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, EOLIAN_PROPERTY), itr, fn) |
751 | { | 751 | { |
752 | const char *funcname = eolian_function_name_get(fn); | 752 | const char *funcname = eolian_function_name_get(fn); |
753 | const Eolian_Function_Type ftype = eolian_function_type_get(fn); | 753 | const Eolian_Function_Type ftype = eolian_function_type_get(fn); |
754 | char tmpstr[0xFF]; | 754 | char tmpstr[0xFF]; |
755 | 755 | ||
756 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; | 756 | Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE; |
757 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; | 757 | Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE; |
758 | 758 | ||
759 | if (prop_write) | 759 | if (prop_write) |
760 | { | 760 | { |
@@ -765,7 +765,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
765 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | 765 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); |
766 | free(desc); | 766 | free(desc); |
767 | 767 | ||
768 | if (!eolian_function_is_virtual_pure(fn, SET)) | 768 | if (!eolian_function_is_virtual_pure(fn, EOLIAN_PROP_SET)) |
769 | eo1_eo_func_desc_generate(classname, NULL, tmpstr, tmpbuf); | 769 | eo1_eo_func_desc_generate(classname, NULL, tmpstr, tmpbuf); |
770 | else | 770 | else |
771 | eina_strbuf_reset(tmpbuf); | 771 | eina_strbuf_reset(tmpbuf); |
@@ -780,7 +780,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
780 | free(desc); | 780 | free(desc); |
781 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | 781 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); |
782 | 782 | ||
783 | if (!eolian_function_is_virtual_pure(fn, GET)) | 783 | if (!eolian_function_is_virtual_pure(fn, EOLIAN_PROP_GET)) |
784 | eo1_eo_func_desc_generate(classname, NULL, tmpstr, tmpbuf); | 784 | eo1_eo_func_desc_generate(classname, NULL, tmpstr, tmpbuf); |
785 | else | 785 | else |
786 | eina_strbuf_reset(tmpbuf); | 786 | eina_strbuf_reset(tmpbuf); |
@@ -789,7 +789,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
789 | } | 789 | } |
790 | 790 | ||
791 | //Methods | 791 | //Methods |
792 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, METHOD_FUNC), itr, fn) | 792 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, EOLIAN_METHOD), itr, fn) |
793 | { | 793 | { |
794 | const char *funcname = eolian_function_name_get(fn); | 794 | const char *funcname = eolian_function_name_get(fn); |
795 | 795 | ||
@@ -798,7 +798,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) | |||
798 | free(desc); | 798 | free(desc); |
799 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); | 799 | eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); |
800 | 800 | ||
801 | if (!eolian_function_is_virtual_pure(fn, METHOD_FUNC)) | 801 | if (!eolian_function_is_virtual_pure(fn, EOLIAN_METHOD)) |
802 | eo1_eo_func_desc_generate(classname, NULL, funcname, tmpbuf); | 802 | eo1_eo_func_desc_generate(classname, NULL, funcname, tmpbuf); |
803 | else | 803 | else |
804 | eina_strbuf_reset(tmpbuf); | 804 | eina_strbuf_reset(tmpbuf); |
@@ -909,27 +909,27 @@ eo_source_generate(const char *classname, int eo_version EINA_UNUSED, Eina_Strbu | |||
909 | if (!eo1_source_beginning_generate(classname, buf)) goto end; | 909 | if (!eo1_source_beginning_generate(classname, buf)) goto end; |
910 | 910 | ||
911 | //Properties | 911 | //Properties |
912 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, PROPERTY_FUNC), itr, fn) | 912 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, EOLIAN_PROPERTY), itr, fn) |
913 | { | 913 | { |
914 | const Eolian_Function_Type ftype = eolian_function_type_get(fn); | 914 | const Eolian_Function_Type ftype = eolian_function_type_get(fn); |
915 | 915 | ||
916 | Eina_Bool prop_read = ( ftype == SET ) ? EINA_FALSE : EINA_TRUE; | 916 | Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE; |
917 | Eina_Bool prop_write = ( ftype == GET ) ? EINA_FALSE : EINA_TRUE; | 917 | Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE; |
918 | 918 | ||
919 | if (prop_write) | 919 | if (prop_write) |
920 | { | 920 | { |
921 | if (!eo1_bind_func_generate(classname, fn, SET, str_bodyf, NULL)) goto end; | 921 | if (!eo1_bind_func_generate(classname, fn, EOLIAN_PROP_SET, str_bodyf, NULL)) goto end; |
922 | } | 922 | } |
923 | if (prop_read) | 923 | if (prop_read) |
924 | { | 924 | { |
925 | if (!eo1_bind_func_generate(classname, fn, GET, str_bodyf, NULL)) goto end; | 925 | if (!eo1_bind_func_generate(classname, fn, EOLIAN_PROP_GET, str_bodyf, NULL)) goto end; |
926 | } | 926 | } |
927 | } | 927 | } |
928 | 928 | ||
929 | //Methods | 929 | //Methods |
930 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, METHOD_FUNC), itr, fn) | 930 | EINA_LIST_FOREACH(eolian_class_functions_list_get(classname, EOLIAN_METHOD), itr, fn) |
931 | { | 931 | { |
932 | if (!eo1_bind_func_generate(classname, fn, UNRESOLVED, str_bodyf, NULL)) goto end; | 932 | if (!eo1_bind_func_generate(classname, fn, EOLIAN_UNRESOLVED, str_bodyf, NULL)) goto end; |
933 | } | 933 | } |
934 | 934 | ||
935 | eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf)); | 935 | eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf)); |