diff options
author | Lauro Moura <lauromoura@expertisesolutions.com.br> | 2019-04-17 21:03:45 -0300 |
---|---|---|
committer | Lauro Moura <lauromoura@expertisesolutions.com.br> | 2019-04-17 21:51:33 -0300 |
commit | 71d98d0a5f050203f9a3c16ee698971044ea699e (patch) | |
tree | 61f14491e239e378862989580343f1ba1b8c145e | |
parent | abc63218bc1b4d65bc265ae59a916bdec6b3bd29 (diff) | |
download | efl-devs/lauromoura/csharp_conventions.tar.gz |
csharp: Remove managed_method_name overload.devs/lauromoura/csharp_conventions
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/documentation.hh | 9 | ||||
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/name_helpers.hh | 11 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index 2cad038e25..ac072a4220 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -74,8 +74,7 @@ struct documentation_generator if (blacklist::is_function_blacklisted( ::eolian_function_full_c_name_get(function, ftype))) return ""; name += "."; - name += name_helpers::managed_method_name( - ::eolian_object_short_name_get(klass), eo_name); + name += name_helpers::managed_method_name({function, ftype, NULL, eolian_object_unit_get(EOLIAN_OBJECT(function))}); break; case ::EOLIAN_PROP_SET: name += ".Set"; @@ -118,7 +117,7 @@ struct documentation_generator case attributes::function_type::prop_get: if (blacklist::is_function_blacklisted(func.c_name))return ""; if (!name.empty()) name += "."; - name += name_helpers::managed_method_name(func.klass.eolian_name, func.name); + name += name_helpers::managed_method_name(func); break; default: // No need to deal with property as function_defs are converted to get/set when building a given klass_def. @@ -432,7 +431,7 @@ struct documentation_generator return generate_all_tag_examples(sink, name_helpers::klass_full_concrete_or_interface_name(func.klass), - name_helpers::managed_method_name(func.klass.eolian_name, func.name), + name_helpers::managed_method_name(func), context); } @@ -451,7 +450,7 @@ struct documentation_generator return generate_all_tag_examples(sink, name_helpers::klass_full_concrete_or_interface_name(func.klass), - name_helpers::managed_method_name(func.klass.eolian_name, func.name), + name_helpers::managed_method_name(func), context); } diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh index 4d9fff92de..11ccec3146 100644 --- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh @@ -176,8 +176,12 @@ inline std::string managed_namespace(std::string const& ns) return escape_keyword(utils::remove_all(ns, '_')); } -inline std::string managed_method_name(std::string const& klass, std::string const& name) +inline std::string managed_method_name(attributes::function_def const& f) { + auto klass = f.klass.eolian_name; + // TODO get managed name to check if the managed actually clashes with the method name. + auto name = f.name; + std::vector<std::string> names = utils::split(name, '_'); name_helpers::reorder_verb(names); @@ -203,11 +207,6 @@ inline std::string managed_name(std::string const& name, char separator='_') return utils::to_pascal_case(tokens); } -inline std::string managed_method_name(attributes::function_def const& f) -{ - return managed_method_name(f.klass.eolian_name, f.name); -} - inline std::string alias_full_eolian_name(attributes::alias_def const& alias) { |