summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-05-17 17:14:47 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-05-17 17:50:43 +0100
commit7782c0bcb956263e4b58b9ee5640381fe7b3c4f9 (patch)
tree42845dcc2450ec2815c320379c83c2017fda4f57 /src/bin/eolian_cxx
parentf007380fb948f426d04778965ec4d192fe953cc2 (diff)
eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix when specified. This is no longer the case. Events follow eo_prefix by default now. In order to get around this for classes where this is undesirable, a new field event_prefix was added which takes priority over eo_prefix. If neither is specified, class name is used like previously. @feature
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 8be5f9bec6..c2b8f66a14 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -334,7 +334,7 @@ parameter_type(Eolian_Function_Parameter const& parameter)
334} 334}
335 335
336inline efl::eolian::eo_event 336inline efl::eolian::eo_event
337event_create(Eolian_Class const& klass, const Eolian_Event *event_) 337event_create(const Eolian_Event *event_)
338{ 338{
339 efl::eolian::eo_event event; 339 efl::eolian::eo_event event;
340 const char *name = ::eolian_event_name_get(event_); 340 const char *name = ::eolian_event_name_get(event_);
@@ -346,8 +346,7 @@ event_create(Eolian_Class const& klass, const Eolian_Event *event_)
346 event.scope = eolian_scope_cxx(::eolian_event_scope_get(event_)); 346 event.scope = eolian_scope_cxx(::eolian_event_scope_get(event_));
347 event.is_beta = (::eolian_event_is_beta(event_) != EINA_FALSE); 347 event.is_beta = (::eolian_event_is_beta(event_) != EINA_FALSE);
348 event.name = normalize_spaces(name_); 348 event.name = normalize_spaces(name_);
349 event.eo_name = safe_upper 349 event.eo_name = safe_str(::eolian_event_c_name_get(event_));
350 (find_replace(safe_lower(class_full_name(klass)), ".", "_") + "_EVENT_" + event.name);
351 /* FIXME: use doc api */ 350 /* FIXME: use doc api */
352 event.comment = safe_str(""); 351 event.comment = safe_str("");
353 } 352 }
@@ -362,7 +361,7 @@ event_list(Eolian_Class const& klass)
362 Eolian_Event *e; 361 Eolian_Event *e;
363 EINA_ITERATOR_FOREACH(itr, e) 362 EINA_ITERATOR_FOREACH(itr, e)
364 { 363 {
365 events.push_back(event_create(klass, e)); 364 events.push_back(event_create(e));
366 } 365 }
367 eina_iterator_free(itr); 366 eina_iterator_free(itr);
368 return events; 367 return events;