[NUI] Add license, delete unnecessary code (#2679)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Common / Any.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
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
18 namespace Tizen.NUI
19 {
20     internal class Any : Disposable
21     {
22         internal Any(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
23         {
24         }
25
26         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Any obj)
27         {
28             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
29         }
30
31         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
32         {
33             Interop.Any.DeleteAny(swigCPtr);
34         }
35
36         public Any() : this(Interop.Any.NewAny(), true)
37         {
38             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39         }
40
41         public static void AssertAlways(string assertMessage)
42         {
43             Interop.Any.AssertAlways(assertMessage);
44             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
45         }
46
47         public Any(Any any) : this(Interop.Any.NewAny(Any.getCPtr(any)), true)
48         {
49             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
50         }
51
52         public Any Assign(Any any)
53         {
54             Any ret = new Any(Interop.Any.Assign(SwigCPtr, Any.getCPtr(any)), false);
55             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56             return ret;
57         }
58
59         public new SWIGTYPE_p_std__type_info GetType()
60         {
61             SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.GetType(SwigCPtr));
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63             return ret;
64         }
65
66         public bool Empty()
67         {
68             bool ret = Interop.Any.Empty(SwigCPtr);
69             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70             return ret;
71         }
72
73         public class AnyContainerBase : Disposable
74         {
75
76             internal AnyContainerBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
77             {
78             }
79
80             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnyContainerBase obj)
81             {
82                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
83             }
84
85             protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
86             {
87                 Interop.Any.DeleteAnyAnyContainerBase(swigCPtr);
88             }
89
90             public AnyContainerBase(SWIGTYPE_p_std__type_info type, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc) : this(Interop.Any.NewAnyAnyContainerBase(SWIGTYPE_p_std__type_info.getCPtr(type), SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(cloneFunc), SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(deleteFunc)), true)
91             {
92                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93             }
94
95             public new SWIGTYPE_p_std__type_info GetType()
96             {
97                 SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.AnyContainerBaseGetType(SwigCPtr));
98                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99                 return ret;
100             }
101
102             public SWIGTYPE_p_std__type_info mType
103             {
104                 get
105                 {
106                     SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.AnyContainerBaseMTypeGet(SwigCPtr));
107                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108                     return ret;
109                 }
110             }
111
112             public SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase mCloneFunc
113             {
114                 set
115                 {
116                     Interop.Any.AnyContainerBaseMCloneFuncSet(SwigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(value));
117                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118                 }
119                 get
120                 {
121                     global::System.IntPtr cPtr = Interop.Any.AnyContainerBaseMCloneFuncGet(SwigCPtr);
122                     SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(cPtr);
123                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124                     return ret;
125                 }
126             }
127
128             public SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void mDeleteFunc
129             {
130                 set
131                 {
132                     Interop.Any.AnyContainerBaseMDeleteFuncSet(SwigCPtr, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(value));
133                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134                 }
135                 get
136                 {
137                     global::System.IntPtr cPtr = Interop.Any.AnyContainerBaseMDeleteFuncGet(SwigCPtr);
138                     SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(cPtr);
139                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140                     return ret;
141                 }
142             }
143         }
144
145         public Any.AnyContainerBase mContainer
146         {
147             set
148             {
149                 Interop.Any.MContainerSet(SwigCPtr, Any.AnyContainerBase.getCPtr(value));
150                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151             }
152             get
153             {
154                 global::System.IntPtr cPtr = Interop.Any.MContainerGet(SwigCPtr);
155                 Any.AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new Any.AnyContainerBase(cPtr, false);
156                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157                 return ret;
158             }
159         }
160     }
161 }