summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-05 10:43:50 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-05 11:54:29 +0100
commitdff8d564758daa2804472cf1c72ac0811998d6bb (patch)
treedcb879d4d00d07570bc97900b8fafb75352fc95e /src/bin/eolian
parent99b03d4f3c1a45d95e29e1440f56ffbbe7b651ae (diff)
eolian: use implements only to retrieve functions list
This also changes the implements list so that it also includes virtual functions.
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/eo_generator.c163
-rw-r--r--src/bin/eolian/impl_generator.c35
-rw-r--r--src/bin/eolian/legacy_generator.c85
3 files changed, 125 insertions, 158 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 20f69a0b19..0a292f08aa 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -83,7 +83,7 @@ tmpl_eo_retdesc[] =" * @return %s\n";
83#endif 83#endif
84 84
85static Eina_Bool 85static Eina_Bool
86eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Function_Type ftype, Eina_Strbuf *functext) 86eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolian_Function_Type ftype, Eina_Strbuf *functext)
87{ 87{
88 _eolian_class_func_vars func_env; 88 _eolian_class_func_vars func_env;
89 const char *str_dir[] = {"in", "out", "inout"}; 89 const char *str_dir[] = {"in", "out", "inout"};
@@ -229,10 +229,8 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
229Eina_Bool 229Eina_Bool
230eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf) 230eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
231{ 231{
232 const Eolian_Function_Type ftype_order[] = {EOLIAN_PROPERTY, EOLIAN_METHOD};
233 Eina_Iterator *itr; 232 Eina_Iterator *itr;
234 Eolian_Event *event; 233 Eolian_Event *event;
235 Eolian_Function *fid;
236 char *tmpstr = malloc(0x1FF); 234 char *tmpstr = malloc(0x1FF);
237 Eina_Strbuf * str_hdr = eina_strbuf_new(); 235 Eina_Strbuf * str_hdr = eina_strbuf_new();
238 236
@@ -300,27 +298,27 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
300 } 298 }
301 } 299 }
302 300
303 int i; 301 if ((itr = eolian_class_implements_get(class)))
304 for (i = 0; i < (int)EINA_C_ARRAY_LENGTH(ftype_order); i++)
305 { 302 {
306 itr = eolian_class_functions_get(class, ftype_order[i]); 303 const Eolian_Implement *impl;
307 EINA_ITERATOR_FOREACH(itr, fid) 304 EINA_ITERATOR_FOREACH(itr, impl)
308 { 305 {
309 const Eolian_Function_Type ftype = eolian_function_type_get(fid); 306 if (eolian_implement_class_get(impl) != class)
310 Eina_Bool prop_read = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_GET ) ? EINA_TRUE : EINA_FALSE ; 307 continue;
311 Eina_Bool prop_write = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_SET ) ? EINA_TRUE : EINA_FALSE ; 308 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
312 309 const Eolian_Function *fid = eolian_implement_function_get(impl, &ftype);
313 if (!prop_read && !prop_write) 310 switch (ftype)
314 {
315 eo_fundef_generate(class, fid, EOLIAN_UNRESOLVED, str_hdr);
316 }
317 if (prop_write)
318 { 311 {
312 case EOLIAN_PROP_GET: case EOLIAN_PROP_SET:
313 eo_fundef_generate(class, fid, ftype, str_hdr);
314 break;
315 case EOLIAN_PROPERTY:
319 eo_fundef_generate(class, fid, EOLIAN_PROP_SET, str_hdr); 316 eo_fundef_generate(class, fid, EOLIAN_PROP_SET, str_hdr);
320 }
321 if (prop_read)
322 {
323 eo_fundef_generate(class, fid, EOLIAN_PROP_GET, str_hdr); 317 eo_fundef_generate(class, fid, EOLIAN_PROP_GET, str_hdr);
318 break;
319 default:
320 eo_fundef_generate(class, fid, EOLIAN_UNRESOLVED, str_hdr);
321 break;
324 } 322 }
325 } 323 }
326 eina_iterator_free(itr); 324 eina_iterator_free(itr);
@@ -570,7 +568,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
570} 568}
571 569
572static Eina_Bool 570static Eina_Bool
573eo_op_desc_generate(const Eolian_Class *class, Eolian_Function *fid, Eolian_Function_Type ftype, 571eo_op_desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolian_Function_Type ftype,
574 const char *desc, Eina_Strbuf *buf) 572 const char *desc, Eina_Strbuf *buf)
575{ 573{
576 _eolian_class_func_vars func_env; 574 _eolian_class_func_vars func_env;
@@ -636,12 +634,25 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
636 return EINA_TRUE; 634 return EINA_TRUE;
637} 635}
638 636
637static void
638_desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolian_Function_Type ftype, Eina_Strbuf *tmpbuf, Eina_Strbuf *str_op)
639{
640 const char *funcname = eolian_function_name_get(fid);
641 char tmpstr[256];
642 snprintf(tmpstr, sizeof(tmpstr), "%s%s", funcname, (ftype == EOLIAN_PROP_SET)
643 ? "_set" : ((ftype == EOLIAN_PROP_GET) ? "_get" : ""));
644
645 char *desc = _source_desc_get(eolian_function_description_get(fid, ftype));
646 eo_op_desc_generate(class, fid, ftype, desc, tmpbuf);
647 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf));
648 free(desc);
649}
650
639static Eina_Bool 651static Eina_Bool
640eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf) 652eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
641{ 653{
642 Eina_Bool ret = EINA_FALSE; 654 Eina_Bool ret = EINA_FALSE;
643 Eina_Iterator *itr; 655 Eina_Iterator *itr;
644 Eolian_Function *fn;
645 Eolian_Implement *impl_desc; 656 Eolian_Implement *impl_desc;
646 Eolian_Event *event; 657 Eolian_Event *event;
647 const char *inherit_name; 658 const char *inherit_name;
@@ -777,51 +788,28 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
777 } 788 }
778 eina_iterator_free(itr); 789 eina_iterator_free(itr);
779 790
780 //Properties 791 if ((itr = eolian_class_implements_get(class)))
781 itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
782 EINA_ITERATOR_FOREACH(itr, fn)
783 { 792 {
784 const char *funcname = eolian_function_name_get(fn); 793 const Eolian_Implement *impl;
785 const Eolian_Function_Type ftype = eolian_function_type_get(fn); 794 EINA_ITERATOR_FOREACH(itr, impl)
786 char tmpstr[0xFF];
787
788 Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE;
789 Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE;
790
791 if (prop_write && !eolian_function_is_legacy_only(fn, EOLIAN_PROP_SET))
792 {
793 char *desc = _source_desc_get(eolian_function_description_get(fn, EOLIAN_PROP_SET));
794
795 sprintf(tmpstr, "%s_set", funcname);
796 eo_op_desc_generate(class, fn, EOLIAN_PROP_SET, desc, tmpbuf);
797 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf));
798 free(desc);
799 }
800 if (prop_read && !eolian_function_is_legacy_only(fn, EOLIAN_PROP_GET))
801 { 795 {
802 char *desc = _source_desc_get(eolian_function_description_get(fn, EOLIAN_PROP_GET)); 796 if (eolian_implement_class_get(impl) != class)
803 797 continue;
804 sprintf(tmpstr, "%s_get", funcname); 798 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
805 eo_op_desc_generate(class, fn, EOLIAN_PROP_GET, desc, tmpbuf); 799 const Eolian_Function *fid = eolian_implement_function_get(impl, &ftype);
806 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); 800
807 free(desc); 801 Eina_Bool prop_read = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_GET);
802 Eina_Bool prop_write = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_SET);
803
804 if (!prop_read && !prop_write && !eolian_function_is_legacy_only(fid, EOLIAN_METHOD))
805 _desc_generate(class, fid, EOLIAN_METHOD, tmpbuf, str_op);
806 if (prop_write && !eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET))
807 _desc_generate(class, fid, EOLIAN_PROP_SET, tmpbuf, str_op);
808 if (prop_read && !eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET))
809 _desc_generate(class, fid, EOLIAN_PROP_GET, tmpbuf, str_op);
808 } 810 }
811 eina_iterator_free(itr);
809 } 812 }
810 eina_iterator_free(itr);
811
812 //Methods
813 itr = eolian_class_functions_get(class, EOLIAN_METHOD);
814 EINA_ITERATOR_FOREACH(itr, fn)
815 {
816 if (eolian_function_is_legacy_only(fn, EOLIAN_METHOD))
817 continue;
818
819 char *desc = _source_desc_get(eolian_function_description_get(fn, EOLIAN_METHOD));
820 eo_op_desc_generate(class, fn, EOLIAN_METHOD, desc, tmpbuf);
821 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf));
822 free(desc);
823 }
824 eina_iterator_free(itr);
825 813
826 itr = eolian_class_events_get(class); 814 itr = eolian_class_events_get(class);
827 EINA_ITERATOR_FOREACH(itr, event) 815 EINA_ITERATOR_FOREACH(itr, event)
@@ -921,7 +909,6 @@ eo_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
921{ 909{
922 Eina_Bool ret = EINA_FALSE; 910 Eina_Bool ret = EINA_FALSE;
923 Eina_Iterator *itr; 911 Eina_Iterator *itr;
924 Eolian_Function *fn;
925 912
926 Eina_Strbuf *str_bodyf = eina_strbuf_new(); 913 Eina_Strbuf *str_bodyf = eina_strbuf_new();
927 914
@@ -930,33 +917,36 @@ eo_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
930 917
931 if (!eo_source_beginning_generate(class, buf)) goto end; 918 if (!eo_source_beginning_generate(class, buf)) goto end;
932 919
933 //Properties 920 if ((itr = eolian_class_implements_get(class)))
934 itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
935 EINA_ITERATOR_FOREACH(itr, fn)
936 { 921 {
937 const Eolian_Function_Type ftype = eolian_function_type_get(fn); 922 const Eolian_Implement *impl;
938 923 EINA_ITERATOR_FOREACH(itr, impl)
939 Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE;
940 Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE;
941
942 if (prop_write)
943 {
944 if (!eo_bind_func_generate(class, fn, EOLIAN_PROP_SET, str_bodyf, NULL)) goto end;
945 }
946 if (prop_read)
947 { 924 {
948 if (!eo_bind_func_generate(class, fn, EOLIAN_PROP_GET, str_bodyf, NULL)) goto end; 925 if (eolian_implement_class_get(impl) != class)
926 continue;
927 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
928 const Eolian_Function *fid = eolian_implement_function_get(impl, &ftype);
929 switch (ftype)
930 {
931 case EOLIAN_PROP_GET: case EOLIAN_PROP_SET:
932 if (!eo_bind_func_generate(class, fid, ftype, str_bodyf, NULL))
933 goto end;
934 break;
935 case EOLIAN_PROPERTY:
936 if (!eo_bind_func_generate(class, fid, EOLIAN_PROP_SET, str_bodyf, NULL))
937 goto end;
938 if (!eo_bind_func_generate(class, fid, EOLIAN_PROP_GET, str_bodyf, NULL))
939 goto end;
940 break;
941 default:
942 if (!eo_bind_func_generate(class, fid, EOLIAN_UNRESOLVED, str_bodyf, NULL))
943 goto end;
944 break;
945 }
949 } 946 }
947 eina_iterator_free(itr);
948 itr = NULL;
950 } 949 }
951 eina_iterator_free(itr);
952
953 //Methods
954 itr = eolian_class_functions_get(class, EOLIAN_METHOD);
955 EINA_ITERATOR_FOREACH(itr, fn)
956 {
957 if (!eo_bind_func_generate(class, fn, EOLIAN_UNRESOLVED, str_bodyf, NULL)) goto end;
958 }
959 eina_iterator_free(itr);
960 950
961 eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf)); 951 eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf));
962 eina_strbuf_reset(str_bodyf); 952 eina_strbuf_reset(str_bodyf);
@@ -965,6 +955,7 @@ eo_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
965 955
966 ret = EINA_TRUE; 956 ret = EINA_TRUE;
967end: 957end:
958 if (itr) eina_iterator_free(itr);
968 eina_hash_free(_funcs_params_init); 959 eina_hash_free(_funcs_params_init);
969 _funcs_params_init = NULL; 960 _funcs_params_init = NULL;
970 eina_strbuf_free(str_bodyf); 961 eina_strbuf_free(str_bodyf);
diff --git a/src/bin/eolian/impl_generator.c b/src/bin/eolian/impl_generator.c
index 645982d3c4..5394b63bbb 100644
--- a/src/bin/eolian/impl_generator.c
+++ b/src/bin/eolian/impl_generator.c
@@ -251,27 +251,6 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
251 eina_strbuf_prepend_printf(buffer, "%s", eina_strbuf_string_get(begin)); 251 eina_strbuf_prepend_printf(buffer, "%s", eina_strbuf_string_get(begin));
252 eina_strbuf_free(begin); 252 eina_strbuf_free(begin);
253 253
254 /* Properties */
255 itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
256 EINA_ITERATOR_FOREACH(itr, foo)
257 {
258 const Eolian_Function_Type ftype = eolian_function_type_get(foo);
259 if (ftype == EOLIAN_PROP_SET || ftype == EOLIAN_PROPERTY)
260 _prototype_generate(foo, EOLIAN_PROP_SET, data_type_buf, NULL, buffer);
261
262 if (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROPERTY)
263 _prototype_generate(foo, EOLIAN_PROP_GET, data_type_buf, NULL, buffer);
264 }
265 eina_iterator_free(itr);
266
267 /* Methods */
268 itr = eolian_class_functions_get(class, EOLIAN_METHOD);
269 EINA_ITERATOR_FOREACH(itr, foo)
270 {
271 _prototype_generate(foo, EOLIAN_METHOD, data_type_buf, NULL, buffer);
272 }
273 eina_iterator_free(itr);
274
275 itr = eolian_class_implements_get(class); 254 itr = eolian_class_implements_get(class);
276 if (itr) 255 if (itr)
277 { 256 {
@@ -280,24 +259,26 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
280 EINA_ITERATOR_FOREACH(itr, impl_desc) 259 EINA_ITERATOR_FOREACH(itr, impl_desc)
281 { 260 {
282 Eolian_Function_Type ftype; 261 Eolian_Function_Type ftype;
283 const Eolian_Class *cl = eolian_implement_class_get(impl_desc); 262 Eolian_Implement *idesc = (eolian_implement_class_get(impl_desc) == class) ? NULL : impl_desc;
284 if (cl == class)
285 continue;
286 if (!(foo = eolian_implement_function_get(impl_desc, &ftype))) 263 if (!(foo = eolian_implement_function_get(impl_desc, &ftype)))
287 { 264 {
288 const char *name = names[eolian_implement_is_prop_get(impl_desc) 265 const char *name = names[eolian_implement_is_prop_get(impl_desc)
289 | (eolian_implement_is_prop_set(impl_desc) << 1)]; 266 | (eolian_implement_is_prop_set(impl_desc) << 1)];
290 ERR ("Failed to generate implementation of %s%s - missing form super class", 267 ERR ("Failed to generate implementation of %s%s - missing from class",
291 name, eolian_implement_full_name_get(impl_desc)); 268 name, eolian_implement_full_name_get(impl_desc));
292 goto end; 269 goto end;
293 } 270 }
294 switch (ftype) 271 switch (ftype)
295 { 272 {
296 case EOLIAN_PROP_SET: case EOLIAN_PROP_GET: 273 case EOLIAN_PROP_SET: case EOLIAN_PROP_GET:
297 _prototype_generate(foo, ftype, data_type_buf, impl_desc, buffer); 274 _prototype_generate(foo, ftype, data_type_buf, idesc, buffer);
275 break;
276 case EOLIAN_PROPERTY:
277 _prototype_generate(foo, EOLIAN_PROP_SET, data_type_buf, idesc, buffer);
278 _prototype_generate(foo, EOLIAN_PROP_GET, data_type_buf, idesc, buffer);
298 break; 279 break;
299 default: 280 default:
300 _prototype_generate(foo, eolian_function_type_get(foo), data_type_buf, impl_desc, buffer); 281 _prototype_generate(foo, eolian_function_type_get(foo), data_type_buf, idesc, buffer);
301 break; 282 break;
302 } 283 }
303 } 284 }
diff --git a/src/bin/eolian/legacy_generator.c b/src/bin/eolian/legacy_generator.c
index a21041e46f..d52b52900d 100644
--- a/src/bin/eolian/legacy_generator.c
+++ b/src/bin/eolian/legacy_generator.c
@@ -355,8 +355,6 @@ end:
355Eina_Bool 355Eina_Bool
356legacy_header_generate(const Eolian_Class *class, Eina_Strbuf *buf) 356legacy_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
357{ 357{
358 const Eolian_Function_Type ftype_order[] = {EOLIAN_PROPERTY, EOLIAN_METHOD};
359
360 _class_env_create(class, NULL, &class_env); 358 _class_env_create(class, NULL, &class_env);
361 359
362 const char *desc = eolian_class_description_get(class); 360 const char *desc = eolian_class_description_get(class);
@@ -372,28 +370,28 @@ legacy_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
372 eina_strbuf_free(linedesc); 370 eina_strbuf_free(linedesc);
373 } 371 }
374 372
375 int i; 373 Eina_Iterator *itr = eolian_class_implements_get(class);
376 for (i = 0; i < 2; i++) 374 if (itr)
377 { 375 {
378 void *data; 376 const Eolian_Implement *impl;
379 Eina_Iterator *itr = eolian_class_functions_get(class, ftype_order[i]); 377 EINA_ITERATOR_FOREACH(itr, impl)
380 EINA_ITERATOR_FOREACH(itr, data)
381 { 378 {
382 const Eolian_Function_Type ftype = eolian_function_type_get((Eolian_Function*)data); 379 if (eolian_implement_class_get(impl) != class)
383 Eina_Bool prop_read = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_GET ) ? EINA_TRUE : EINA_FALSE ; 380 continue;
384 Eina_Bool prop_write = (ftype == EOLIAN_PROPERTY || ftype == EOLIAN_PROP_SET ) ? EINA_TRUE : EINA_FALSE ; 381 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
385 382 const Eolian_Function *fid = eolian_implement_function_get(impl, &ftype);
386 if (!prop_read && !prop_write) 383 switch (ftype)
387 { 384 {
388 _eapi_decl_func_generate(class, (Eolian_Function*)data, EOLIAN_METHOD, buf); 385 case EOLIAN_PROP_GET: case EOLIAN_PROP_SET:
389 } 386 _eapi_decl_func_generate(class, fid, ftype, buf);
390 if (prop_write) 387 break;
391 { 388 case EOLIAN_PROPERTY:
392 _eapi_decl_func_generate(class, (Eolian_Function*)data, EOLIAN_PROP_SET, buf); 389 _eapi_decl_func_generate(class, fid, EOLIAN_PROP_SET, buf);
393 } 390 _eapi_decl_func_generate(class, fid, EOLIAN_PROP_GET, buf);
394 if (prop_read) 391 break;
395 { 392 default:
396 _eapi_decl_func_generate(class, (Eolian_Function*)data, EOLIAN_PROP_GET, buf); 393 _eapi_decl_func_generate(class, fid, EOLIAN_METHOD, buf);
394 break;
397 } 395 }
398 } 396 }
399 eina_iterator_free(itr); 397 eina_iterator_free(itr);
@@ -406,40 +404,37 @@ legacy_source_generate(const Eolian_Class *class, Eina_Strbuf *buf)
406{ 404{
407 Eina_Bool ret = EINA_FALSE; 405 Eina_Bool ret = EINA_FALSE;
408 Eina_Iterator *itr; 406 Eina_Iterator *itr;
409 Eolian_Function *fn;
410 407
411 _class_env_create(class, NULL, &class_env); 408 _class_env_create(class, NULL, &class_env);
412 409
413 Eina_Strbuf *tmpbuf = eina_strbuf_new(); 410 Eina_Strbuf *tmpbuf = eina_strbuf_new();
414 Eina_Strbuf *str_bodyf = eina_strbuf_new(); 411 Eina_Strbuf *str_bodyf = eina_strbuf_new();
415 412
416 //Properties 413 if ((itr = eolian_class_implements_get(class)))
417 itr = eolian_class_functions_get(class, EOLIAN_PROPERTY);
418 EINA_ITERATOR_FOREACH(itr, fn)
419 { 414 {
420 const Eolian_Function_Type ftype = eolian_function_type_get(fn); 415 const Eolian_Implement *impl;
421 416 EINA_ITERATOR_FOREACH(itr, impl)
422 Eina_Bool prop_read = ( ftype == EOLIAN_PROP_SET ) ? EINA_FALSE : EINA_TRUE;
423 Eina_Bool prop_write = ( ftype == EOLIAN_PROP_GET ) ? EINA_FALSE : EINA_TRUE;
424
425 if (prop_write)
426 {
427 _eapi_func_generate(class, fn, EOLIAN_PROP_SET, str_bodyf);
428 }
429 if (prop_read)
430 { 417 {
431 _eapi_func_generate(class, fn, EOLIAN_PROP_GET, str_bodyf); 418 if (eolian_implement_class_get(impl) != class)
419 continue;
420 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
421 const Eolian_Function *fid = eolian_implement_function_get(impl, &ftype);
422 switch (ftype)
423 {
424 case EOLIAN_PROP_GET: case EOLIAN_PROP_SET:
425 _eapi_func_generate(class, fid, ftype, str_bodyf);
426 break;
427 case EOLIAN_PROPERTY:
428 _eapi_func_generate(class, fid, EOLIAN_PROP_SET, str_bodyf);
429 _eapi_func_generate(class, fid, EOLIAN_PROP_GET, str_bodyf);
430 break;
431 default:
432 _eapi_func_generate(class, fid, EOLIAN_METHOD, str_bodyf);
433 break;
434 }
432 } 435 }
436 eina_iterator_free(itr);
433 } 437 }
434 eina_iterator_free(itr);
435
436 //Methods
437 itr = eolian_class_functions_get(class, EOLIAN_METHOD);
438 EINA_ITERATOR_FOREACH(itr, fn)
439 {
440 _eapi_func_generate(class, fn, EOLIAN_UNRESOLVED, str_bodyf);
441 }
442 eina_iterator_free(itr);
443 438
444 eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf)); 439 eina_strbuf_append(buf, eina_strbuf_string_get(str_bodyf));
445 440