summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-09-06 16:03:23 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-06 16:06:09 +0200
commitb36e159d313bae4a6dd4e0c60deae0aef2309b50 (patch)
tree6d9311b74f094659b3bbe3f3bd90c8d28dc27b7a
parent353524e1b89deb48b64c6125a92c1627a05deb75 (diff)
eolian-mono: Removing I prefix from classes.
Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, brunobelo, felipealmeida, #reviewers, lauromoura, #committers Tags: #efl Maniphest Tasks: T8166 Differential Revision: https://phab.enlightenment.org/D9816
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh17
-rw-r--r--src/bindings/mono/efl_mono/GenericModel.cs6
-rw-r--r--src/tests/efl_mono/Model.cs2
3 files changed, 11 insertions, 14 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 8104a78af6..a1fd8cd6d0 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -293,11 +293,9 @@ struct klass_interface_name_generator
293 template <typename T> 293 template <typename T>
294 std::string operator()(T const& klass) const 294 std::string operator()(T const& klass) const
295 { 295 {
296 std::string name = utils::remove_all(klass.eolian_name, '_'); 296 return ((klass.type == attributes::class_type::mixin
297 if (klass.type == attributes::class_type::mixin || klass.type == attributes::class_type::interface_) 297 || klass.type == attributes::class_type::interface_) ? "I" : "")
298 return "I" + name; 298 + utils::remove_all(klass.eolian_name, '_');
299 else
300 return name;
301 } 299 }
302 300
303 template <typename OutputIterator, typename Attr, typename Context> 301 template <typename OutputIterator, typename Attr, typename Context>
@@ -325,10 +323,9 @@ struct klass_full_interface_name_generator
325template<typename T> 323template<typename T>
326inline std::string klass_concrete_name(T const& klass) 324inline std::string klass_concrete_name(T const& klass)
327{ 325{
328 if (klass.type == attributes::class_type::mixin || klass.type == attributes::class_type::interface_) 326 return utils::remove_all(klass.eolian_name, '_') + ((klass.type == attributes::class_type::mixin
329 return klass_interface_name(klass) + "Concrete"; 327 || klass.type == attributes::class_type::interface_)
330 328 ? "Concrete" : "");
331 return utils::remove_all(klass.eolian_name, '_');
332} 329}
333 330
334template<typename T> 331template<typename T>
@@ -425,7 +422,7 @@ inline std::string managed_event_name(std::string const& name)
425 422
426inline std::string managed_event_args_short_name(attributes::event_def const& evt) 423inline std::string managed_event_args_short_name(attributes::event_def const& evt)
427{ 424{
428 return klass_concrete_or_interface_name(evt.klass) + name_helpers::managed_event_name(evt.name) + "Args"; 425 return utils::remove_all(evt.klass.eolian_name, '_') + name_helpers::managed_event_name(evt.name) + "Args";
429} 426}
430 427
431inline std::string managed_event_args_name(attributes::event_def evt) 428inline std::string managed_event_args_name(attributes::event_def evt)
diff --git a/src/bindings/mono/efl_mono/GenericModel.cs b/src/bindings/mono/efl_mono/GenericModel.cs
index 95389f8ddb..25d9c79955 100644
--- a/src/bindings/mono/efl_mono/GenericModel.cs
+++ b/src/bindings/mono/efl_mono/GenericModel.cs
@@ -125,7 +125,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel, IDisposable
125 } 125 }
126 126
127 /// <summary>Event triggered when properties on the wrapped model changes.</summary> 127 /// <summary>Event triggered when properties on the wrapped model changes.</summary>
128 public event EventHandler<Efl.IModelPropertiesChangedEventArgs> PropertiesChangedEvent 128 public event EventHandler<Efl.ModelPropertiesChangedEventArgs> PropertiesChangedEvent
129 { 129 {
130 add { 130 add {
131 model.PropertiesChangedEvent += value; 131 model.PropertiesChangedEvent += value;
@@ -136,7 +136,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel, IDisposable
136 } 136 }
137 137
138 /// <summary>Event triggered when a child is added from the wrapped model.</summary> 138 /// <summary>Event triggered when a child is added from the wrapped model.</summary>
139 public event EventHandler<Efl.IModelChildAddedEventArgs> ChildAddedEvent 139 public event EventHandler<Efl.ModelChildAddedEventArgs> ChildAddedEvent
140 { 140 {
141 add { 141 add {
142 model.ChildAddedEvent += value; 142 model.ChildAddedEvent += value;
@@ -147,7 +147,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel, IDisposable
147 } 147 }
148 148
149 /// <summary>Event triggered when a child is removed from the wrapped model.</summary> 149 /// <summary>Event triggered when a child is removed from the wrapped model.</summary>
150 public event EventHandler<Efl.IModelChildRemovedEventArgs> ChildRemovedEvent 150 public event EventHandler<Efl.ModelChildRemovedEventArgs> ChildRemovedEvent
151 { 151 {
152 add { 152 add {
153 model.ChildRemovedEvent += value; 153 model.ChildRemovedEvent += value;
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index 829accfb5c..4ec6ef3f0b 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -66,7 +66,7 @@ public class TestModel {
66 string propertyBound = null; 66 string propertyBound = null;
67 bool callbackCalled = false; 67 bool callbackCalled = false;
68 var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(); 68 var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>();
69 factory.PropertyBoundEvent += (object sender, Efl.Ui.IPropertyBindPropertyBoundEventArgs args) => { 69 factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => {
70 propertyBound = args.arg; 70 propertyBound = args.arg;
71 callbackCalled = true; 71 callbackCalled = true;
72 }; 72 };