summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-08-01 13:27:51 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-08-01 13:28:26 +0200
commit84601549e8d50ff6f3671728f68100b220c1e89b (patch)
treee602bc64f6775a2c54b401a3cdd09df931a9aee3 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parentd671c7e42b2be664eec6090b82089b393e0ef741 (diff)
eolian_mono: Fix whitespace in generated cs files
Pet peeve of mine.
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index c949783945..d358dc78ba 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -274,7 +274,7 @@ struct struct_internal_definition_generator
274 if (!as_generator 274 if (!as_generator
275 ( 275 (
276 indent << "#pragma warning disable CS1591\n\n" 276 indent << "#pragma warning disable CS1591\n\n"
277 << indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n" 277 << indent << "/// <summary>Internal wrapper for struct " << string << ".</summary>\n"
278 << indent << "[StructLayout(LayoutKind.Sequential)]\n" 278 << indent << "[StructLayout(LayoutKind.Sequential)]\n"
279 << indent << "public struct " << string << "\n" 279 << indent << "public struct " << string << "\n"
280 << indent << "{\n" 280 << indent << "{\n"
@@ -295,7 +295,7 @@ struct struct_internal_definition_generator
295 || regular->base_type == "stringshare" 295 || regular->base_type == "stringshare"
296 || regular->base_type == "any_value_ptr"))) 296 || regular->base_type == "any_value_ptr")))
297 { 297 {
298 if (!as_generator(indent << scope_tab << "///<summary>Internal wrapper for field " << field_name << "</summary>\n" 298 if (!as_generator(indent << scope_tab << "/// <summary>Internal wrapper for field " << field_name << "</summary>\n"
299 << indent << scope_tab << "public System.IntPtr " << field_name << ";\n") 299 << indent << scope_tab << "public System.IntPtr " << field_name << ";\n")
300 .generate(sink, nullptr, context)) 300 .generate(sink, nullptr, context))
301 return false; 301 return false;
@@ -303,7 +303,7 @@ struct struct_internal_definition_generator
303 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref) 303 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref)
304 && regular->base_type == "bool") 304 && regular->base_type == "bool")
305 { 305 {
306 if (!as_generator(indent << scope_tab << "///<summary>Internal wrapper for field " << field_name << "</summary>\n" 306 if (!as_generator(indent << scope_tab << "/// <summary>Internal wrapper for field " << field_name << "</summary>\n"
307 << indent << scope_tab << "public System.Byte " << field_name << ";\n") 307 << indent << scope_tab << "public System.Byte " << field_name << ";\n")
308 .generate(sink, nullptr, context)) 308 .generate(sink, nullptr, context))
309 return false; 309 return false;
@@ -311,7 +311,7 @@ struct struct_internal_definition_generator
311 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref) 311 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref)
312 && regular->base_type == "char") 312 && regular->base_type == "char")
313 { 313 {
314 if (!as_generator(indent << scope_tab << "///<summary>Internal wrapper for field " << field_name << "</summary>\n" 314 if (!as_generator(indent << scope_tab << "/// <summary>Internal wrapper for field " << field_name << "</summary>\n"
315 << indent << scope_tab << "public System.Byte " << field_name << ";\n") 315 << indent << scope_tab << "public System.Byte " << field_name << ";\n")
316 .generate(sink, nullptr, context)) 316 .generate(sink, nullptr, context))
317 return false; 317 return false;
@@ -337,7 +337,7 @@ struct struct_internal_definition_generator
337 337
338 // to internal 338 // to internal
339 if (!as_generator( 339 if (!as_generator(
340 indent << scope_tab << "///<summary>Implicit conversion to the internal/marshalling representation.</summary>\n" 340 indent << scope_tab << "/// <summary>Implicit conversion to the internal/marshalling representation.</summary>\n"
341 << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _external_struct)\n" 341 << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _external_struct)\n"
342 << indent << scope_tab << "{\n" 342 << indent << scope_tab << "{\n"
343 << indent << scope_tab << scope_tab << "var _internal_struct = new " << string << "();\n" 343 << indent << scope_tab << scope_tab << "var _internal_struct = new " << string << "();\n"
@@ -356,7 +356,7 @@ struct struct_internal_definition_generator
356 356
357 // to managed 357 // to managed
358 if (!as_generator( 358 if (!as_generator(
359 indent << scope_tab << "///<summary>Implicit conversion to the managed representation.</summary>\n" 359 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation.</summary>\n"
360 << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _internal_struct)\n" 360 << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _internal_struct)\n"
361 << indent << scope_tab << "{\n" 361 << indent << scope_tab << "{\n"
362 << indent << scope_tab << scope_tab << "var _external_struct = new " << string << "();\n" 362 << indent << scope_tab << scope_tab << "var _external_struct = new " << string << "();\n"
@@ -425,7 +425,7 @@ struct struct_definition_generator
425 // those 'mini-amd64.c condition fields not met' crashes. 425 // those 'mini-amd64.c condition fields not met' crashes.
426 if (struct_.fields.size() == 0) 426 if (struct_.fields.size() == 0)
427 { 427 {
428 if (!as_generator(indent << scope_tab << "///<summary>Placeholder field</summary>\n" 428 if (!as_generator(indent << scope_tab << "/// <summary>Placeholder field</summary>\n"
429 << indent << scope_tab << "public IntPtr field;\n").generate(sink, nullptr, context)) 429 << indent << scope_tab << "public IntPtr field;\n").generate(sink, nullptr, context))
430 return false; 430 return false;
431 } 431 }
@@ -433,7 +433,7 @@ struct struct_definition_generator
433 { 433 {
434 // Constructor with default parameters for easy struct initialization 434 // Constructor with default parameters for easy struct initialization
435 if(!as_generator( 435 if(!as_generator(
436 indent << scope_tab << "///<summary>Constructor for " << string << ".</summary>\n" 436 indent << scope_tab << "/// <summary>Constructor for " << string << ".</summary>\n"
437 << indent << scope_tab << "public " << string << "(\n" 437 << indent << scope_tab << "public " << string << "(\n"
438 << ((indent << scope_tab << scope_tab << field_argument_default) % ",\n") 438 << ((indent << scope_tab << scope_tab << field_argument_default) % ",\n")
439 << indent << scope_tab << ")\n" 439 << indent << scope_tab << ")\n"
@@ -445,8 +445,8 @@ struct struct_definition_generator
445 } 445 }
446 446
447 if(!as_generator( 447 if(!as_generator(
448 indent << scope_tab << "///<summary>Implicit conversion to the managed representation from a native pointer.</summary>\n" 448 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
449 << indent << scope_tab << "///<param name=\"ptr\">Native pointer to be converted.</param>\n" 449 << indent << scope_tab << "/// <param name=\"ptr\">Native pointer to be converted.</param>\n"
450 << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n" 450 << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
451 << indent << scope_tab << "{\n" 451 << indent << scope_tab << "{\n"
452 << indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n" 452 << indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n"