summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-10 22:50:05 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-04-12 21:23:42 -0300
commit87c58a460a0f39477461ef93e6ce8b63f994c873 (patch)
treed1619cdee19ab7f0ad43ae45be8857809671e4d9 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parent65f868786a59533a1cbf9d58b886cdc4f49ceb94 (diff)
efl_mono: Add namespace on helpers.
Make it easier on finding where those functions are coming from.
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index f772564440..bc3b730857 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -51,7 +51,7 @@ struct struct_definition_generator
51 documentation(1) 51 documentation(1)
52 << scope_tab(1) << "public " << type << " " << string << ";\n" 52 << scope_tab(1) << "public " << type << " " << string << ";\n"
53 ) 53 )
54 .generate(sink, std::make_tuple(field, field.type, to_field_name(field.name)), context)) 54 .generate(sink, std::make_tuple(field, field.type, helpers::to_field_name(field.name)), context))
55 return false; 55 return false;
56 } 56 }
57 57
@@ -104,7 +104,7 @@ struct struct_internal_definition_generator
104 // iterate struct fields 104 // iterate struct fields
105 for (auto const& field : struct_.fields) 105 for (auto const& field : struct_.fields)
106 { 106 {
107 auto field_name = to_field_name(field.name); 107 auto field_name = helpers::to_field_name(field.name);
108 auto klass = efl::eina::get<attributes::klass_name>(&field.type.original_type); 108 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); 109 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type);
110 110
@@ -165,7 +165,7 @@ struct to_internal_field_convert_generator
165 template <typename OutputIterator, typename Context> 165 template <typename OutputIterator, typename Context>
166 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 166 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
167 { 167 {
168 auto field_name = to_field_name(field.name); 168 auto field_name = helpers::to_field_name(field.name);
169 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type); 169 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); 170 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); 171 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type);
@@ -191,14 +191,14 @@ struct to_internal_field_convert_generator
191 .generate(sink, std::make_tuple(field_name, field_name), context)) 191 .generate(sink, std::make_tuple(field_name, field_name), context))
192 return false; 192 return false;
193 } 193 }
194 else if (field.type.is_ptr && need_pointer_conversion(regular) && !need_struct_conversion(regular)) 194 else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular))
195 { 195 {
196 if (!as_generator( 196 if (!as_generator(
197 scope_tab << scope_tab << "_internal_struct." << string << " = eina.PrimitiveConversion.ManagedToPointerAlloc(_external_struct." << string << ");\n") 197 scope_tab << scope_tab << "_internal_struct." << string << " = eina.PrimitiveConversion.ManagedToPointerAlloc(_external_struct." << string << ");\n")
198 .generate(sink, std::make_tuple(field_name, field_name), context)) 198 .generate(sink, std::make_tuple(field_name, field_name), context))
199 return false; 199 return false;
200 } 200 }
201 else if (need_struct_conversion(regular)) 201 else if (helpers::need_struct_conversion(regular))
202 { 202 {
203 if (!as_generator( 203 if (!as_generator(
204 scope_tab << scope_tab << "_internal_struct." << string << " = " << type << "_StructConversion.ToInternal(_external_struct." << string << ");\n") 204 scope_tab << scope_tab << "_internal_struct." << string << " = " << type << "_StructConversion.ToInternal(_external_struct." << string << ");\n")
@@ -259,7 +259,7 @@ struct to_external_field_convert_generator
259 template <typename OutputIterator, typename Context> 259 template <typename OutputIterator, typename Context>
260 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 260 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
261 { 261 {
262 auto field_name = to_field_name(field.name); 262 auto field_name = helpers::to_field_name(field.name);
263 auto regular = efl::eina::get<attributes::regular_type_def>(&field.type.original_type); 263 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); 264 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); 265 auto complex = efl::eina::get<attributes::complex_type_def>(&field.type.original_type);
@@ -301,14 +301,14 @@ struct to_external_field_convert_generator
301 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 301 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
302 return false; 302 return false;
303 } 303 }
304 else if (field.type.is_ptr && need_pointer_conversion(regular) && !need_struct_conversion(regular)) 304 else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular))
305 { 305 {
306 if (!as_generator( 306 if (!as_generator(
307 scope_tab << scope_tab << "_external_struct." << string << " = eina.PrimitiveConversion.PointerToManaged<" << type << ">(_internal_struct." << string << ");\n") 307 scope_tab << scope_tab << "_external_struct." << string << " = eina.PrimitiveConversion.PointerToManaged<" << type << ">(_internal_struct." << string << ");\n")
308 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 308 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
309 return false; 309 return false;
310 } 310 }
311 else if (need_struct_conversion(regular)) 311 else if (helpers::need_struct_conversion(regular))
312 { 312 {
313 if (!as_generator( 313 if (!as_generator(
314 scope_tab << scope_tab << "_external_struct." << string << " = " << type << "_StructConversion.ToExternal(_internal_struct." << string << ");\n") 314 scope_tab << scope_tab << "_external_struct." << string << " = " << type << "_StructConversion.ToExternal(_internal_struct." << string << ");\n")
@@ -439,7 +439,7 @@ struct struct_entities_generator
439 template <typename OutputIterator, typename Context> 439 template <typename OutputIterator, typename Context>
440 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const 440 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const
441 { 441 {
442 if (is_struct_blacklisted(struct_)) 442 if (helpers::is_struct_blacklisted(struct_))
443 return true; 443 return true;
444 444
445 std::vector<std::string> cpp_namespaces = escape_namespace(attributes::cpp_namespaces(struct_.namespaces)); 445 std::vector<std::string> cpp_namespaces = escape_namespace(attributes::cpp_namespaces(struct_.namespaces));