forked from enlightenment/efl
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
This commit is contained in:
parent
ec7bc0eddd
commit
ec501a6623
|
@ -214,6 +214,7 @@ struct klass
|
||||||
<< scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
|
<< scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
|
||||||
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
|
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
|
||||||
<< scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
|
<< scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
|
||||||
|
<< scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
|
||||||
<< scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
|
<< scope_tab << "private " << concrete_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
|
||||||
<< scope_tab << "{\n"
|
<< scope_tab << "{\n"
|
||||||
<< scope_tab << "}\n\n"
|
<< scope_tab << "}\n\n"
|
||||||
|
@ -510,7 +511,7 @@ struct klass
|
||||||
<< scope_tab << "}\n\n"
|
<< scope_tab << "}\n\n"
|
||||||
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
|
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
|
||||||
<< 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"
|
<< 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"
|
||||||
<< scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n"
|
<< scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
|
||||||
<< scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
|
<< scope_tab << "protected " << inherit_name << "(Efl.Eo.Globals.WrappingHandle wh) : base(wh)\n"
|
||||||
<< scope_tab << "{\n"
|
<< scope_tab << "{\n"
|
||||||
<< scope_tab << "}\n\n"
|
<< scope_tab << "}\n\n"
|
||||||
|
|
|
@ -47,29 +47,29 @@ public static partial class NativeMethods
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
{
|
{
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Main constructor. Wrap the given string.
|
/// Main constructor. Wrap the given string.
|
||||||
/// Have private acess to avoid wrapping a null reference,
|
/// Have private acess to avoid wrapping a null reference,
|
||||||
/// use convertion or the factory method to create a new instance.
|
/// use convertion or the factory method to create a new instance.
|
||||||
/// <see cref="Stringshare.Create(string s)"/>
|
/// <see cref="Create(string)"/>
|
||||||
/// <see cref="Stringshare.operator Stringshare(string s)"/>
|
/// <see cref="implicit operator Stringshare(string)"/>
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
private Stringshare(string s)
|
private Stringshare(string s)
|
||||||
{
|
{
|
||||||
Str = s;
|
Str = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Auto-implemented property that holds the wrapped string value.
|
/// Auto-implemented property that holds the wrapped string value.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
public string Str { get; private set; }
|
public string Str { get; private set; }
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Factory method to instantiate a new object.
|
/// Factory method to instantiate a new object.
|
||||||
/// Get a wrappper for the given string or a null reference if the given
|
/// Get a wrappper for the given string or a null reference if the given
|
||||||
/// string reference is also null.
|
/// string reference is also null.
|
||||||
/// <seealso cref="Stringshare.operator Stringshare(string s)"/>
|
/// <seealso cref="implicit operator Stringshare(string)"/>
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A new instance wrapping the given string, or a null reference if
|
/// A new instance wrapping the given string, or a null reference if
|
||||||
/// the given string reference is also null.
|
/// the given string reference is also null.
|
||||||
|
@ -84,9 +84,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return new Stringshare(s);
|
return new Stringshare(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Implicit convertion to string.
|
/// Implicit convertion to string.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
public static implicit operator string(Stringshare ss)
|
public static implicit operator string(Stringshare ss)
|
||||||
{
|
{
|
||||||
if (ReferenceEquals(null, ss))
|
if (ReferenceEquals(null, ss))
|
||||||
|
@ -97,13 +97,13 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return ss.Str;
|
return ss.Str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Implicit convertion from string to Stringshare.
|
/// Implicit convertion from string to Stringshare.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Note that this method can be used to create an instance of this class,
|
/// Note that this method can be used to create an instance of this class,
|
||||||
/// either via an explicit cast or an implicit convertion.
|
/// either via an explicit cast or an implicit convertion.
|
||||||
/// <seealso cref="Stringshare.Create(string s)"/>
|
/// <seealso cref="Create(string)"/>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static implicit operator Stringshare(string s)
|
public static implicit operator Stringshare(string s)
|
||||||
{
|
{
|
||||||
|
@ -115,9 +115,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return new Stringshare(s);
|
return new Stringshare(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Check two Stringshare objects for equality.
|
/// Check two Stringshare objects for equality.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// True if both wrapped strings have the same content or if both
|
/// True if both wrapped strings have the same content or if both
|
||||||
/// references are null, false otherwise.
|
/// references are null, false otherwise.
|
||||||
|
@ -128,9 +128,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Check two Stringshare objects for inequality.
|
/// Check two Stringshare objects for inequality.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// True if the wrapped strings have different content or if one reference is null
|
/// True if the wrapped strings have different content or if one reference is null
|
||||||
/// and the other is not, false otherwise.
|
/// and the other is not, false otherwise.
|
||||||
|
@ -140,20 +140,20 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return !(ss1 == ss2);
|
return !(ss1 == ss2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Returns the wrapped string.
|
/// Returns the wrapped string.
|
||||||
/// <seealso cref="Stringshare.Str"/>
|
/// <seealso cref="Str"/>
|
||||||
/// <seealso cref="Stringshare.Get()"/>
|
/// <seealso cref="Get()"/>
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>The wrapped string. Same as the property Str.</returns>
|
/// <returns>The wrapped string. Same as the property Str.</returns>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return Str;
|
return Str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Override of GetHashCode for consistency with user-defined equality methods.
|
/// Override of GetHashCode for consistency with user-defined equality methods.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The wrapped string hash code.
|
/// The wrapped string hash code.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
@ -162,9 +162,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return Str.GetHashCode();
|
return Str.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Check the given object for equality.
|
/// Check the given object for equality.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// True if the given object is the same object or if it is another Stringshare object
|
/// True if the given object is the same object or if it is another Stringshare object
|
||||||
/// and both wrapped strings are equal or if it is a string object and its content
|
/// 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>
|
||||||
return other.GetType() == typeof(Stringshare) && this == ((Stringshare)other);
|
return other.GetType() == typeof(Stringshare) && this == ((Stringshare)other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Check the given Stringshare for equality.
|
/// Check the given Stringshare for equality.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// True if the given Stringshare object is not null and its wrapped string
|
/// True if the given Stringshare object is not null and its wrapped string
|
||||||
/// have the same content of this.Str, false otherwise.
|
/// have the same content of this.Str, false otherwise.
|
||||||
|
@ -203,9 +203,9 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return this == other;
|
return this == other;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Check the given Stringshare for equality.
|
/// Check the given Stringshare for equality.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// True if the given string is not null and the wrapped string have the same
|
/// True if the given string is not null and the wrapped string have the same
|
||||||
/// content of the given string, false otherwise.
|
/// content of the given string, false otherwise.
|
||||||
|
@ -215,11 +215,11 @@ public class Stringshare : IEquatable<Stringshare>, IEquatable<string>
|
||||||
return this.Str == other;
|
return this.Str == other;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Get the wrapped string.
|
/// Get the wrapped string.
|
||||||
/// <seealso cref="Stringshare.Str"/>
|
/// <seealso cref="Str"/>
|
||||||
/// <seealso cref="Stringshare.ToString()"/>
|
/// <seealso cref="ToString()"/>
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
/// <returns>The wrapped string. Same as the property Str.</returns>
|
/// <returns>The wrapped string. Same as the property Str.</returns>
|
||||||
public string Get()
|
public string Get()
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,8 +10,15 @@ namespace Efl
|
||||||
namespace Eo
|
namespace Eo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Abstract class that delivers base level binding to Efl Objects.
|
||||||
|
///
|
||||||
|
/// Most of it is protected functionalities to serve the generated
|
||||||
|
/// binding classes that inherit from it.
|
||||||
|
/// </summary>
|
||||||
public abstract class EoWrapper : IWrapper, IDisposable
|
public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
{
|
{
|
||||||
|
/// <summary>Object used to synchronize access to EFL events.</summary>
|
||||||
protected readonly object eflBindingEventLock = new object();
|
protected readonly object eflBindingEventLock = new object();
|
||||||
private bool generated = true;
|
private bool generated = true;
|
||||||
private System.IntPtr handle = IntPtr.Zero;
|
private System.IntPtr handle = IntPtr.Zero;
|
||||||
|
@ -49,7 +56,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
/// <summary>Initializes a new instance of the <see cref="Object"/> class.
|
/// <summary>Initializes a new instance of the <see cref="Object"/> class.
|
||||||
/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
|
/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
|
||||||
/// Do not implement this constructor.</summary>
|
/// Do not implement this constructor.</summary>
|
||||||
/// <param name="raw">The native pointer to be wrapped.</param>
|
/// <param name="wh">The native pointer to be wrapped.</param>
|
||||||
protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh)
|
protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh)
|
||||||
{
|
{
|
||||||
handle = wh.NativeHandle;
|
handle = wh.NativeHandle;
|
||||||
|
@ -124,6 +131,15 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this object type is one of the generated binding classes or a custom
|
||||||
|
/// class defined by the user and that inherit from one of the generated ones.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// True if this object type is one of the generated binding classes,
|
||||||
|
/// false if it is class that is manually defined and that inherits from
|
||||||
|
/// one of the generated ones, including user defined classes.
|
||||||
|
/// </returns>
|
||||||
protected bool IsGeneratedBindingClass
|
protected bool IsGeneratedBindingClass
|
||||||
{
|
{
|
||||||
get { return generated; }
|
get { return generated; }
|
||||||
|
@ -269,7 +285,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
ws.MakeShared();
|
ws.MakeShared();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</sumary>
|
/// <summary>Create and set to the internal native state a C# supervisor for this Eo wrapper. For internal use only.</summary>
|
||||||
private void AddWrapperSupervisor()
|
private void AddWrapperSupervisor()
|
||||||
{
|
{
|
||||||
var ws = new Efl.Eo.WrapperSupervisor(this);
|
var ws = new Efl.Eo.WrapperSupervisor(this);
|
||||||
|
@ -291,16 +307,24 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
Eina.Error.RaiseIfUnhandledException();
|
Eina.Error.RaiseIfUnhandledException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Struct to be used when constructing objects from native code.
|
||||||
|
/// Wraps the pointer handle to the native object instance.
|
||||||
|
/// </summary>
|
||||||
protected struct ConstructingHandle
|
protected struct ConstructingHandle
|
||||||
{
|
{
|
||||||
|
/// <summary>Constructor for wrapping the native handle.</summary>
|
||||||
public ConstructingHandle(IntPtr h)
|
public ConstructingHandle(IntPtr h)
|
||||||
{
|
{
|
||||||
NativeHandle = h;
|
NativeHandle = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Pointer to the native instance.</summary>
|
||||||
public IntPtr NativeHandle { get; private set; }
|
public IntPtr NativeHandle { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Wrapper for native methods and virtual method delegates.
|
||||||
|
/// For internal use by generated code only.</summary>
|
||||||
public abstract class NativeMethods : Efl.Eo.NativeClass
|
public abstract class NativeMethods : Efl.Eo.NativeClass
|
||||||
{
|
{
|
||||||
private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor);
|
private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor);
|
||||||
|
@ -308,6 +332,8 @@ public abstract class EoWrapper : IWrapper, IDisposable
|
||||||
|
|
||||||
private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd);
|
private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd);
|
||||||
|
|
||||||
|
/// <summary>Gets the list of Eo operations to override.</summary>
|
||||||
|
/// <returns>The list of Eo operations to be overload.</returns>
|
||||||
public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(Type type)
|
public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(Type type)
|
||||||
{
|
{
|
||||||
var descs = new System.Collections.Generic.List<Efl_Op_Description>();
|
var descs = new System.Collections.Generic.List<Efl_Op_Description>();
|
||||||
|
|
|
@ -716,11 +716,11 @@ public class Globals
|
||||||
Monitor.Exit(Efl.All.InitLock);
|
Monitor.Exit(Efl.All.InitLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <sumary>
|
/// <summary>
|
||||||
/// Internal struct used by the binding to pass the native handle pointer
|
/// Internal struct used by the binding to pass the native handle pointer
|
||||||
/// to the managed object wrapping constructor.
|
/// to the managed object wrapping constructor.
|
||||||
/// Internal usage only: do not use this class in inherited classes.
|
/// Internal usage only: do not use this class in inherited classes.
|
||||||
/// </sumary>
|
/// </summary>
|
||||||
public struct WrappingHandle
|
public struct WrappingHandle
|
||||||
{
|
{
|
||||||
public WrappingHandle(IntPtr h)
|
public WrappingHandle(IntPtr h)
|
||||||
|
|
Loading…
Reference in New Issue