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.
22 /// TypeInfo class for instantiation of registered types and introspection of their actions and signals.
24 /// <since_tizen> 3 </since_tizen>
25 public class TypeInfo : BaseHandle
27 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30 /// Creates TypeInfo object.
32 /// <since_tizen> 3 </since_tizen>
33 public TypeInfo() : this(Interop.TypeInfo.new_TypeInfo__SWIG_0(), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 /// Creates TypeInfo object.
41 /// <param name="handle">This copy constructor is required for (smart) pointer semantics.</param>
42 /// <since_tizen> 3 </since_tizen>
43 public TypeInfo(TypeInfo handle) : this(Interop.TypeInfo.new_TypeInfo__SWIG_1(TypeInfo.getCPtr(handle)), true)
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48 internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TypeInfo.TypeInfo_SWIGUpcast(cPtr), cMemoryOwn)
50 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
54 /// Retrieves the type name for this type.
56 /// <returns>The string name.</returns>
57 /// <since_tizen> 3 </since_tizen>
58 public string GetName()
60 string ret = Interop.TypeInfo.TypeInfo_GetName(swigCPtr);
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 /// Retrieves the type name for this type.
68 /// <returns>The string name.</returns>
69 /// <since_tizen> 3 </since_tizen>
70 public string GetBaseName()
72 string ret = Interop.TypeInfo.TypeInfo_GetBaseName(swigCPtr);
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 /// Creates an object from this type.
80 /// <returns>The BaseHandle for the newly created object.</returns>
81 /// <since_tizen> 3 </since_tizen>
82 public BaseHandle CreateInstance()
84 BaseHandle ret = new BaseHandle(Interop.TypeInfo.TypeInfo_CreateInstance(swigCPtr), true);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 /// Retrieves the number of event side type registered properties for this type.<br />
91 /// This count does not include all properties.
93 /// <returns>The count.</returns>
94 /// <since_tizen> 3 </since_tizen>
95 public uint GetPropertyCount()
97 uint ret = Interop.TypeInfo.TypeInfo_GetPropertyCount(swigCPtr);
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103 /// Given a property index, retrieve the property name associated with it.
105 /// <param name="index">The property index.</param>
106 /// <returns>The name of the property at the given index.</returns>
107 /// <since_tizen> 3 </since_tizen>
108 public string GetPropertyName(int index)
110 string ret = Interop.TypeInfo.TypeInfo_GetPropertyName(swigCPtr, index);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeInfo obj)
117 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
123 /// <param name="type">The dispose type</param>
124 /// <since_tizen> 3 </since_tizen>
125 protected override void Dispose(DisposeTypes type)
132 //Release your own unmanaged resources here.
133 //You should not access any managed member here except static instance.
134 //because the execution order of Finalizes is non-deterministic.
136 if (swigCPtr.Handle != global::System.IntPtr.Zero)
141 Interop.TypeInfo.delete_TypeInfo(swigCPtr);
143 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);