summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-07-23 12:29:53 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-07-23 13:45:25 +0100
commit8d775fc96d302d7ec74e990214377dccdfb1a0a8 (patch)
tree20305b9e376bfbaad47eeb282970e476db1e42e7 /src/bin/eolian_cxx
parent0efeeaf1c0dbfdb921eee7f50c15c73da0e16f22 (diff)
eolian_cxx: fix migration to iterators
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 132c7f750e..f16dbc9a01 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -150,10 +150,30 @@ class_namespace_full(Eolian_Class const& klass)
150 return safe_lower(s); 150 return safe_lower(s);
151} 151}
152 152
153inline efl::eina::iterator<const Eolian_Class> 153/* proxy struct for neater iteration */
154template<typename T>
155struct iterator_iterator
156{
157 iterator_iterator(Eina_Iterator *iter): p_iter(iter) {}
158
159 efl::eina::iterator<T> begin()
160 {
161 return efl::eina::iterator<T>(p_iter);
162 }
163
164 efl::eina::iterator<T> end()
165 {
166 return efl::eina::iterator<T>();
167 }
168
169private:
170 Eina_Iterator *p_iter;
171};
172
173inline iterator_iterator<const Eolian_Class>
154class_list_all() 174class_list_all()
155{ 175{
156 return ::eolian_all_classes_list_get(); 176 return iterator_iterator<const Eolian_Class>(::eolian_all_classes_list_get());
157} 177}
158 178
159inline std::string 179inline std::string