summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-12-17 11:34:30 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-12-17 11:34:30 -0300
commitf90a97470d54edb20116e55739025e71cdfbbd92 (patch)
tree6b77b487baa2c4a4632fe71252438bab32434d32 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parent7855a97f0d1cb0c1caac0180ae3a6a91e627ad06 (diff)
eina_mono: replace EinaAccessor and EinaIerator with IEnumerable
Summary: Eina.Accessor<T> => System.Collections.IEnumerable<T> Eina.Iterator<T> => System.Collections.IEnumerable<T> Unit test will work with D10879. ref T8486 Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8486 Differential Revision: https://phab.enlightenment.org/D10878
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 403778fcc1..1267a8d38c 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -69,9 +69,15 @@ struct to_internal_field_convert_generator
69 .generate(sink, std::make_tuple(field_name, field_name), context)) 69 .generate(sink, std::make_tuple(field_name, field_name), context))
70 return false; 70 return false;
71 } 71 }
72 else if ((complex && (complex->outer.base_type == "iterator")))
73 {
74 if (!as_generator(
75 indent << scope_tab << scope_tab << "_internal_struct." << string << " = Efl.Eo.Globals.IEnumerableToIterator(_external_struct." << string << ");\n")
76 .generate(sink, std::make_tuple(field_name, field_name), context))
77 return false;
78 }
72 else if ((complex && (complex->outer.base_type == "array" 79 else if ((complex && (complex->outer.base_type == "array"
73 || complex->outer.base_type == "list" 80 || complex->outer.base_type == "list"
74 || complex->outer.base_type == "iterator"
75 || complex->outer.base_type == "hash")) 81 || complex->outer.base_type == "hash"))
76 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") 82 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *")
77 { 83 {
@@ -206,7 +212,7 @@ struct to_external_field_convert_generator
206 else if (complex && complex->outer.base_type == "iterator") 212 else if (complex && complex->outer.base_type == "iterator")
207 { 213 {
208 if (!as_generator( 214 if (!as_generator(
209 indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false);\n") 215 indent << scope_tab << scope_tab << "_external_struct." << string << " = Efl.Eo.Globals.IteratorTo" << type << "(_internal_struct." << string << ");\n")
210 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 216 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
211 return false; 217 return false;
212 } 218 }