summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:48:40 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:48:40 -0300
commitc61bc0dec0cedbf8913e08e9bb115cebf5345780 (patch)
treee01f2bff06da64dd9861e3e484827d393d106c7f /src/bin/eolian_cxx
parentcc70746d1012d2dfbc758a3f456e2ad25feb3fbc (diff)
eolian-cxx: Added wrappers to handle Eolian_Implements.
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 9277bda019..970274cb1e 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -407,6 +407,64 @@ event_list(Eolian_Class const& klass)
407 return events; 407 return events;
408} 408}
409 409
410inline efl::eina::iterator<const Eolian_Implement>
411implements_get(Eolian_Class const& cls)
412{
413 Eina_Iterator *itr = ::eolian_class_implements_get(&cls);
414 return itr
415 ? efl::eina::iterator<const Eolian_Implement>(itr)
416 : efl::eina::iterator<const Eolian_Implement>();
417}
418
419inline bool
420implement_is_property_get(Eolian_Implement const& impl)
421{
422 return ::eolian_implement_is_prop_get(&impl);
423}
424
425inline bool
426implement_is_property_set(Eolian_Implement const& impl)
427{
428 return ::eolian_implement_is_prop_set(&impl);
429}
430
431inline bool
432implement_is_property(Eolian_Implement const& impl)
433{
434 return implement_is_property_get(impl) ||
435 implement_is_property_set(impl);
436}
437
438inline Eolian_Function const*
439implement_function(Eolian_Implement const& impl)
440{
441 return ::eolian_implement_function_get(&impl, nullptr);
442}
443
444inline Eolian_Class const*
445implement_class(Eolian_Implement const& impl)
446{
447 return ::eolian_implement_class_get(&impl);
448}
449
450// XXX This function shouldn't exist. Eolian should provide some way
451// to determine if a method is a destructor.
452inline bool
453implement_is_destructor(Eolian_Implement const& impl)
454{
455 return !safe_str
456 (::eolian_implement_full_name_get(&impl)).compare("Eo.Base.destructor");
457}
458
459inline bool
460implement_is_visible(Eolian_Implement const& impl)
461{
462 return function_is_visible(*implement_function(impl)) &&
463 !::eolian_implement_is_virtual(&impl) &&
464 !::eolian_implement_is_empty(&impl) &&
465 !implement_is_destructor(impl);
466}
467
410} 468}
411 469
412#endif // EOLIAN_CXX_EOLIAN_WRAPPERS_HH 470#endif // EOLIAN_CXX_EOLIAN_WRAPPERS_HH