2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 internal class Any : global::System.IDisposable
23 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
24 protected bool swigCMemOwn;
26 internal Any(global::System.IntPtr cPtr, bool cMemoryOwn)
28 swigCMemOwn = cMemoryOwn;
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Any obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 //A Flag to check who called Dispose(). (By User or DisposeQueue)
38 private bool isDisposeQueued = false;
39 //A Flat to check if it is already disposed.
40 protected bool disposed = false;
46 isDisposeQueued = true;
47 DisposeQueue.Instance.Add(this);
53 //Throw excpetion if Dispose() is called in separate thread.
54 if (!Window.IsInstalled())
56 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
61 Dispose(DisposeTypes.Implicit);
65 Dispose(DisposeTypes.Explicit);
66 System.GC.SuppressFinalize(this);
70 protected virtual void Dispose(DisposeTypes type)
77 if (type == DisposeTypes.Explicit)
80 //Release your own managed resources here.
81 //You should release all of your own disposable objects here.
85 //Release your own unmanaged resources here.
86 //You should not access any managed member here except static instance.
87 //because the execution order of Finalizes is non-deterministic.
89 if (swigCPtr.Handle != global::System.IntPtr.Zero)
94 Interop.Any.delete_Any(swigCPtr);
96 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
103 public Any() : this(Interop.Any.new_Any__SWIG_0(), true)
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 public static void AssertAlways(string assertMessage)
110 Interop.Any.Any_AssertAlways(assertMessage);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public Any(Any any) : this(Interop.Any.new_Any__SWIG_2(Any.getCPtr(any)), true)
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 public Any Assign(Any any)
121 Any ret = new Any(Interop.Any.Any_Assign(swigCPtr, Any.getCPtr(any)), false);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 public new SWIGTYPE_p_std__type_info GetType()
128 SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.Any_GetType(swigCPtr), false);
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 bool ret = Interop.Any.Any_Empty(swigCPtr);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 /// <since_tizen> 3 </since_tizen>
141 public class AnyContainerBase : global::System.IDisposable
143 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
144 /// <since_tizen> 3 </since_tizen>
145 protected bool swigCMemOwn;
147 internal AnyContainerBase(global::System.IntPtr cPtr, bool cMemoryOwn)
149 swigCMemOwn = cMemoryOwn;
150 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
153 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnyContainerBase obj)
155 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
158 //A Flag to check who called Dispose(). (By User or DisposeQueue)
159 private bool isDisposeQueued = false;
160 //A Flat to check if it is already disposed.
161 /// <since_tizen> 3 </since_tizen>
162 protected bool disposed = false;
166 if (!isDisposeQueued)
168 isDisposeQueued = true;
169 DisposeQueue.Instance.Add(this);
173 /// <since_tizen> 3 </since_tizen>
174 public void Dispose()
176 //Throw excpetion if Dispose() is called in separate thread.
177 if (!Window.IsInstalled())
179 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
184 Dispose(DisposeTypes.Implicit);
188 Dispose(DisposeTypes.Explicit);
189 System.GC.SuppressFinalize(this);
193 /// <since_tizen> 3 </since_tizen>
194 protected virtual void Dispose(DisposeTypes type)
201 if (type == DisposeTypes.Explicit)
204 //Release your own managed resources here.
205 //You should release all of your own disposable objects here.
209 //Release your own unmanaged resources here.
210 //You should not access any managed member here except static instance.
211 //because the execution order of Finalizes is non-deterministic.
213 if (swigCPtr.Handle != global::System.IntPtr.Zero)
218 Interop.Any.delete_Any_AnyContainerBase(swigCPtr);
220 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
226 /// <since_tizen> 3 </since_tizen>
227 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.new_Any_AnyContainerBase(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)
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232 /// <since_tizen> 3 </since_tizen>
233 public new SWIGTYPE_p_std__type_info GetType()
235 SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.Any_AnyContainerBase_GetType(swigCPtr), false);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 /// <since_tizen> 3 </since_tizen>
241 public SWIGTYPE_p_std__type_info mType
245 SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(Interop.Any.Any_AnyContainerBase_mType_get(swigCPtr), false);
246 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 /// <since_tizen> 3 </since_tizen>
252 public SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase mCloneFunc
256 Interop.Any.Any_AnyContainerBase_mCloneFunc_set(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(value));
257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 global::System.IntPtr cPtr = Interop.Any.Any_AnyContainerBase_mCloneFunc_get(swigCPtr);
262 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, false);
263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 /// <since_tizen> 3 </since_tizen>
269 public SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void mDeleteFunc
273 Interop.Any.Any_AnyContainerBase_mDeleteFunc_set(swigCPtr, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(value));
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 global::System.IntPtr cPtr = Interop.Any.Any_AnyContainerBase_mDeleteFunc_get(swigCPtr);
279 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, false);
280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 public Any.AnyContainerBase mContainer
291 Interop.Any.Any_mContainer_set(swigCPtr, Any.AnyContainerBase.getCPtr(value));
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296 global::System.IntPtr cPtr = Interop.Any.Any_mContainer_get(swigCPtr);
297 Any.AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new Any.AnyContainerBase(cPtr, false);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();