summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-16 16:26:13 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-26 10:55:18 -0300
commit429d7510b06d3b475b8b924fbf642ef4313f0b26 (patch)
tree298563af635d38381a4258e4b8b85d3a056017e8
parent628e5ab95029c222e5f2eca3fa9a3702015fb8c1 (diff)
efl_mono: Reorganize utility functions.
Summary: Blacklist functions are all in the header/namespace blacklist. Helper functions returning strings (names) are in the name_helpers header. They act somewhat like "mini-generators". Helpers.hh was left with other kind of helper functions (checks, etc) that do not return strings. Depends on D5992 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5993
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh (renamed from src/bin/eolian_mono/eolian/mono/function_blacklist.hh)33
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_declaration.hh3
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh8
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh3
-rw-r--r--src/bin/eolian_mono/eolian/mono/helpers.hh89
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh6
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh3
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh60
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh3
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh12
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_fields.hh6
11 files changed, 122 insertions, 104 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index f3ec3011d5..863d23d9f6 100644
--- a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -1,8 +1,15 @@
1#ifndef EOLIAN_MONO_FUNCTION_BLACKLIST_HH 1#ifndef EOLIAN_MONO_BLACKLIST_HH
2#define EOLIAN_MONO_FUNCTION_BLACKLIST_HH 2#define EOLIAN_MONO_BLACKLIST_HH
3
4#include "grammar/klass_def.hpp"
5#include "name_helpers.hh"
3 6
4namespace eolian_mono { 7namespace eolian_mono {
5 8
9namespace blacklist {
10
11namespace attributes = efl::eolian::grammar::attributes;
12
6inline bool is_function_blacklisted(std::string const& c_name) 13inline bool is_function_blacklisted(std::string const& c_name)
7{ 14{
8 return 15 return
@@ -46,6 +53,28 @@ inline bool is_function_blacklisted(std::string const& c_name)
46 ; 53 ;
47} 54}
48 55
56// Blacklist structs that require some kind of manual binding.
57inline bool is_struct_blacklisted(std::string const& full_name)
58{
59 return full_name == "Efl.Event.Description"
60 || full_name == "Eina.Binbuf"
61 || full_name == "Eina.Strbuf"
62 || full_name == "Eina.Slice"
63 || full_name == "Eina.Rw_Slice";
64}
65
66inline bool is_struct_blacklisted(attributes::struct_def const& struct_)
67{
68 return is_struct_blacklisted(name_helpers::struct_full_name(struct_));
69}
70
71inline bool is_struct_blacklisted(attributes::regular_type_def const& struct_)
72{
73 return is_struct_blacklisted(name_helpers::type_full_name(struct_));
74}
75
76}
77
49} 78}
50 79
51#endif 80#endif
diff --git a/src/bin/eolian_mono/eolian/mono/function_declaration.hh b/src/bin/eolian_mono/eolian/mono/function_declaration.hh
index fe35c5341d..1d6a1b2f0e 100644
--- a/src/bin/eolian_mono/eolian/mono/function_declaration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_declaration.hh
@@ -11,6 +11,7 @@
11#include "parameter.hh" 11#include "parameter.hh"
12#include "keyword.hh" 12#include "keyword.hh"
13#include "using_decl.hh" 13#include "using_decl.hh"
14#include "blacklist.hh"
14 15
15namespace eolian_mono { 16namespace eolian_mono {
16 17
@@ -19,7 +20,7 @@ struct function_declaration_generator
19 template <typename OutputIterator, typename Context> 20 template <typename OutputIterator, typename Context>
20 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 21 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
21 { 22 {
22 if(is_function_blacklisted(f.c_name) || f.is_static) 23 if(blacklist::is_function_blacklisted(f.c_name) || f.is_static)
23 return true; 24 return true;
24 25
25 if(!as_generator(documentation).generate(sink, f, context)) 26 if(!as_generator(documentation).generate(sink, f, context))
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 4431ddc86e..14c70791f6 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -11,6 +11,7 @@
11#include "grammar/alternative.hpp" 11#include "grammar/alternative.hpp"
12#include "grammar/attribute_reorder.hpp" 12#include "grammar/attribute_reorder.hpp"
13#include "type.hh" 13#include "type.hh"
14#include "name_helpers.hh"
14#include "helpers.hh" 15#include "helpers.hh"
15#include "function_helpers.hh" 16#include "function_helpers.hh"
16#include "marshall_type.hh" 17#include "marshall_type.hh"
@@ -19,6 +20,7 @@
19#include "documentation.hh" 20#include "documentation.hh"
20#include "using_decl.hh" 21#include "using_decl.hh"
21#include "generation_contexts.hh" 22#include "generation_contexts.hh"
23#include "blacklist.hh"
22 24
23namespace eolian_mono { 25namespace eolian_mono {
24 26
@@ -29,7 +31,7 @@ struct native_function_definition_generator
29 template <typename OutputIterator, typename Context> 31 template <typename OutputIterator, typename Context>
30 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 32 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
31 { 33 {
32 if(is_function_blacklisted(f.c_name) || f.is_static) // Only Concrete classes implement static methods. 34 if(blacklist::is_function_blacklisted(f.c_name) || f.is_static) // Only Concrete classes implement static methods.
33 return true; 35 return true;
34 else 36 else
35 { 37 {
@@ -134,7 +136,7 @@ struct function_definition_generator
134 { 136 {
135 if(do_super && f.is_static) // Static methods goes only on Concrete classes. 137 if(do_super && f.is_static) // Static methods goes only on Concrete classes.
136 return true; 138 return true;
137 if(is_function_blacklisted(f.c_name)) 139 if(blacklist::is_function_blacklisted(f.c_name))
138 return true; 140 return true;
139 141
140 if(!as_generator 142 if(!as_generator
@@ -165,7 +167,7 @@ struct function_definition_generator
165 << ") {\n " 167 << ") {\n "
166 << eolian_mono::function_definition_preamble() << string << "(" 168 << eolian_mono::function_definition_preamble() << string << "("
167 << (do_super ? "efl.eo.Globals.efl_super(" : "") 169 << (do_super ? "efl.eo.Globals.efl_super(" : "")
168 << (f.is_static ? helpers::klass_get_name(f.klass) + "()": "this.raw_handle") 170 << (f.is_static ? name_helpers::klass_get_name(f.klass) + "()": "this.raw_handle")
169 << (do_super ? ", this.raw_klass)" : "") 171 << (do_super ? ", this.raw_klass)" : "")
170 << *(", " << argument_invocation ) << ");\n" 172 << *(", " << argument_invocation ) << ");\n"
171 << eolian_mono::function_definition_epilogue() 173 << eolian_mono::function_definition_epilogue()
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index aaae5511af..26f8f1b4c8 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -16,6 +16,7 @@
16#include "keyword.hh" 16#include "keyword.hh"
17#include "using_decl.hh" 17#include "using_decl.hh"
18#include "generation_contexts.hh" 18#include "generation_contexts.hh"
19#include "blacklist.hh"
19 20
20namespace eolian_mono { 21namespace eolian_mono {
21 22
@@ -28,7 +29,7 @@ struct function_registration_generator
28 template <typename OutputIterator, typename Context> 29 template <typename OutputIterator, typename Context>
29 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 30 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
30 { 31 {
31 if(is_function_blacklisted(f.c_name) || f.is_static) // Static methods aren't overrideable 32 if(blacklist::is_function_blacklisted(f.c_name) || f.is_static) // Static methods aren't overrideable
32 return true; 33 return true;
33 else 34 else
34 { 35 {
diff --git a/src/bin/eolian_mono/eolian/mono/helpers.hh b/src/bin/eolian_mono/eolian/mono/helpers.hh
index e0ec6945fa..9af594191d 100644
--- a/src/bin/eolian_mono/eolian/mono/helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/helpers.hh
@@ -2,65 +2,20 @@
2#define EOLIAN_MONO_HELPERS_HH 2#define EOLIAN_MONO_HELPERS_HH
3 3
4#include "grammar/klass_def.hpp" 4#include "grammar/klass_def.hpp"
5#include "utils.hh" 5#include "blacklist.hh"
6 6#include "name_helpers.hh"
7/* General helper functions for the main generators.
8 *
9 * These range from blacklisting structures to 'nano-generators' (functions that receive
10 * a binding-specifict structure and returns a string).
11 */
12 7
13namespace eolian_mono { 8namespace eolian_mono {
14 9
15namespace helpers { 10namespace helpers {
16 11
17namespace attributes = efl::eolian::grammar::attributes; 12/* General helpers, not related directly with generating strings (those go in the name_helpers.hh). */
18
19inline std::string type_full_name(attributes::regular_type_def const& type)
20{
21 std::string full_name;
22 for (auto& name : type.namespaces)
23 {
24 full_name += name + ".";
25 }
26 full_name += type.base_type;
27 return full_name;
28}
29
30inline std::string struct_full_name(attributes::struct_def const& struct_)
31{
32 std::string full_name;
33 for (auto& name : struct_.namespaces)
34 {
35 full_name += name + ".";
36 }
37 full_name += struct_.cxx_name;
38 return full_name;
39}
40
41// Blacklist structs that require some kind of manual binding.
42inline bool is_struct_blacklisted(std::string const& full_name)
43{
44 return full_name == "Efl.Event.Description"
45 || full_name == "Eina.Binbuf"
46 || full_name == "Eina.Strbuf"
47 || full_name == "Eina.Slice"
48 || full_name == "Eina.Rw_Slice";
49}
50
51inline bool is_struct_blacklisted(attributes::struct_def const& struct_)
52{
53 return is_struct_blacklisted(struct_full_name(struct_));
54}
55 13
56inline bool is_struct_blacklisted(attributes::regular_type_def const& struct_) 14namespace attributes = efl::eolian::grammar::attributes;
57{
58 return is_struct_blacklisted(type_full_name(struct_));
59}
60 15
61inline bool need_struct_conversion(attributes::regular_type_def const* regular) 16inline bool need_struct_conversion(attributes::regular_type_def const* regular)
62{ 17{
63 return regular && regular->is_struct() && !is_struct_blacklisted(*regular); 18 return regular && regular->is_struct() && !blacklist::is_struct_blacklisted(*regular);
64} 19}
65 20
66inline bool need_struct_conversion(attributes::parameter_def const& param, attributes::regular_type_def const* regular) 21inline bool need_struct_conversion(attributes::parameter_def const& param, attributes::regular_type_def const* regular)
@@ -93,7 +48,7 @@ inline bool need_pointer_conversion(attributes::regular_type_def const* regular)
93 return false; 48 return false;
94 49
95 if (regular->is_enum() 50 if (regular->is_enum()
96 || (regular->is_struct() && type_full_name(*regular) != "Eina.Binbuf") 51 || (regular->is_struct() && name_helpers::type_full_name(*regular) != "Eina.Binbuf")
97 ) 52 )
98 return true; 53 return true;
99 54
@@ -110,38 +65,6 @@ inline bool need_pointer_conversion(attributes::regular_type_def const* regular)
110 return false; 65 return false;
111} 66}
112 67
113inline std::string to_field_name(std::string const& in)
114{
115 return utils::capitalize(in);
116}
117
118inline std::string klass_name_to_csharp(attributes::klass_name const& clsname)
119{
120 std::ostringstream output;
121
122 for (auto namesp : clsname.namespaces)
123 output << utils::to_lowercase(namesp) << ".";
124
125 output << clsname.eolian_name;
126
127 return output.str();
128}
129
130inline std::string klass_get_name(attributes::klass_name const &clsname)
131{
132 std::ostringstream output;
133
134 output << klass_name_to_csharp(clsname);
135 output << "Concrete.";
136
137 for (auto namesp : clsname.namespaces)
138 output << utils::to_lowercase(namesp) << "_";
139 output << utils::to_lowercase(clsname.eolian_name);
140 output << "_class_get";
141
142 return output.str();
143}
144
145} // namespace helpers 68} // namespace helpers
146 69
147} // namespace eolian_mono 70} // namespace eolian_mono
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index fa55828df6..280819b60d 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -4,7 +4,7 @@
4#include "grammar/integral.hpp" 4#include "grammar/integral.hpp"
5#include "grammar/generator.hpp" 5#include "grammar/generator.hpp"
6#include "grammar/klass_def.hpp" 6#include "grammar/klass_def.hpp"
7#include "function_blacklist.hh" 7#include "blacklist.hh"
8 8
9#include "grammar/indentation.hpp" 9#include "grammar/indentation.hpp"
10#include "grammar/list.hpp" 10#include "grammar/list.hpp"
@@ -74,7 +74,7 @@ get_inheritable_function_count(grammar::attributes::klass_def const& cls)
74 auto methods = cls.get_all_methods(); 74 auto methods = cls.get_all_methods();
75 return std::count_if(methods.cbegin(), methods.cend(), [](grammar::attributes::function_def const& func) 75 return std::count_if(methods.cbegin(), methods.cend(), [](grammar::attributes::function_def const& func)
76 { 76 {
77 return !is_function_blacklisted(func.c_name) && !func.is_static; 77 return !blacklist::is_function_blacklisted(func.c_name) && !func.is_static;
78 }); 78 });
79} 79}
80 80
@@ -241,7 +241,7 @@ struct klass
241 241
242 for (auto &&p : cls.parts) 242 for (auto &&p : cls.parts)
243 if (!as_generator( 243 if (!as_generator(
244 helpers::klass_name_to_csharp(p.klass) << " " << utils::capitalize(p.name) << "{ get;}\n" 244 name_helpers::klass_name_to_csharp(p.klass) << " " << utils::capitalize(p.name) << "{ get;}\n"
245 ).generate(sink, attributes::unused, iface_cxt)) 245 ).generate(sink, attributes::unused, iface_cxt))
246 return false; 246 return false;
247 247
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
index 1d9368e1f5..2bf8212eee 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
@@ -8,6 +8,7 @@
8#include "namespace.hh" 8#include "namespace.hh"
9#include "type_impl.hh" 9#include "type_impl.hh"
10#include "generation_contexts.hh" 10#include "generation_contexts.hh"
11#include "blacklist.hh"
11 12
12namespace eolian_mono { 13namespace eolian_mono {
13 14
@@ -155,7 +156,7 @@ struct marshall_type_visitor_generate
155 }} 156 }}
156 }; 157 };
157 158
158 if (regular.is_struct() && !helpers::is_struct_blacklisted(regular) && !(bool)(regular.base_qualifier & qualifier_info::is_own)) 159 if (regular.is_struct() && !blacklist::is_struct_blacklisted(regular) && !(bool)(regular.base_qualifier & qualifier_info::is_own))
159 { 160 {
160 if ((is_out || is_return) && is_ptr) 161 if ((is_out || is_return) && is_ptr)
161 return as_generator(" System.IntPtr").generate(sink, attributes::unused, *context); 162 return as_generator(" System.IntPtr").generate(sink, attributes::unused, *context);
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 4ae988cf5f..3747b92356 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -9,6 +9,8 @@
9#include <vector> 9#include <vector>
10#include "utils.hh" 10#include "utils.hh"
11 11
12#include "grammar/klass_def.hpp"
13
12namespace eolian_mono { 14namespace eolian_mono {
13 15
14/* Utility functions for naming things. Compared to the utils.hh, this header has higher level 16/* Utility functions for naming things. Compared to the utils.hh, this header has higher level
@@ -17,6 +19,8 @@ namespace eolian_mono {
17 */ 19 */
18namespace name_helpers { 20namespace name_helpers {
19 21
22namespace attributes = efl::eolian::grammar::attributes;
23
20static const std::vector<std::string> verbs = 24static const std::vector<std::string> verbs =
21 { 25 {
22 "add", 26 "add",
@@ -108,11 +112,65 @@ void reorder_verb(std::vector<std::string> &names)
108 } 112 }
109} 113}
110 114
111std::string managed_event_name(std::string const& name) 115inline std::string managed_event_name(std::string const& name)
112{ 116{
113 return utils::to_pascal_case(utils::split(name, ','), "") + "Evt"; 117 return utils::to_pascal_case(utils::split(name, ','), "") + "Evt";
114} 118}
115 119
120inline std::string type_full_name(attributes::regular_type_def const& type)
121{
122 std::string full_name;
123 for (auto& name : type.namespaces)
124 {
125 full_name += name + ".";
126 }
127 full_name += type.base_type;
128 return full_name;
129}
130
131inline std::string struct_full_name(attributes::struct_def const& struct_)
132{
133 std::string full_name;
134 for (auto& name : struct_.namespaces)
135 {
136 full_name += name + ".";
137 }
138 full_name += struct_.cxx_name;
139 return full_name;
140}
141
142inline std::string to_field_name(std::string const& in)
143{
144 return utils::capitalize(in);
145}
146
147inline std::string klass_name_to_csharp(attributes::klass_name const& clsname)
148{
149 std::ostringstream output;
150
151 for (auto namesp : clsname.namespaces)
152 output << utils::to_lowercase(namesp) << ".";
153
154 output << clsname.eolian_name;
155
156 return output.str();
157}
158
159inline std::string klass_get_name(attributes::klass_name const &clsname)
160{
161 std::ostringstream output;
162
163 output << klass_name_to_csharp(clsname);
164 output << "Concrete.";
165
166 for (auto namesp : clsname.namespaces)
167 output << utils::to_lowercase(namesp) << "_";
168 output << utils::to_lowercase(clsname.eolian_name);
169 output << "_class_get";
170
171 return output.str();
172}
173
116} // namespace name_helpers 174} // namespace name_helpers
117 175
118} // namespace eolian_mono 176} // namespace eolian_mono
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index 3341f1e894..bb2e50f6c9 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -8,6 +8,7 @@
8#include "grammar/indentation.hpp" 8#include "grammar/indentation.hpp"
9 9
10#include "utils.hh" 10#include "utils.hh"
11#include "name_helpers.hh"
11#include "documentation.hh" 12#include "documentation.hh"
12 13
13namespace eolian_mono { 14namespace eolian_mono {
@@ -17,7 +18,7 @@ struct part_definition_generator
17 template <typename OutputIterator, typename Context> 18 template <typename OutputIterator, typename Context>
18 bool generate(OutputIterator sink, attributes::part_def const& part, Context const& context) const 19 bool generate(OutputIterator sink, attributes::part_def const& part, Context const& context) const
19 { 20 {
20 std::string part_klass_name = helpers::klass_name_to_csharp(part.klass); 21 std::string part_klass_name = name_helpers::klass_name_to_csharp(part.klass);
21 return as_generator(scope_tab << documentation 22 return as_generator(scope_tab << documentation
22 << scope_tab << "public " << part_klass_name << " " << utils::capitalize(part.name) << "\n" 23 << scope_tab << "public " << part_klass_name << " " << utils::capitalize(part.name) << "\n"
23 << scope_tab << "{\n" 24 << scope_tab << "{\n"
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index bc3b730857..9ff47de51d 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -6,12 +6,14 @@
6#include "grammar/indentation.hpp" 6#include "grammar/indentation.hpp"
7#include "grammar/list.hpp" 7#include "grammar/list.hpp"
8#include "grammar/alternative.hpp" 8#include "grammar/alternative.hpp"
9#include "name_helpers.hh"
9#include "helpers.hh" 10#include "helpers.hh"
10#include "type.hh" 11#include "type.hh"
11#include "keyword.hh" 12#include "keyword.hh"
12#include "using_decl.hh" 13#include "using_decl.hh"
13#include "documentation.hh" 14#include "documentation.hh"
14#include "struct_fields.hh" 15#include "struct_fields.hh"
16#include "blacklist.hh"
15 17
16namespace eolian_mono { 18namespace eolian_mono {
17 19
@@ -51,7 +53,7 @@ struct struct_definition_generator
51 documentation(1) 53 documentation(1)
52 << scope_tab(1) << "public " << type << " " << string << ";\n" 54 << scope_tab(1) << "public " << type << " " << string << ";\n"
53 ) 55 )
54 .generate(sink, std::make_tuple(field, field.type, helpers::to_field_name(field.name)), context)) 56 .generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context))
55 return false; 57 return false;
56 } 58 }
57 59
@@ -104,7 +106,7 @@ struct struct_internal_definition_generator
104 // iterate struct fields 106 // iterate struct fields
105 for (auto const& field : struct_.fields) 107 for (auto const& field : struct_.fields)
106 { 108 {
107 auto field_name = helpers::to_field_name(field.name); 109 auto field_name = name_helpers::to_field_name(field.name);
108 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type); 110 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type);
109 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type); 111 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type);
110 112
@@ -165,7 +167,7 @@ struct to_internal_field_convert_generator
165 template <typename OutputIterator, typename Context> 167 template <typename OutputIterator, typename Context>
166 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 168 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
167 { 169 {
168 auto field_name = helpers::to_field_name(field.name); 170 auto field_name = name_helpers::to_field_name(field.name);
169 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type); 171 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type);
170 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type); 172 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type);
171 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type); 173 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type);
@@ -259,7 +261,7 @@ struct to_external_field_convert_generator
259 template <typename OutputIterator, typename Context> 261 template <typename OutputIterator, typename Context>
260 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 262 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
261 { 263 {
262 auto field_name = helpers::to_field_name(field.name); 264 auto field_name = name_helpers::to_field_name(field.name);
263 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type); 265 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type);
264 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type); 266 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type);
265 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type); 267 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type);
@@ -439,7 +441,7 @@ struct struct_entities_generator
439 template <typename OutputIterator, typename Context> 441 template <typename OutputIterator, typename Context>
440 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const 442 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const
441 { 443 {
442 if (helpers::is_struct_blacklisted(struct_)) 444 if (blacklist::is_struct_blacklisted(struct_))
443 return true; 445 return true;
444 446
445 std::vector<std::string> cpp_namespaces = escape_namespace(attributes::cpp_namespaces(struct_.namespaces)); 447 std::vector<std::string> cpp_namespaces = escape_namespace(attributes::cpp_namespaces(struct_.namespaces));
diff --git a/src/bin/eolian_mono/eolian/mono/struct_fields.hh b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
index c6d460d11a..a036034ae5 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_fields.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
@@ -6,7 +6,7 @@
6#include "grammar/indentation.hpp" 6#include "grammar/indentation.hpp"
7#include "grammar/list.hpp" 7#include "grammar/list.hpp"
8#include "grammar/alternative.hpp" 8#include "grammar/alternative.hpp"
9#include "helpers.hh" 9#include "name_helpers.hh"
10#include "type.hh" 10#include "type.hh"
11#include "keyword.hh" 11#include "keyword.hh"
12#include "using_decl.hh" 12#include "using_decl.hh"
@@ -20,7 +20,7 @@ struct field_argument_default_generator
20 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 20 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
21 { 21 {
22 if (!as_generator(type << " " << string << "=default(" << type << ")") 22 if (!as_generator(type << " " << string << "=default(" << type << ")")
23 .generate(sink, std::make_tuple(field.type, helpers::to_field_name(field.name), field.type), context)) 23 .generate(sink, std::make_tuple(field.type, name_helpers::to_field_name(field.name), field.type), context))
24 return false; 24 return false;
25 return true; 25 return true;
26 } 26 }
@@ -32,7 +32,7 @@ struct field_argument_assignment_generator
32 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 32 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
33 { 33 {
34 if (!as_generator("this." << string << " = " << string) 34 if (!as_generator("this." << string << " = " << string)
35 .generate(sink, std::make_tuple(helpers::to_field_name(field.name), helpers::to_field_name(field.name)), context)) 35 .generate(sink, std::make_tuple(name_helpers::to_field_name(field.name), name_helpers::to_field_name(field.name)), context))
36 return false; 36 return false;
37 return true; 37 return true;
38 } 38 }