[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Point3D.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace ElmSharp
20 {
21     /// <summary>
22     /// The Point3D is a struct that defines a 3D point.
23     /// </summary>
24     /// <since_tizen> preview </since_tizen>
25     [Obsolete("This has been deprecated in API12")]
26     public struct Point3D : IEquatable<Point3D>
27     {
28         /// <summary>
29         /// The X-coordinate of a 3D point.
30         /// </summary>
31         /// <since_tizen> preview </since_tizen>
32         [Obsolete("This has been deprecated in API12")]
33         public int X;
34
35         /// <summary>
36         /// The Y-coordinate of a 3D point.
37         /// </summary>
38         /// <since_tizen> preview </since_tizen>
39         [Obsolete("This has been deprecated in API12")]
40         public int Y;
41
42         /// <summary>
43         /// The Z-coordinate of a 3D point.
44         /// </summary>
45         /// <since_tizen> preview </since_tizen>
46         [Obsolete("This has been deprecated in API12")]
47         public int Z;
48
49         /// <summary>
50         /// A human-readable representation of <see cref="Point3D"/>.
51         /// </summary>
52         /// <returns>The string is formatted as "{{X={0} Y={1} Z={2}}}".</returns>
53         /// <since_tizen> preview </since_tizen>
54         [Obsolete("This has been deprecated in API12")]
55         public override string ToString()
56         {
57             return string.Format("{{X={0} Y={1} Z={2}}}", X, Y, Z);
58         }
59
60         ///
61         /// <since_tizen> preview </since_tizen>
62         [Obsolete("This has been deprecated in API12")]
63         public override int GetHashCode()
64         {
65             unchecked
66             {
67                 int hashCode = X.GetHashCode();
68                 hashCode = (hashCode * 397) ^ Y.GetHashCode();
69                 hashCode = (hashCode * 397) ^ Z.GetHashCode();
70                 return hashCode;
71             }
72         }
73
74         /// <summary>
75         /// Indicates whether this instance and a specified object are equal.
76         /// </summary>
77         /// <param name="obj">The object to compare with the current instance.</param>
78         /// <returns>
79         /// true if the object and this instance are of the same type and represent the same value,
80         /// otherwise false.
81         /// </returns>
82         /// <since_tizen> preview </since_tizen>
83         [Obsolete("This has been deprecated in API12")]
84         public override bool Equals(object obj)
85         {
86             if (!(obj is Point3D))
87                 return false;
88
89             return Equals((Point3D)obj);
90         }
91
92         /// <summary>
93         /// Indicates whether this instance and a <see cref="Point3D"/> object are equal.
94         /// </summary>
95         /// <param name="other">The <see cref="Point3D"/> to compare with the current instance.</param>
96         /// <returns>
97         /// true if the object and this instance are of the same type and represent the same value.
98         /// otherwise, false.
99         /// </returns>
100         /// <since_tizen> preview </since_tizen>
101         [Obsolete("This has been deprecated in API12")]
102         public bool Equals(Point3D other)
103         {
104             return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z);
105         }
106
107         /// <summary>
108         /// Whether both <see cref="Point3D"/>s are equal.
109         /// </summary>
110         /// <param name="p1">A <see cref="Point3D"/> on the left hand side.</param>
111         /// <param name="p2">A <see cref="Point3D"/> on the right hand side.</param>
112         /// <returns>True if both <see cref="Point3D"/>s have equal values.</returns>
113         /// <since_tizen> preview </since_tizen>
114         [Obsolete("This has been deprecated in API12")]
115         public static bool operator ==(Point3D p1, Point3D p2)
116         {
117             return p1.Equals(p2);
118         }
119
120         /// <summary>
121         /// Whether both <see cref="Point3D"/>s are not equal.
122         /// </summary>
123         /// <param name="p1">A <see cref="Point3D"/> on the left hand side.</param>
124         /// <param name="p2">A <see cref="Point3D"/> on the right hand side.</param>
125         /// <returns>True if both <see cref="Point3D"/>s do not have equal values.</returns>
126         /// <since_tizen> preview </since_tizen>
127         [Obsolete("This has been deprecated in API12")]
128         public static bool operator !=(Point3D p1, Point3D p2)
129         {
130             return !p1.Equals(p2);
131         }
132     }
133 }