change Dispose pattern
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Degree.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// An angle in degrees.<br>
16     /// This reduces ambiguity when using methods which accept angles in degrees or radians.<br>
17     /// </summary>
18     public class Degree : global::System.IDisposable
19     {
20         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21         protected bool swigCMemOwn;
22
23         internal Degree(global::System.IntPtr cPtr, bool cMemoryOwn)
24         {
25             swigCMemOwn = cMemoryOwn;
26             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Degree obj)
30         {
31             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32         }
33         ~Degree()
34         {
35             DisposeQueue.Instance.Add(this);
36         }
37         public virtual void Dispose()
38         {
39             if (!Stage.IsInstalled())
40             {
41                 DisposeQueue.Instance.Add(this);
42                 return;
43             }
44
45             lock (this)
46             {
47                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
48                 {
49                     if (swigCMemOwn)
50                     {
51                         swigCMemOwn = false;
52                         NDalicPINVOKE.delete_Degree(swigCPtr);
53                     }
54                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55                 }
56                 global::System.GC.SuppressFinalize(this);
57             }
58         }
59
60
61         /// <summary>
62         /// Constructor.
63         /// </summary>
64         public Degree() : this(NDalicPINVOKE.new_Degree__SWIG_0(), true)
65         {
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67         }
68
69         /// <summary>
70         /// Creates an angle in degrees.
71         /// </summary>
72         /// <param name="value">The initial value in degrees</param>
73         public Degree(float value) : this(NDalicPINVOKE.new_Degree__SWIG_1(value), true)
74         {
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76         }
77
78         /// <summary>
79         /// Creates an angle in degrees from a Radian.
80         /// </summary>
81         /// <param name="value">The initial value in Radians</param>
82         public Degree(Radian value) : this(NDalicPINVOKE.new_Degree__SWIG_2(Radian.getCPtr(value)), true)
83         {
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85         }
86
87         public float degree
88         {
89             set
90             {
91                 NDalicPINVOKE.Degree_degree_set(swigCPtr, value);
92                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93             }
94             get
95             {
96                 float ret = NDalicPINVOKE.Degree_degree_get(swigCPtr);
97                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98                 return ret;
99             }
100         }
101
102     }
103
104 }