aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/eolian_mono/eolian/mono/blacklist.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-21 14:38:45 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-21 14:48:33 -0300
commit0881d1524b6d3996a29b68820690f97821116585 (patch)
treec3fa39f72ad50b7f6ac0a0eb8652ba539af1c5a3 /src/bin/eolian_mono/eolian/mono/blacklist.hh
parentcsharp: Export correct headers and files (diff)
downloadefl-0881d1524b6d3996a29b68820690f97821116585.tar.gz
efl-csharp: Add back I prefix for interfaces.
Summary: Conforming to C# coding conventions. For properties, now we only generate a wrapper if its name does not clash with the name of the class that would be implementing it. Fixes https://phab.enlightenment.org/T7751 Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: https://phab.enlightenment.org/T7751 Differential Revision: https://phab.enlightenment.org/D8397
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/blacklist.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 2b9d8ad4bf..77be1c0da8 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -115,7 +115,7 @@ inline bool is_property_blacklisted(std::string const& name)
{
return name == "Efl.Input.Key.Key"
|| name == "Efl.Input.Hold.Hold"
- || name == "Efl.Text.Text";
+ || name == "Efl.IText.Text";
}
template<typename Context>
@@ -133,6 +133,22 @@ inline bool is_property_blacklisted(attributes::property_def const& property, Co
}
template<typename Context>
+inline bool is_property_blacklisted(attributes::property_def const& property,
+ attributes::klass_def const& implementing_class,
+ Context context)
+{
+ std::string property_name = name_helpers::property_managed_name(property);
+ std::string klass_name = name_helpers::klass_concrete_or_interface_name(implementing_class);
+
+ // This property wrapper is invalidated as it would clash with the implementing
+ // class constructor. CS
+ if (property_name == klass_name)
+ return true;
+
+ return is_property_blacklisted(property, context);
+}
+
+template<typename Context>
inline bool is_class_blacklisted(attributes::klass_def const& cls, Context context)
{
auto options = efl::eolian::grammar::context_find_tag<options_context>(context);