From 015ae0df566f57c57e9654c95c47d71f4dc67e29 Mon Sep 17 00:00:00 2001 From: Xiaohui Fang Date: Tue, 25 Feb 2025 11:39:24 +0800 Subject: [PATCH 1/3] Remove DALi instance from Size --- .../src/public/BaseComponents/TextUtils.cs | 10 +- .../BaseComponents/ViewBindableProperty.cs | 12 +- .../src/public/BaseComponents/ViewInternal.cs | 2 + .../src/public/Common/PropertyValue.cs | 16 +- src/Tizen.NUI/src/public/Common/Size.cs | 196 +++++++++++------- 5 files changed, 152 insertions(+), 84 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs b/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs index e7deb1ed7c7..8da86abffb4 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs @@ -758,7 +758,10 @@ public Size Size { set { - Interop.EmbeddedItemInfo.SizeSet(SwigCPtr, Size.getCPtr(value)); + var handle = Size.GetHandleRef(value); + Interop.EmbeddedItemInfo.SizeSet(SwigCPtr, handle); + Size.ReleaseHandleRef(handle); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get @@ -778,7 +781,10 @@ public Size RotatedSize { set { - Interop.EmbeddedItemInfo.RotatedSizeSet(SwigCPtr, Size.getCPtr(value)); + var handleRef = Size.GetHandleRef(value); + Interop.EmbeddedItemInfo.RotatedSizeSet(SwigCPtr, handleRef); + Size.ReleaseHandleRef (handleRef); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs index da0cd4b3d26..98e425b2e7c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs @@ -1595,7 +1595,17 @@ internal static object GetInternalSizeProperty(BindableObject bindable) { view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0); } - Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr); + + var w = Interop.Actor.InternalGetPropertyFloat(view.SwigCPtr, Property.SizeWidth); + var h = Interop.Actor.InternalGetPropertyFloat(view.SwigCPtr, Property.SizeHeight); + var d = view.sizeDepth; + + view.internalSize.ResetValue(w, h, d); + + if (NDalicPINVOKE.SWIGPendingException.Pending) + { + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } return view.internalSize; } diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs index f997c860deb..c419a5f70c4 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs @@ -542,8 +542,10 @@ internal void SetSize(float width, float height) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + private float sizeDepth = 0.0f; internal void SetSize(float width, float height, float depth) { + sizeDepth = depth; Interop.ActorInternal.SetSize(SwigCPtr, width, height, depth); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/public/Common/PropertyValue.cs b/src/Tizen.NUI/src/public/Common/PropertyValue.cs index ae5cf5c5b8c..a9d02a2220e 100755 --- a/src/Tizen.NUI/src/public/Common/PropertyValue.cs +++ b/src/Tizen.NUI/src/public/Common/PropertyValue.cs @@ -220,9 +220,8 @@ public PropertyValue(PropertyValue value) : this(Interop.PropertyValue.NewProper /// Creates a Size property value. /// /// Size values. - internal PropertyValue(Size vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector3(Size.getCPtr(vectorValue)), true) + internal PropertyValue(Size vectorValue) : this(vectorValue.Width, vectorValue.Height, vectorValue.Depth) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal PropertyValue(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { @@ -548,7 +547,8 @@ static public PropertyValue CreateFromObject(System.Object obj) } else if (type.Equals(typeof(Size))) { - value = Interop.PropertyValue.NewPropertyValueVector3(Size.getCPtr((Size)obj)); + var size = obj as Size; + value = Interop.PropertyValue.NewPropertyValueVector3Componentwise(size.Width, size.Height, size.Depth); } else if (type.Equals(typeof(Size2D))) { @@ -655,8 +655,14 @@ public bool Get(Position2D vectorValue) [EditorBrowsable(EditorBrowsableState.Never)] public bool Get(Size vectorValue) { - bool ret = Interop.PropertyValue.GetVector3(SwigCPtr, Size.getCPtr(vectorValue)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + if (null == vectorValue) + { + throw new ArgumentNullException(nameof(vectorValue)); + } + + var ret = GetVector3Component(out var w, out var h, out var d); + vectorValue.ResetValue(w, h, d); + return ret; } diff --git a/src/Tizen.NUI/src/public/Common/Size.cs b/src/Tizen.NUI/src/public/Common/Size.cs index 6ba1226f3c8..0b47e86eb19 100755 --- a/src/Tizen.NUI/src/public/Common/Size.cs +++ b/src/Tizen.NUI/src/public/Common/Size.cs @@ -28,7 +28,11 @@ namespace Tizen.NUI [Tizen.NUI.Binding.TypeConverter(typeof(SizeTypeConverter))] public class Size : Disposable, ICloneable { - private static readonly Vector3 zero = new Vector3(0.0f, 0.0f, 0.0f); + private static readonly Size zero = new Size(0.0f, 0.0f, 0.0f); + + private float width; + private float height; + private float depth; /// /// The constructor. @@ -42,9 +46,8 @@ public class Size : Disposable, ICloneable /// Size Tmp = view.MaximumSize; //here Tmp.Depth will be 0.0f.
/// /// 5 - public Size() : this(Interop.Vector3.NewVector3(), true) + public Size() { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// @@ -62,9 +65,11 @@ public Size() : this(Interop.Vector3.NewVector3(), true) /// Size Tmp = view.MaximumSize; //here Tmp.Depth will be 0.0f.
/// /// 5 - public Size(float width, float height, float depth = 0.0f) : this(Interop.Vector3.NewVector3(width, height, depth), true) + public Size(float width, float height, float depth = 0.0f) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + this.width = width; + this.height = height; + this.depth = depth; } /// @@ -72,9 +77,13 @@ public Size(float width, float height, float depth = 0.0f) : this(Interop.Vector /// /// Size2D with width and height. /// 5 - public Size(Size2D size2d) : this(Interop.Vector3.NewVector3WithVector2(Size2D.getCPtr(size2d)), true) + public Size(Size2D size2d) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + if (null != size2d) + { + width = size2d.Width; + height = size2d.Height; + } } /// @@ -103,16 +112,12 @@ public float Width [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Size(...) constructor")] set { - Interop.Vector3.WidthSet(SwigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - callback?.Invoke(value, Height, Depth); + width = value; + callback?.Invoke(width, Height, Depth); } get { - float ret = Interop.Vector3.WidthGet(SwigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); - return ret; + return width; } } @@ -136,16 +141,12 @@ public float Height [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Size(...) constructor")] set { - Interop.Vector3.HeightSet(SwigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - callback?.Invoke(Width, value, Depth); + height = value; + callback?.Invoke(width, Height, Depth); } get { - float ret = Interop.Vector3.HeightGet(SwigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); - return ret; + return height; } } @@ -169,16 +170,12 @@ public float Depth [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Size(...) constructor")] set { - Interop.Vector3.DepthSet(SwigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - callback?.Invoke(Width, Height, value); + depth = value; + callback?.Invoke(width, Height, Depth); } get { - float ret = Interop.Vector3.DepthGet(SwigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); - return ret; + return depth; } } @@ -288,7 +285,7 @@ public override bool Equals(System.Object obj) { Size size = obj as Size; bool equal = false; - if (Width == size?.Width && Height == size?.Height && Depth == size?.Depth) + if (width == size?.width && height == size?.height && depth == size?.depth) { equal = true; } @@ -302,7 +299,7 @@ public override bool Equals(System.Object obj) /// 6 public override int GetHashCode() { - return SwigCPtr.Handle.GetHashCode(); + return base.GetHashCode(); } /// @@ -314,9 +311,12 @@ public override int GetHashCode() /// 5 public bool EqualTo(Size rhs) { - bool ret = Interop.Vector3.EqualTo(SwigCPtr, Size.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + if (null != rhs && width == rhs.width && height == rhs.height && depth == rhs.depth) + { + return true; + } + + return false; } /// @@ -328,14 +328,17 @@ public bool EqualTo(Size rhs) /// 5 public bool NotEqualTo(Size rhs) { - bool ret = Interop.Vector3.NotEqualTo(SwigCPtr, Size.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + if (null != rhs && width == rhs.width && height == rhs.height && depth == rhs.depth) + { + return false; + } + + return true; } /// [EditorBrowsable(EditorBrowsableState.Never)] - public object Clone() => new Size(Width, Height, Depth); + public object Clone() => new Size(width, height, depth); /// /// The type cast operator, Size to Vector3. @@ -348,7 +351,7 @@ public static implicit operator Vector3(Size size) { return null; } - return new Vector3(size.Width, size.Height, size.Depth); + return new Vector3(size.width, size.height, size.depth); } /// @@ -381,18 +384,6 @@ public static implicit operator Size(Size2D size2d) return new Size(size2d.Width, size2d.Height); } - - internal static Size GetSizeFromPtr(global::System.IntPtr cPtr) - { - Size ret = new Size(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal Size(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) - { - } - /// This will not be public opened. [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) @@ -400,72 +391,125 @@ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef Interop.Vector3.DeleteVector3(swigCPtr); } + protected override void Dispose(bool disposing) + { + } + private Size Add(Size rhs) { - Size ret = new Size(Interop.Vector3.Add(SwigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width + rhs.width, height + rhs.height, depth + rhs.depth); } private Size Subtract(Size rhs) { - Size ret = new Size(Interop.Vector3.Subtract(SwigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width - rhs.width, height - rhs.height, depth - rhs.depth); } private Size Multiply(Size rhs) { - Size ret = new Size(Interop.Vector3.Multiply(SwigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width * rhs.width, height * rhs.height, depth * rhs.depth); } private Size Multiply(float rhs) { - Size ret = new Size(Interop.Vector3.Multiply(SwigCPtr, rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width * rhs, height * rhs, depth * rhs); } private Size Divide(Size rhs) { - Size ret = new Size(Interop.Vector3.Divide(SwigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width / rhs.width, height / rhs.height, depth / rhs.depth); } private Size Divide(float rhs) { - Size ret = new Size(Interop.Vector3.Divide(SwigCPtr, rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(width / rhs, height / rhs, depth / rhs); } private Size Subtract() { - Size ret = new Size(Interop.Vector3.Subtract(SwigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return new Size(-width, -height, -depth); } private float ValueOfIndex(uint index) { - float ret = Interop.Vector3.ValueOfIndex(SwigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + var ret = 0.0f; + + switch (index) + { + case 0: + ret = width; + break; + + case 1: + ret = height; + break; + + case 2: + ret = depth; + break; + } + return ret; } + internal static global::System.Runtime.InteropServices.HandleRef GetHandleRef(Size obj) + { + if (null == obj) + { + return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + else + { + return new global::System.Runtime.InteropServices.HandleRef(obj, Interop.Vector3.NewVector3(obj.width, obj.height, obj.depth)); + } + } + + internal static void ReleaseHandleRef(global::System.Runtime.InteropServices.HandleRef swigCPtr) + { + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + Interop.Vector3.DeleteVector3(swigCPtr); + } + } + internal delegate void SizeChangedCallback(float width, float height, float depth); - internal Size(SizeChangedCallback cb, float w, float h, float d) : this(Interop.Vector3.NewVector3(w, h, d), true) + internal Size(IntPtr ptr, bool cMemoryOwn) + { + var swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, ptr); + width = Interop.Vector3.WidthGet(swigCPtr); + height = Interop.Vector3.HeightGet(swigCPtr); + depth = Interop.Vector3.DepthGet(swigCPtr); + + if (cMemoryOwn) + { + Interop.Vector3.DeleteVector3(swigCPtr); + } + + if (NDalicPINVOKE.SWIGPendingException.Pending) + { + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + internal Size(SizeChangedCallback cb, float w, float h, float d) { callback = cb; - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + width = w; + height = h; + depth = d; + } + + internal Size(SizeChangedCallback cb, Size other) : this(cb, other.width, other.height, other.depth) + { } - internal Size(SizeChangedCallback cb, Size other) : this(cb, other.Width, other.Height, other.Depth) + internal void ResetValue(float w, float h, float d) { + width = w; + height = h; + depth = d; } private SizeChangedCallback callback = null; From cc08e9809bd272ce262529676c1546809b1ae06f Mon Sep 17 00:00:00 2001 From: Xiaohui Fang Date: Tue, 25 Feb 2025 15:17:37 +0800 Subject: [PATCH 2/3] Add protect code --- .../BaseComponents/ViewBindableProperty.cs | 2 +- .../src/public/BaseComponents/ViewInternal.cs | 2 -- src/Tizen.NUI/src/public/Common/Size.cs | 36 +++++++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs index 98e425b2e7c..28cb741456d 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs @@ -1598,7 +1598,7 @@ internal static object GetInternalSizeProperty(BindableObject bindable) var w = Interop.Actor.InternalGetPropertyFloat(view.SwigCPtr, Property.SizeWidth); var h = Interop.Actor.InternalGetPropertyFloat(view.SwigCPtr, Property.SizeHeight); - var d = view.sizeDepth; + var d = Interop.Actor.InternalGetPropertyFloat(view.SwigCPtr, Property.SizeDepth); view.internalSize.ResetValue(w, h, d); diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs index c419a5f70c4..f997c860deb 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs @@ -542,10 +542,8 @@ internal void SetSize(float width, float height) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - private float sizeDepth = 0.0f; internal void SetSize(float width, float height, float depth) { - sizeDepth = depth; Interop.ActorInternal.SetSize(SwigCPtr, width, height, depth); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/public/Common/Size.cs b/src/Tizen.NUI/src/public/Common/Size.cs index 0b47e86eb19..1833dc179ff 100755 --- a/src/Tizen.NUI/src/public/Common/Size.cs +++ b/src/Tizen.NUI/src/public/Common/Size.cs @@ -311,12 +311,14 @@ public override int GetHashCode() /// 5 public bool EqualTo(Size rhs) { - if (null != rhs && width == rhs.width && height == rhs.height && depth == rhs.depth) + if (null != rhs && NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) { return true; } - - return false; + else + { + return false; + } } /// @@ -328,12 +330,14 @@ public bool EqualTo(Size rhs) /// 5 public bool NotEqualTo(Size rhs) { - if (null != rhs && width == rhs.width && height == rhs.height && depth == rhs.depth) + if (null != rhs && NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) { return false; } - - return true; + else + { + return true; + } } /// @@ -397,16 +401,31 @@ protected override void Dispose(bool disposing) private Size Add(Size rhs) { + if (null == rhs) + { + throw new ArgumentNullException(nameof(rhs)); + } + return new Size(width + rhs.width, height + rhs.height, depth + rhs.depth); } private Size Subtract(Size rhs) { + if (null == rhs) + { + throw new ArgumentNullException(nameof(rhs)); + } + return new Size(width - rhs.width, height - rhs.height, depth - rhs.depth); } private Size Multiply(Size rhs) { + if (null == rhs) + { + throw new ArgumentNullException(nameof(rhs)); + } + return new Size(width * rhs.width, height * rhs.height, depth * rhs.depth); } @@ -417,6 +436,11 @@ private Size Multiply(float rhs) private Size Divide(Size rhs) { + if (null == rhs) + { + throw new ArgumentNullException(nameof(rhs)); + } + return new Size(width / rhs.width, height / rhs.height, depth / rhs.depth); } From 3dc6f5366105cbf64c9f4e8ab65aa595057aba2b Mon Sep 17 00:00:00 2001 From: Xiaohui Fang Date: Tue, 25 Feb 2025 16:49:29 +0800 Subject: [PATCH 3/3] Throw excption when compare Size to null --- src/Tizen.NUI/src/public/Common/Size.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Tizen.NUI/src/public/Common/Size.cs b/src/Tizen.NUI/src/public/Common/Size.cs index 1833dc179ff..98f9d37fb8c 100755 --- a/src/Tizen.NUI/src/public/Common/Size.cs +++ b/src/Tizen.NUI/src/public/Common/Size.cs @@ -311,7 +311,12 @@ public override int GetHashCode() /// 5 public bool EqualTo(Size rhs) { - if (null != rhs && NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) + if (rhs == null) + { + throw new ArgumentNullException(nameof(rhs), "rhs is null."); + } + + if (NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) { return true; } @@ -330,7 +335,12 @@ public bool EqualTo(Size rhs) /// 5 public bool NotEqualTo(Size rhs) { - if (null != rhs && NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) + if (rhs == null) + { + throw new ArgumentNullException(nameof(rhs), "rhs is null."); + } + + if (NDalic.Equals(width, rhs.width) && NDalic.Equals(height, rhs.height) && NDalic.Equals(depth, rhs.depth)) { return false; }