summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-01-13 09:45:16 +0900
committerYeongjong Lee <yj34.lee@samsung.com>2020-01-13 10:16:24 +0900
commit3fc78f69eb095e65c2be0bd172dd49d49b5b837f (patch)
treec968a761995b3ec745484c08a9e7f88cc9fd790b /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parenta7d5b089da67c4a30731ef876efe7530b6707db0 (diff)
eolian_mono: add 1 tab inside the namespace
Summary: Also, this patch will fix indentation of enum, struct. ### Before ``` namespace Efl.Ui { /// <summary>Define the move or resize mode of a window. /// /// The user can request the display server to start moving or resizing the window by combining these modes. However only limited combinations are allowed. ... [Efl.Eo.BindingEntity] public enum WinMoveResizeMode { /// <summary>Start moving window<br/>Since EFL 1.22.</summary> Move = 1, /// <summary>Start resizing window to the top<br/>Since EFL 1.22.</summary> Top = 2, ... } } ``` ### After ``` namespace Efl.Ui { /// <summary>Define the move or resize mode of a window. /// /// The user can request the display server to start moving or resizing the window by combining these modes. However only limited combinations are allowed. ... [Efl.Eo.BindingEntity] public enum WinMoveResizeMode { /// <summary>Start moving window<br/>Since EFL 1.22.</summary> Move = 1, /// <summary>Start resizing window to the top<br/>Since EFL 1.22.</summary> Top = 2, ... } } ``` Reviewers: Jaehyun_Cho, felipealmeida Reviewed By: felipealmeida Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11032
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 7a3019ec45..24d0ff34ca 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -296,7 +296,7 @@ struct struct_internal_definition_generator
296 auto const& indent = current_indentation(context); 296 auto const& indent = current_indentation(context);
297 if (!as_generator 297 if (!as_generator
298 ( 298 (
299 indent << "#pragma warning disable CS1591\n\n" 299 "#pragma warning disable CS1591\n\n"
300 << indent << "/// <summary>Internal wrapper for struct " << string << ".</summary>\n" 300 << indent << "/// <summary>Internal wrapper for struct " << string << ".</summary>\n"
301 << indent << "[StructLayout(LayoutKind.Sequential)]\n" 301 << indent << "[StructLayout(LayoutKind.Sequential)]\n"
302 << indent << "internal struct " << string << "\n" 302 << indent << "internal struct " << string << "\n"
@@ -398,7 +398,7 @@ struct struct_internal_definition_generator
398 398
399 // close internal class 399 // close internal class
400 if(!as_generator(indent << "}\n" 400 if(!as_generator(indent << "}\n"
401 << indent << "#pragma warning restore CS1591\n" 401 << "#pragma warning restore CS1591\n"
402 ).generate(sink, attributes::unused, context)) return false; 402 ).generate(sink, attributes::unused, context)) return false;
403 403
404 return true; 404 return true;
@@ -426,7 +426,7 @@ struct struct_definition_generator
426 return true; 426 return true;
427 427
428 auto struct_name = binding_struct_name(struct_); 428 auto struct_name = binding_struct_name(struct_);
429 auto const& indent = current_indentation(context); 429 auto const& indent = current_indentation(context).inc();
430 430
431 if (!as_generator( 431 if (!as_generator(
432 indent << scope_tab << "/// <summary>Packs tuple into " << struct_name << " object.\n" 432 indent << scope_tab << "/// <summary>Packs tuple into " << struct_name << " object.\n"
@@ -472,7 +472,7 @@ struct struct_definition_generator
472 template <typename OutputIterator, typename Context> 472 template <typename OutputIterator, typename Context>
473 bool generate_deconstruct_method(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const 473 bool generate_deconstruct_method(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const
474 { 474 {
475 auto const& indent = current_indentation(context); 475 auto const& indent = current_indentation(context).inc();
476 auto struct_name = binding_struct_name(struct_); 476 auto struct_name = binding_struct_name(struct_);
477 477
478 if (!as_generator( 478 if (!as_generator(
@@ -528,15 +528,15 @@ struct struct_definition_generator
528 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const 528 bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const
529 { 529 {
530 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "struct_definition_generator: " << struct_.cxx_name << std::endl; 530 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "struct_definition_generator: " << struct_.cxx_name << std::endl;
531 auto const& indent = current_indentation(context); 531 auto const& indent = current_indentation(context).inc();
532 if(!as_generator(documentation).generate(sink, struct_, context)) 532 if(!as_generator(documentation(1)).generate(sink, struct_, context))
533 return false; 533 return false;
534 auto struct_managed_name = binding_struct_name(struct_); 534 auto struct_managed_name = binding_struct_name(struct_);
535 if(!as_generator 535 if(!as_generator
536 ( 536 (
537 indent << "[StructLayout(LayoutKind.Sequential)]\n" 537 indent << "[StructLayout(LayoutKind.Sequential)]\n"
538 << indent << "[Efl.Eo.BindingEntity]\n" 538 << indent << "[Efl.Eo.BindingEntity]\n"
539 << "[SuppressMessage(\"Microsoft.Naming\", \"CA1724:TypeNamesShouldNotMatchNamespaces\")]\n" 539 << indent << "[SuppressMessage(\"Microsoft.Naming\", \"CA1724:TypeNamesShouldNotMatchNamespaces\")]\n"
540 << indent << "public struct " << struct_managed_name << " : IEquatable<" << struct_managed_name << ">\n" 540 << indent << "public struct " << struct_managed_name << " : IEquatable<" << struct_managed_name << ">\n"
541 << indent << "{\n" 541 << indent << "{\n"
542 ) 542 )