summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-06-09 10:05:17 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-06-09 10:09:15 +0300
commit4c1cf8741939e345961b14df9ced5d5e80b61538 (patch)
tree78b6fecaab7773a5487ffd972174cbf1daa32968 /src/bin/eolian/eo_generator.c
parentcbee652621510bea285f233d63464ae9e263ad3c (diff)
Eolian/Generator: Fix comments generation.
This patch: - removes the @def from Doxygen, as it is not correct for API functions. - fixes the generation of class comments. When no class description is supplied, no comment should be added.
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo_generator.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 1eab486b6d..9151db6705 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -62,7 +62,6 @@ const Eo_Class *@#class_class_get(void) EINA_CONST;\n\
62static const char 62static const char
63tmpl_eo_funcdef_doxygen[] = "\ 63tmpl_eo_funcdef_doxygen[] = "\
64/**\n\ 64/**\n\
65 * @def %s\n\
66 *\n\ 65 *\n\
67@#desc\n\ 66@#desc\n\
68 *\n\ 67 *\n\
@@ -122,7 +121,7 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
122 if (scope == EOLIAN_SCOPE_PROTECTED) 121 if (scope == EOLIAN_SCOPE_PROTECTED)
123 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", class_env.upper_classname); 122 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", class_env.upper_classname);
124 123
125 eina_strbuf_append_printf(str_func, tmpl_eo_funcdef_doxygen, func_env.lower_eo_func); 124 eina_strbuf_append(str_func, tmpl_eo_funcdef_doxygen);
126 eina_strbuf_append_printf(str_func, "EAPI @#rettype %s(@#full_params);\n", func_env.lower_eo_func); 125 eina_strbuf_append_printf(str_func, "EAPI @#rettype %s(@#full_params);\n", func_env.lower_eo_func);
127 126
128 if (scope == EOLIAN_SCOPE_PROTECTED) 127 if (scope == EOLIAN_SCOPE_PROTECTED)
@@ -230,21 +229,20 @@ eo_header_generate(const Eolian_Class class, Eina_Strbuf *buf)
230 Eina_Strbuf * str_hdr = eina_strbuf_new(); 229 Eina_Strbuf * str_hdr = eina_strbuf_new();
231 230
232 const char *desc = eolian_class_description_get(class); 231 const char *desc = eolian_class_description_get(class);
233 Eina_Strbuf *linedesc = eina_strbuf_new();
234 eina_strbuf_append(linedesc, "/**\n");
235 _class_env_create(class, NULL, &class_env); 232 _class_env_create(class, NULL, &class_env);
236 233
237 if (desc) 234 if (desc)
238 { 235 {
236 Eina_Strbuf *linedesc = eina_strbuf_new();
237 eina_strbuf_append(linedesc, "/**\n");
239 eina_strbuf_append(linedesc, desc); 238 eina_strbuf_append(linedesc, desc);
240 eina_strbuf_replace_all(linedesc, "\n", "\n * "); 239 eina_strbuf_replace_all(linedesc, "\n", "\n * ");
240 eina_strbuf_append(linedesc, "\n */\n");
241 eina_strbuf_replace_all(linedesc, " * \n", " *\n"); /* Remove trailing whitespaces */
242 eina_strbuf_append(buf, eina_strbuf_string_get(linedesc));
243 eina_strbuf_free(linedesc);
241 } 244 }
242 245
243 eina_strbuf_append(linedesc, "\n */\n");
244 eina_strbuf_replace_all(linedesc, " * \n", " *\n"); /* Remove trailing whitespaces */
245 eina_strbuf_append(buf, eina_strbuf_string_get(linedesc));
246 eina_strbuf_free(linedesc);
247
248 _template_fill(str_hdr, tmpl_eo_obj_header, class, NULL, NULL, EINA_TRUE); 246 _template_fill(str_hdr, tmpl_eo_obj_header, class, NULL, NULL, EINA_TRUE);
249 247
250 eina_strbuf_replace_all(str_hdr, "@#EOPREFIX", class_env.upper_eo_prefix); 248 eina_strbuf_replace_all(str_hdr, "@#EOPREFIX", class_env.upper_eo_prefix);