summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-05 14:45:27 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 11:54:23 +0200
commitcf89ff3f457cd0bef417dd1a1406fd2699626b5e (patch)
treee2bbc4f48d82d396b3dff8260d5e6b731b97917e
parentbedba4f423c01b2912626bebadd10e7c3df57290 (diff)
eolian gen2: initial skeleton for impl gen
-rw-r--r--src/bin/eolian2/main.c10
-rw-r--r--src/bin/eolian2/sources.c7
-rw-r--r--src/bin/eolian2/sources.h1
3 files changed, 17 insertions, 1 deletions
diff --git a/src/bin/eolian2/main.c b/src/bin/eolian2/main.c
index 19ac31529a..c62bade7cc 100644
--- a/src/bin/eolian2/main.c
+++ b/src/bin/eolian2/main.c
@@ -356,8 +356,16 @@ static Eina_Bool
356_write_impl(const char *ofname, const char *ifname) 356_write_impl(const char *ofname, const char *ifname)
357{ 357{
358 INF("generating impl: %s", ofname); 358 INF("generating impl: %s", ofname);
359 Eina_Strbuf *buf = eina_strbuf_new();
360 359
360 const Eolian_Class *cl = eolian_class_get_by_file(ifname);
361 if (!cl)
362 return EINA_FALSE;
363
364 Eina_Strbuf *buf = _read_file(ofname);
365 if (!buf)
366 return EINA_FALSE;
367
368 eo_gen_impl_gen(cl, buf);
361 Eina_Bool ret = _write_file(ofname, buf, EINA_FALSE); 369 Eina_Bool ret = _write_file(ofname, buf, EINA_FALSE);
362 eina_strbuf_free(buf); 370 eina_strbuf_free(buf);
363 return ret; 371 return ret;
diff --git a/src/bin/eolian2/sources.c b/src/bin/eolian2/sources.c
index c64d05ceeb..f05a741b68 100644
--- a/src/bin/eolian2/sources.c
+++ b/src/bin/eolian2/sources.c
@@ -762,3 +762,10 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
762 free(cnamel); 762 free(cnamel);
763 eina_hash_free(_funcs_params_init); 763 eina_hash_free(_funcs_params_init);
764} 764}
765
766void
767eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
768{
769 if (!cl)
770 return;
771}
diff --git a/src/bin/eolian2/sources.h b/src/bin/eolian2/sources.h
index 3a002210d7..05d711458b 100644
--- a/src/bin/eolian2/sources.h
+++ b/src/bin/eolian2/sources.h
@@ -4,5 +4,6 @@
4#include "main.h" 4#include "main.h"
5 5
6void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf); 6void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
7void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
7 8
8#endif 9#endif