summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/name_helpers.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/name_helpers.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 05bf783..06291f4 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -243,6 +243,14 @@ inline std::string to_field_name(std::string const& in)
243 return utils::capitalize(in); 243 return utils::capitalize(in);
244} 244}
245 245
246inline std::string property_managed_name(attributes::property_def const& property)
247{
248 auto names = utils::split(property.name, '_');
249 // No need to escape keyword here as it will be capitalized and already
250 // namespaced inside the owner class.
251 return utils::to_pascal_case(names);
252}
253
246inline std::string managed_part_name(attributes::part_def const& part) 254inline std::string managed_part_name(attributes::part_def const& part)
247{ 255{
248 std::vector<std::string> names = utils::split(part.name, '_'); 256 std::vector<std::string> names = utils::split(part.name, '_');