From f33183ba04d6f71938f26850c1bf45d5dfbf3686 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Thu, 24 Oct 2019 18:42:40 +0200 Subject: [PATCH] csharp: Add since information to EoWrapper.cs Reviewers: brunobelo, segfaultxavi, felipealmeida, woohyun Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10429 --- src/bindings/mono/eo_mono/EoWrapper.cs | 89 +++++++++++++++++++------- 1 file changed, 66 insertions(+), 23 deletions(-) diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs index 6f13b525ec..87a3743a3e 100644 --- a/src/bindings/mono/eo_mono/EoWrapper.cs +++ b/src/bindings/mono/eo_mono/EoWrapper.cs @@ -31,6 +31,8 @@ namespace Eo /// /// Most of it is protected functionalities to serve the generated /// binding classes that inherit from it. +/// +/// Since EFL 1.23. /// public abstract class EoWrapper : IWrapper, IDisposable { @@ -45,14 +47,17 @@ public abstract class EoWrapper : IWrapper, IDisposable private Hashtable keyValueHash = null; /// Constructor to be used when objects are expected to be constructed from native code. - /// For a class that inherited from an EFL# class to be properly constructed from native code + /// For a class that inherited from an EFL# class to be properly constructed from native code /// one must create a constructor with this signature and calls this base constructor from it. /// This constructor will take care of calling base constructors of the native classes and - /// perform additional setup so objects are ready to use. - /// It is advisable to check for the property in the top level + /// perform additional setup so objects are ready to use. + /// It is advisable to check for the property in the top level /// constructor and signal an error when it has a value of IntPtr.Zero after this - /// constructor completion. - /// Warning: Do not use this constructor directly from a `new` statement. + /// constructor completion. + /// Warning: Do not use this constructor directly from a `new` statement. + /// Since EFL 1.23. + /// + /// /// Tag struct storing the native handle of the object being constructed. protected EoWrapper(ConstructingHandle ch) { @@ -71,8 +76,10 @@ public abstract class EoWrapper : IWrapper, IDisposable } /// Initializes a new instance of the class. - /// 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. + /// 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. + /// Since EFL 1.23. + /// /// The native pointer to be wrapped. protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh) { @@ -81,8 +88,10 @@ public abstract class EoWrapper : IWrapper, IDisposable } /// Initializes a new instance of the class. - /// Internal usage: Constructor to actually call the native library constructors. C# subclasses - /// must use the public constructor only. + /// Internal usage: Constructor to actually call the native library constructors. C# subclasses + /// must use the public constructor only. + /// Since EFL 1.23. + /// /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. /// Name of the file from where the constructor is called. @@ -129,19 +138,25 @@ public abstract class EoWrapper : IWrapper, IDisposable AddWrapperSupervisor(); } - /// Destructor. + /// Destructor. + /// Since EFL 1.23. + /// ~EoWrapper() { Dispose(false); } - /// Pointer to the native instance. + /// Pointer to the native instance. + /// Since EFL 1.23. + /// public System.IntPtr NativeHandle { get { return handle; } } - /// Pointer to the native class description. + /// Pointer to the native class description. + /// Since EFL 1.23. + /// public abstract System.IntPtr NativeClass { get; @@ -150,6 +165,7 @@ public abstract class EoWrapper : IWrapper, IDisposable /// /// 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. + /// Since EFL 1.23. /// /// /// True if this object type is one of the generated binding classes, @@ -161,7 +177,9 @@ public abstract class EoWrapper : IWrapper, IDisposable get { return generated; } } - /// Releases the underlying native instance. + /// Releases the underlying native instance. + /// Since EFL 1.23. + /// protected virtual void Dispose(bool disposing) { if (disposing && handle != System.IntPtr.Zero) @@ -182,14 +200,18 @@ public abstract class EoWrapper : IWrapper, IDisposable } } - /// Turns the native pointer into a string representation. + /// Turns the native pointer into a string representation. + /// Since EFL 1.23. + /// /// A string with the type and the native pointer for this object. public override String ToString() { return $"{this.GetType().Name}@[0x{(UInt64)handle:x}]"; } - /// Releases the underlying native instance. + /// Releases the underlying native instance. + /// Since EFL 1.23. + /// public void Dispose() { Dispose(true); @@ -200,6 +222,7 @@ public abstract class EoWrapper : IWrapper, IDisposable /// /// This method is a C# counterpart to the C `efl_del` function. It removes the parent of the object /// and releases the Eo reference it was holding. + /// Since EFL 1.23. /// public void Del() { @@ -209,7 +232,9 @@ public abstract class EoWrapper : IWrapper, IDisposable } /// Finishes instantiating this object. - /// Internal usage by generated code. + /// Internal usage by generated code. + /// Since EFL 1.23. + /// protected void FinishInstantiation() { Eina.Log.Debug("calling efl_add_internal_end"); @@ -223,7 +248,10 @@ public abstract class EoWrapper : IWrapper, IDisposable handle = h; } - /// Adds a new event handler, registering it to the native event. For internal use only. + /// Adds a new event handler, registering it to the native event. + /// For internal use only. + /// Since EFL 1.23. + /// /// The name of the native library definining the event. /// The name of the native event. /// Delegate to be called by native code on event raising. @@ -259,7 +287,10 @@ public abstract class EoWrapper : IWrapper, IDisposable } } - /// Removes the given event handler for the given event. For internal use only. + /// Removes the given event handler for the given event. + /// For internal use only. + /// Since EFL 1.23. + /// /// The name of the native library definining the event. /// The name of the native event. /// The delegate to be removed. @@ -331,22 +362,29 @@ public abstract class EoWrapper : IWrapper, IDisposable /// /// Struct to be used when constructing objects from native code. - /// Wraps the pointer handle to the native object instance. + /// For internal use by generated code only. + /// Wraps the pointer handle to the native object instance. + /// Since EFL 1.23. /// protected struct ConstructingHandle { - /// Constructor for wrapping the native handle. + /// Constructor for wrapping the native handle. + /// Since EFL 1.23. + /// public ConstructingHandle(IntPtr h) { NativeHandle = h; } - /// Pointer to the native instance. + /// Pointer to the native instance. + /// Since EFL 1.23. + /// public IntPtr NativeHandle { get; private set; } } /// /// Set a value object associated with a key object. + /// Since EFL 1.23. /// public void SetKeyValue(object key, object val) { @@ -358,6 +396,7 @@ public abstract class EoWrapper : IWrapper, IDisposable /// /// Get a value object associated with a key object. + /// Since EFL 1.23. /// public object GetKeyValue(object key) { @@ -368,7 +407,9 @@ public abstract class EoWrapper : IWrapper, IDisposable } /// Wrapper for native methods and virtual method delegates. - /// For internal use by generated code only. + /// For internal use by generated code only. + /// Since EFL 1.23. + /// public abstract class NativeMethods : Efl.Eo.NativeClass { private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor); @@ -376,7 +417,9 @@ public abstract class EoWrapper : IWrapper, IDisposable private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd); - /// Gets the list of Eo operations to override. + /// Gets the list of Eo operations to override. + /// Since EFL 1.23. + /// /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(Type type, bool includeInherited) {