felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=38bf8cc92361b67c6d80296d4f335a0ce8ba30f3
commit 38bf8cc92361b67c6d80296d4f335a0ce8ba30f3 Author: Lauro Moura <[email protected]> Date: Mon Mar 19 20:33:43 2018 -0300 eolian-cxx: Add helper method to get all parts Line get_all_methods, gets everything from the inherits too. --- src/lib/eolian_cxx/grammar/klass_def.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index 124c99ba42..21a1d7b8d1 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -1047,6 +1047,22 @@ struct klass_def return ret; } + + std::vector<part_def> get_all_parts() const + { + std::vector<part_def> ret; + + std::copy(parts.cbegin(), parts.cend(), std::back_inserter(ret)); + + for (auto inherit : inherits) + { + klass_def klass(get_klass(inherit, unit), unit); + std::copy(klass.parts.cbegin(), klass.parts.cend(), + std::back_inserter(ret)); + } + + return ret; + } }; struct value_def --
