summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-29 15:30:51 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-29 15:30:51 +0100
commit4785353baf0ff956e05a451bbea5b0035a5e7a0f (patch)
treeb0538cf8a8ef851dd6763c60c37e78a60a68e98d /src/bin/eolian
parentb05f73867546c9a552f85be358163fc021c0ca3f (diff)
eolian: APIs to check if an implement references get/set
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/eo_generator.c8
-rw-r--r--src/bin/eolian/impl_generator.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 9826d4ae72..c4cc89c54c 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -661,6 +661,8 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
661 const char *rets; 661 const char *rets;
662 char *tp = implname; 662 char *tp = implname;
663 663
664 const char *names[] = { "", "getter ", "setter " };
665
664 if ((impl_class = eolian_implement_class_get(impl_desc))) 666 if ((impl_class = eolian_implement_class_get(impl_desc)))
665 { 667 {
666 fnid = eolian_implement_function_get(impl_desc, &ftype); 668 fnid = eolian_implement_function_get(impl_desc, &ftype);
@@ -673,8 +675,10 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
673 675
674 if (!fnid) 676 if (!fnid)
675 { 677 {
676 ERR ("Failed to generate implementation of %s - missing form super class", 678 const char *name = names[eolian_implement_is_prop_get(impl_desc)
677 eolian_implement_full_name_get(impl_desc)); 679 | (eolian_implement_is_prop_set(impl_desc) << 1)];
680 ERR ("Failed to generate implementation of %s%s - missing form super class",
681 name, eolian_implement_full_name_get(impl_desc));
678 goto end; 682 goto end;
679 } 683 }
680 684
diff --git a/src/bin/eolian/impl_generator.c b/src/bin/eolian/impl_generator.c
index e0241990d6..c91ca42d56 100644
--- a/src/bin/eolian/impl_generator.c
+++ b/src/bin/eolian/impl_generator.c
@@ -276,13 +276,16 @@ impl_source_generate(const Eolian_Class *class, Eina_Strbuf *buffer)
276 if (itr) 276 if (itr)
277 { 277 {
278 Eolian_Implement *impl_desc; 278 Eolian_Implement *impl_desc;
279 const char *names[] = { "", "getter ", "setter " };
279 EINA_ITERATOR_FOREACH(itr, impl_desc) 280 EINA_ITERATOR_FOREACH(itr, impl_desc)
280 { 281 {
281 Eolian_Function_Type ftype; 282 Eolian_Function_Type ftype;
282 if (!(foo = eolian_implement_function_get(impl_desc, &ftype))) 283 if (!(foo = eolian_implement_function_get(impl_desc, &ftype)))
283 { 284 {
284 ERR ("Failed to generate implementation of %s - missing form super class", 285 const char *name = names[eolian_implement_is_prop_get(impl_desc)
285 eolian_implement_full_name_get(impl_desc)); 286 | (eolian_implement_is_prop_set(impl_desc) << 1)];
287 ERR ("Failed to generate implementation of %s%s - missing form super class",
288 name, eolian_implement_full_name_get(impl_desc));
286 goto end; 289 goto end;
287 } 290 }
288 switch (ftype) 291 switch (ftype)