summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-12-14 18:17:23 -0200
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2018-12-14 18:30:59 -0200
commita83c3cdba446c42d42b22b314ed6f91351e5234d (patch)
tree5e33da910696f07626d0de2fd1977306ed6c42d6 /src/bin/eolian_mono/eolian/mono/klass.hh
parent0611dbc1e9bbf81026e7630a65766c325495bf47 (diff)
eolian_mono: Add support for C# style properties
Summary: Syntatic sugar around the Get/Set functions for now. Test Plan: Run efl-mono-suite Reviewers: vitor.sousa, segfaultxavi, felipealmeida, Jaehyun_Cho Reviewed By: vitor.sousa Subscribers: cedric Tags: #efl_language_bindings Differential Revision: https://phab.enlightenment.org/D7394
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 077a0fa..f10c3a3 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -164,6 +164,9 @@ struct klass
164 ).generate(sink, p, iface_cxt)) 164 ).generate(sink, p, iface_cxt))
165 return false; 165 return false;
166 166
167 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, iface_cxt))
168 return false;
169
167 // End of interface declaration 170 // End of interface declaration
168 if(!as_generator("}\n").generate(sink, attributes::unused, iface_cxt)) return false; 171 if(!as_generator("}\n").generate(sink, attributes::unused, iface_cxt)) return false;
169 172
@@ -255,6 +258,18 @@ struct klass
255 if(!as_generator(*(async_function_definition)).generate(sink, implemented_methods, concrete_cxt)) 258 if(!as_generator(*(async_function_definition)).generate(sink, implemented_methods, concrete_cxt))
256 return false; 259 return false;
257 260
261 // Property wrappers
262 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, concrete_cxt))
263 return false;
264
265 for (auto&& klass : helpers::non_implemented_interfaces(cls))
266 {
267 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
268 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, concrete_cxt))
269 return false;
270 }
271
272
258 if(!as_generator("}\n").generate(sink, attributes::unused, concrete_cxt)) return false; 273 if(!as_generator("}\n").generate(sink, attributes::unused, concrete_cxt)) return false;
259 274
260 } 275 }
@@ -315,6 +330,17 @@ struct klass
315 if(!as_generator(*(async_function_definition(true))).generate(sink, implemented_methods, inherit_cxt)) 330 if(!as_generator(*(async_function_definition(true))).generate(sink, implemented_methods, inherit_cxt))
316 return false; 331 return false;
317 332
333 // Property wrappers
334 if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, inherit_cxt))
335 return false;
336
337 for (auto&& klass : helpers::non_implemented_interfaces(cls))
338 {
339 attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
340 if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, inherit_cxt))
341 return false;
342 }
343
318 if(!as_generator("}\n").generate(sink, attributes::unused, inherit_cxt)) return false; 344 if(!as_generator("}\n").generate(sink, attributes::unused, inherit_cxt)) return false;
319 } 345 }
320 346