summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-07-08 17:18:47 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-07-08 17:20:08 +0200
commitec501a6623e8132caea14ad7e382d6e7c2f348c0 (patch)
tree48753cad1442ca9e9649842791980cadd6739731
parentec7bc0eddd7abc77d28605b0a6f0aea2e246a0ee (diff)
csharp: fix some build warnings related with incorrect and missing documentation
Summary: Some parameter names, tag names and cref identifiers in the documentation were incorrect and causing warnings during compilation. There were also warnings related with missing documentation in publicly visible elements in the manual binding. This commit fixes these incorrections and adds documentation to the manual binding in order to solve these compilation warnings. Warnings related with missing documentation in `.eo` files are still present. Test Plan: Just compile with mono binding. Reviewers: lauromoura, felipealmeida, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9243
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh3
-rw-r--r--src/bindings/mono/eina_mono/eina_stringshare.cs68
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs30
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs4
4 files changed, 66 insertions, 39 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 8f9932664b..c34d7c06e0 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -214,6 +214,7 @@ struct klass
214 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" 214 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
215 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n" 215 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
216 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n" 216 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
217 << scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
217 << scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n" 218 << scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
218 << scope_tab << "{\n" 219 << scope_tab << "{\n"
219 << scope_tab << "}\n\n" 220 << scope_tab << "}\n\n"
@@ -510,7 +511,7 @@ struct klass
510 << scope_tab << "}\n\n" 511 << scope_tab << "}\n\n"
511 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n" 512 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
512 << scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n" 513 << scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
513 << scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n" 514 << scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
514 << scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n" 515 << scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
515 << scope_tab << "{\n" 516 << scope_tab << "{\n"
516 << scope_tab << "}\n\n" 517 << scope_tab << "}\n\n"
diff --git a/src/bindings/mono/eina_mono/eina_stringshare.cs b/src/bindings/mono/eina_mono/eina_stringshare.cs
index 087db51bce..5b97e731e4 100644
--- a/src/bindings/mono/eina_mono/eina_stringshare.cs
+++ b/src/bindings/mono/eina_mono/eina_stringshare.cs
@@ -47,29 +47,29 @@ public static partial class NativeMethods
47/// </remarks> 47/// </remarks>
48public class Stringshare : IEquatable<Stringshare>, IEquatable<string> 48public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
49{ 49{
50 /// <sumary> 50 /// <summary>
51 /// Main constructor. Wrap the given string. 51 /// Main constructor. Wrap the given string.
52 /// Have private acess to avoid wrapping a null reference, 52 /// Have private acess to avoid wrapping a null reference,
53 /// use convertion or the factory method to create a new instance. 53 /// use convertion or the factory method to create a new instance.
54 /// <see cref="Stringshare.Create(string s)"/> 54 /// <see cref="Create(string)"/>
55 /// <see cref="Stringshare.operator Stringshare(string s)"/> 55 /// <see cref="implicit operator Stringshare(string)"/>
56 /// </sumary> 56 /// </summary>
57 private Stringshare(string s) 57 private Stringshare(string s)
58 { 58 {
59 Str = s; 59 Str = s;
60 } 60 }
61 61
62 /// <sumary> 62 /// <summary>
63 /// Auto-implemented property that holds the wrapped string value. 63 /// Auto-implemented property that holds the wrapped string value.
64 /// </sumary> 64 /// </summary>
65 public string Str { get; private set; } 65 public string Str { get; private set; }
66 66
67 /// <sumary> 67 /// <summary>
68 /// Factory method to instantiate a new object. 68 /// Factory method to instantiate a new object.
69 /// Get a wrappper for the given string or a null reference if the given 69 /// Get a wrappper for the given string or a null reference if the given
70 /// string reference is also null. 70 /// string reference is also null.
71 /// <seealso cref="Stringshare.operator Stringshare(string s)"/> 71 /// <seealso cref="implicit operator Stringshare(string)"/>
72 /// </sumary> 72 /// </summary>
73 /// <returns> 73 /// <returns>
74 /// A new instance wrapping the given string, or a null reference if 74 /// A new instance wrapping the given string, or a null reference if
75 /// the given string reference is also null. 75 /// the given string reference is also null.
@@ -84,9 +84,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
84 return new Stringshare(s); 84 return new Stringshare(s);
85 } 85 }
86 86
87 /// <sumary> 87 /// <summary>
88 /// Implicit convertion to string. 88 /// Implicit convertion to string.
89 /// </sumary> 89 /// </summary>
90 public static implicit operator string(Stringshare ss) 90 public static implicit operator string(Stringshare ss)
91 { 91 {
92 if (ReferenceEquals(null, ss)) 92 if (ReferenceEquals(null, ss))
@@ -97,13 +97,13 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
97 return ss.Str; 97 return ss.Str;
98 } 98 }
99 99
100 /// <sumary> 100 /// <summary>
101 /// Implicit convertion from string to Stringshare. 101 /// Implicit convertion from string to Stringshare.
102 /// </sumary> 102 /// </summary>
103 /// <remarks> 103 /// <remarks>
104 /// Note that this method can be used to create an instance of this class, 104 /// Note that this method can be used to create an instance of this class,
105 /// either via an explicit cast or an implicit convertion. 105 /// either via an explicit cast or an implicit convertion.
106 /// <seealso cref="Stringshare.Create(string s)"/> 106 /// <seealso cref="Create(string)"/>
107 /// </remarks> 107 /// </remarks>
108 public static implicit operator Stringshare(string s) 108 public static implicit operator Stringshare(string s)
109 { 109 {
@@ -115,9 +115,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
115 return new Stringshare(s); 115 return new Stringshare(s);
116 } 116 }
117 117
118 /// <sumary> 118 /// <summary>
119 /// Check two Stringshare objects for equality. 119 /// Check two Stringshare objects for equality.
120 /// </sumary> 120 /// </summary>
121 /// <returns> 121 /// <returns>
122 /// True if both wrapped strings have the same content or if both 122 /// True if both wrapped strings have the same content or if both
123 /// references are null, false otherwise. 123 /// references are null, false otherwise.
@@ -128,9 +128,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
128 } 128 }
129 129
130 130
131 /// <sumary> 131 /// <summary>
132 /// Check two Stringshare objects for inequality. 132 /// Check two Stringshare objects for inequality.
133 /// </sumary> 133 /// </summary>
134 /// <returns> 134 /// <returns>
135 /// True if the wrapped strings have different content or if one reference is null 135 /// True if the wrapped strings have different content or if one reference is null
136 /// and the other is not, false otherwise. 136 /// and the other is not, false otherwise.
@@ -140,20 +140,20 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
140 return !(ss1 == ss2); 140 return !(ss1 == ss2);
141 } 141 }
142 142
143 /// <sumary> 143 /// <summary>
144 /// Returns the wrapped string. 144 /// Returns the wrapped string.
145 /// <seealso cref="Stringshare.Str"/> 145 /// <seealso cref="Str"/>
146 /// <seealso cref="Stringshare.Get()"/> 146 /// <seealso cref="Get()"/>
147 /// </sumary> 147 /// </summary>
148 /// <returns>The wrapped string. Same as the property Str.</returns> 148 /// <returns>The wrapped string. Same as the property Str.</returns>
149 public override string ToString() 149 public override string ToString()
150 { 150 {
151 return Str; 151 return Str;
152 } 152 }
153 153
154 /// <sumary> 154 /// <summary>
155 /// Override of GetHashCode for consistency with user-defined equality methods. 155 /// Override of GetHashCode for consistency with user-defined equality methods.
156 /// </sumary> 156 /// </summary>
157 /// <returns> 157 /// <returns>
158 /// The wrapped string hash code. 158 /// The wrapped string hash code.
159 /// </returns> 159 /// </returns>
@@ -162,9 +162,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
162 return Str.GetHashCode(); 162 return Str.GetHashCode();
163 } 163 }
164 164
165 /// <sumary> 165 /// <summary>
166 /// Check the given object for equality. 166 /// Check the given object for equality.
167 /// </sumary> 167 /// </summary>
168 /// <returns> 168 /// <returns>
169 /// True if the given object is the same object or if it is another Stringshare object 169 /// True if the given object is the same object or if it is another Stringshare object
170 /// and both wrapped strings are equal or if it is a string object and its content 170 /// and both wrapped strings are equal or if it is a string object and its content
@@ -191,9 +191,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
191 return other.GetType() == typeof(Stringshare) && this == ((Stringshare)other); 191 return other.GetType() == typeof(Stringshare) && this == ((Stringshare)other);
192 } 192 }
193 193
194 /// <sumary> 194 /// <summary>
195 /// Check the given Stringshare for equality. 195 /// Check the given Stringshare for equality.
196 /// </sumary> 196 /// </summary>
197 /// <returns> 197 /// <returns>
198 /// True if the given Stringshare object is not null and its wrapped string 198 /// True if the given Stringshare object is not null and its wrapped string
199 /// have the same content of this.Str, false otherwise. 199 /// have the same content of this.Str, false otherwise.
@@ -203,9 +203,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
203 return this == other; 203 return this == other;
204 } 204 }
205 205
206 /// <sumary> 206 /// <summary>
207 /// Check the given Stringshare for equality. 207 /// Check the given Stringshare for equality.
208 /// </sumary> 208 /// </summary>
209 /// <returns> 209 /// <returns>
210 /// True if the given string is not null and the wrapped string have the same 210 /// True if the given string is not null and the wrapped string have the same
211 /// content of the given string, false otherwise. 211 /// content of the given string, false otherwise.
@@ -215,11 +215,11 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
215 return this.Str == other; 215 return this.Str == other;
216 } 216 }
217 217
218 /// <sumary> 218 /// <summary>
219 /// Get the wrapped string. 219 /// Get the wrapped string.
220 /// <seealso cref="Stringshare.Str"/> 220 /// <seealso cref="Str"/>
221 /// <seealso cref="Stringshare.ToString()"/> 221 /// <seealso cref="ToString()"/>
222 /// </sumary> 222 /// </summary>
223 /// <returns>The wrapped string. Same as the property Str.</returns> 223 /// <returns>The wrapped string. Same as the property Str.</returns>
224 public string Get() 224 public string Get()
225 { 225 {
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 5b14b48695..03edea018c 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -10,8 +10,15 @@ namespace Efl
10namespace Eo 10namespace Eo
11{ 11{
12 12
13/// <summary>
14/// Abstract class that delivers base level binding to Efl Objects.
15///
16/// Most of it is protected functionalities to serve the generated
17/// binding classes that inherit from it.
18/// </summary>
13public abstract class EoWrapper : IWrapper, IDisposable 19public abstract class EoWrapper : IWrapper, IDisposable
14{ 20{
21 /// <summary>Object used to synchronize access to EFL events.</summary>
15 protected readonly object eflBindingEventLock = new object(); 22 protected readonly object eflBindingEventLock = new object();
16 private bool generated = true; 23 private bool generated = true;
17 private System.IntPtr handle = IntPtr.Zero; 24 private System.IntPtr handle = IntPtr.Zero;
@@ -49,7 +56,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
49 /// <summary>Initializes a new instance of the <see cref="Object"/> class. 56 /// <summary>Initializes a new instance of the <see cref="Object"/> class.
50 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. 57 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
51 /// Do not implement this constructor.</summary> 58 /// Do not implement this constructor.</summary>
52 /// <param name="raw">The native pointer to be wrapped.</param> 59 /// <param name="wh">The native pointer to be wrapped.</param>
53 protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh) 60 protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh)
54 { 61 {
55 handle = wh.NativeHandle; 62 handle = wh.NativeHandle;
@@ -124,6 +131,15 @@ public abstract class EoWrapper : IWrapper, IDisposable
124 get; 131 get;
125 } 132 }
126 133
134 /// <summary>
135 /// Whether this object type is one of the generated binding classes or a custom
136 /// class defined by the user and that inherit from one of the generated ones.
137 /// </summary>
138 /// <returns>
139 /// True if this object type is one of the generated binding classes,
140 /// false if it is class that is manually defined and that inherits from
141 /// one of the generated ones, including user defined classes.
142 /// </returns>
127 protected bool IsGeneratedBindingClass 143 protected bool IsGeneratedBindingClass
128 { 144 {
129 get { return generated; } 145 get { return generated; }
@@ -269,7 +285,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
269 ws.MakeShared(); 285 ws.MakeShared();
270 } 286 }
271 287
272 /// <sumary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</sumary> 288 /// <summary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</summary>
273 private void AddWrapperSupervisor() 289 private void AddWrapperSupervisor()
274 { 290 {
275 var ws = new Efl.Eo.WrapperSupervisor(this); 291 var ws = new Efl.Eo.WrapperSupervisor(this);
@@ -291,16 +307,24 @@ public abstract class EoWrapper : IWrapper, IDisposable
291 Eina.Error.RaiseIfUnhandledException(); 307 Eina.Error.RaiseIfUnhandledException();
292 } 308 }
293 309
310 /// <summary>
311 /// Struct to be used when constructing objects from native code.
312 /// Wraps the pointer handle to the native object instance.
313 /// </summary>
294 protected struct ConstructingHandle 314 protected struct ConstructingHandle
295 { 315 {
316 /// <summary>Constructor for wrapping the native handle.</summary>
296 public ConstructingHandle(IntPtr h) 317 public ConstructingHandle(IntPtr h)
297 { 318 {
298 NativeHandle = h; 319 NativeHandle = h;
299 } 320 }
300 321
322 /// <summary>Pointer to the native instance.</summary>
301 public IntPtr NativeHandle { get; private set; } 323 public IntPtr NativeHandle { get; private set; }
302 } 324 }
303 325
326 /// <summary>Wrapper for native methods and virtual method delegates.
327 /// For internal use by generated code only.</summary>
304 public abstract class NativeMethods : Efl.Eo.NativeClass 328 public abstract class NativeMethods : Efl.Eo.NativeClass
305 { 329 {
306 private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor); 330 private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor);
@@ -308,6 +332,8 @@ public abstract class EoWrapper : IWrapper, IDisposable
308 332
309 private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd); 333 private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd);
310 334
335 /// <summary>Gets the list of Eo operations to override.</summary>
336 /// <returns>The list of Eo operations to be overload.</returns>
311 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(Type type) 337 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(Type type)
312 { 338 {
313 var descs = new System.Collections.Generic.List<Efl_Op_Description>(); 339 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 7c2eeb452b..833ae78302 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -716,11 +716,11 @@ public class Globals
716 Monitor.Exit(Efl.All.InitLock); 716 Monitor.Exit(Efl.All.InitLock);
717 } 717 }
718 718
719 /// <sumary> 719 /// <summary>
720 /// Internal struct used by the binding to pass the native handle pointer 720 /// Internal struct used by the binding to pass the native handle pointer
721 /// to the managed object wrapping constructor. 721 /// to the managed object wrapping constructor.
722 /// Internal usage only: do not use this class in inherited classes. 722 /// Internal usage only: do not use this class in inherited classes.
723 /// </sumary> 723 /// </summary>
724 public struct WrappingHandle 724 public struct WrappingHandle
725 { 725 {
726 public WrappingHandle(IntPtr h) 726 public WrappingHandle(IntPtr h)