summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-05-03 10:09:58 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-05-03 13:59:11 +0200
commit7047a056abb6e44811f12bab37546bdfb1ad98ab (patch)
treefb9126db459831cdd938b891c38ec10bee54c0e8 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parent2426656fd6b444b5b5fa86920dc9b61ff2fa10b1 (diff)
csharp: Some docs improvements.
Summary: - Silent missing docs warnign for API delegates - Document variables - Better docs for async functions Reviewers: segfaultxavi, vitor.sousa Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8809
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index d8f03118e7..14d3f7fdb3 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -267,7 +267,8 @@ struct struct_internal_definition_generator
267 auto const& indent = current_indentation(context); 267 auto const& indent = current_indentation(context);
268 if (!as_generator 268 if (!as_generator
269 ( 269 (
270 indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n" 270 indent << "#pragma warning disable CS1591\n\n"
271 << indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
271 << indent << "[StructLayout(LayoutKind.Sequential)]\n" 272 << indent << "[StructLayout(LayoutKind.Sequential)]\n"
272 << indent << "public struct " << string << "\n" 273 << indent << "public struct " << string << "\n"
273 << indent << "{\n" 274 << indent << "{\n"
@@ -367,7 +368,9 @@ struct struct_internal_definition_generator
367 return false; 368 return false;
368 369
369 // close internal class 370 // close internal class
370 if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false; 371 if(!as_generator(indent << "}\n\n"
372 << indent << "#pragma warning restore CS1591\n\n"
373 ).generate(sink, attributes::unused, context)) return false;
371 374
372 return true; 375 return true;
373 } 376 }
@@ -435,7 +438,9 @@ struct struct_definition_generator
435 } 438 }
436 439
437 if(!as_generator( 440 if(!as_generator(
438 indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n" 441 indent << scope_tab << "///<summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
442 << indent << scope_tab << "///<param name=\"ptr\">Native pointer to be converted.</param>\n"
443 << indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
439 << indent << scope_tab << "{\n" 444 << indent << scope_tab << "{\n"
440 << indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n" 445 << indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n"
441 << indent << scope_tab << scope_tab << "return tmp;\n" 446 << indent << scope_tab << scope_tab << "return tmp;\n"