summaryrefslogtreecommitdiff
path: root/src/bin
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
parentd671c7e42b2be664eec6090b82089b393e0ef741 (diff)
eolian_mono: Fix whitespace in generated cs files
Pet peeve of mine.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh6
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh20
3 files changed, 14 insertions, 14 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index ef4f5f4dbd..fc623d02e3 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -247,12 +247,12 @@ struct event_argument_wrapper_generator
247 247
248 std::string evt_name = name_helpers::managed_event_name(evt.name); 248 std::string evt_name = name_helpers::managed_event_name(evt.name);
249 249
250 return as_generator("///<summary>Event argument wrapper for event <see cref=\"" 250 return as_generator("/// <summary>Event argument wrapper for event <see cref=\""
251 << join_namespaces(evt.klass.namespaces, '.', managed_namespace) 251 << join_namespaces(evt.klass.namespaces, '.', managed_namespace)
252 << klass_interface_name(evt.klass) << "." << evt_name << "\"/>.</summary>\n" 252 << klass_interface_name(evt.klass) << "." << evt_name << "\"/>.</summary>\n"
253 << "[Efl.Eo.BindingEntity]\n" 253 << "[Efl.Eo.BindingEntity]\n"
254 << "public class " << name_helpers::managed_event_args_short_name(evt) << " : EventArgs {\n" 254 << "public class " << name_helpers::managed_event_args_short_name(evt) << " : EventArgs {\n"
255 << scope_tab << "///<summary>Actual event payload.</summary>\n" 255 << scope_tab << "/// <summary>Actual event payload.</summary>\n"
256 << scope_tab << "public " << type << " arg { get; set; }\n" 256 << scope_tab << "public " << type << " arg { get; set; }\n"
257 << "}\n" 257 << "}\n"
258 ).generate(sink, *etype, context); 258 ).generate(sink, *etype, context);
@@ -404,7 +404,7 @@ struct event_definition_generator
404 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename); 404 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename);
405 std::string upper_c_name = utils::to_uppercase(evt.c_name); 405 std::string upper_c_name = utils::to_uppercase(evt.c_name);
406 if (!as_generator( 406 if (!as_generator(
407 scope_tab << "///<summary>Method to raise event "<< event_name << ".</summary>\n" 407 scope_tab << "/// <summary>Method to raise event "<< event_name << ".</summary>\n"
408 << scope_tab << "public void On" << event_name << "(" << event_args_type << " e)\n" 408 << scope_tab << "public void On" << event_name << "(" << event_args_type << " e)\n"
409 << scope_tab << "{\n" 409 << scope_tab << "{\n"
410 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << "\";\n" 410 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << "\";\n"
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 46215b95a1..80d4debc99 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -459,7 +459,7 @@ struct klass
459 auto inherit_name = name_helpers::klass_concrete_name(cls); 459 auto inherit_name = name_helpers::klass_concrete_name(cls);
460 460
461 if(!as_generator( 461 if(!as_generator(
462 scope_tab << "///<summary>Pointer to the native class description.</summary>\n" 462 scope_tab << "/// <summary>Pointer to the native class description.</summary>\n"
463 << scope_tab << "public override System.IntPtr NativeClass\n" 463 << scope_tab << "public override System.IntPtr NativeClass\n"
464 << scope_tab << "{\n" 464 << scope_tab << "{\n"
465 << scope_tab << scope_tab << "get\n" 465 << scope_tab << scope_tab << "get\n"
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"