[NUI] Fix comments according to document review
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Common / RelativeVector4.cs
index bfdde5e..6981ad0 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -83,23 +83,22 @@ namespace Tizen.NUI
         /// The x component.
         /// </summary>
         /// <remarks>
-        /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor.
+        /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor.
         /// </remarks>
         /// <code>
         /// // DO NOT use like the followings!
         /// RelativeVector4 relativeVector4 = new RelativeVector4();
         /// relativeVector4.X = 0.1f; 
-        /// // Please USE like this
+        /// // USE like this
         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
         /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w);
         /// </code>
         /// <since_tizen> 3 </since_tizen>
         public float X
         {
+            [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")]
             set
             {
-                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor");
-
                 Interop.Vector4.XSet(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -117,23 +116,22 @@ namespace Tizen.NUI
         /// The y component.
         /// </summary>
         /// <remarks>
-        /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor.
+        /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor.
         /// </remarks>
         /// <code>
         /// // DO NOT use like the followings!
         /// RelativeVector4 relativeVector4 = new RelativeVector4();
         /// relativeVector4.Y = 0.5f; 
-        /// // Please USE like this
+        /// // USE like this
         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
         /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w);
         /// </code>
         /// <since_tizen> 3 </since_tizen>
         public float Y
         {
+            [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")]
             set
             {
-                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor");
-
                 Interop.Vector4.YSet(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -151,23 +149,22 @@ namespace Tizen.NUI
         /// The z component.
         /// </summary>
         /// <remarks>
-        /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor.
+        /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor.
         /// </remarks>
         /// <code>
         /// // DO NOT use like the followings!
         /// RelativeVector4 relativeVector4 = new RelativeVector4();
         /// relativeVector4.Z = 0.9f; 
-        /// // Please USE like this
+        /// // USE like this
         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
         /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w);
         /// </code>
         /// <since_tizen> 3 </since_tizen>
         public float Z
         {
+            [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")]
             set
             {
-                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor");
-
                 Interop.Vector4.ZSet(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -185,23 +182,22 @@ namespace Tizen.NUI
         /// The w component.
         /// </summary>
         /// <remarks>
-        /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor.
+        /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor.
         /// </remarks>
         /// <code>
         /// // DO NOT use like the followings!
         /// RelativeVector4 relativeVector4 = new RelativeVector4();
         /// relativeVector4.W = 1.0f; 
-        /// // Please USE like this
+        /// // USE like this
         /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f;
         /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w);
         /// </code>
         /// <since_tizen> 3 </since_tizen>
         public float W
         {
+            [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")]
             set
             {
-                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor");
-
                 Interop.Vector4.WSet(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -298,7 +294,11 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector4(RelativeVector4 relativeVector4)
         {
-            return new Vector4((float)relativeVector4?.X, (float)relativeVector4.Y, (float)relativeVector4.Z, (float)relativeVector4.W);
+            if (relativeVector4 == null)
+            {
+                return null;
+            }
+            return new Vector4(relativeVector4.X, relativeVector4.Y, relativeVector4.Z, relativeVector4.W);
         }
 
         /// <summary>
@@ -306,7 +306,11 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator RelativeVector4(Vector4 vec)
         {
-            return new RelativeVector4((float)vec?.X, (float)vec.Y, (float)vec.Z, (float)vec.W);
+            if (vec == null)
+            {
+                return null;
+            }
+            return new RelativeVector4(vec.X, vec.Y, vec.Z, vec.W);
         }
 
         /// <summary>
@@ -340,7 +344,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Gets the the hash code of this RelativeVector4.
+        /// Gets the hash code of this RelativeVector4.
         /// </summary>
         /// <returns>The Hash Code.</returns>
         /// <since_tizen> 6 </since_tizen>
@@ -384,11 +388,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelativeVector4 obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
-        }
-
         internal RelativeVector4(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
         }
@@ -450,5 +449,3 @@ namespace Tizen.NUI
         }
     }
 }
-
-