1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
14 internal class ushortp : global::System.IDisposable
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal ushortp(global::System.IntPtr cPtr, bool cMemoryOwn)
21 swigCMemOwn = cMemoryOwn;
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ushortp obj)
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30 //A Flag to check who called Dispose(). (By User or DisposeQueue)
31 private bool isDisposeQueued = false;
32 //A Flat to check if it is already disposed.
33 protected bool disposed = false;
40 isDisposeQueued = true;
41 DisposeQueue.Instance.Add(this);
47 //Throw excpetion if Dispose() is called in separate thread.
48 if (!Window.IsInstalled())
50 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
55 Dispose(DisposeTypes.Implicit);
59 Dispose(DisposeTypes.Explicit);
60 System.GC.SuppressFinalize(this);
64 protected virtual void Dispose(DisposeTypes type)
71 if (type == DisposeTypes.Explicit)
74 //Release your own managed resources here.
75 //You should release all of your own disposable objects here.
79 //Release your own unmanaged resources here.
80 //You should not access any managed member here except static instance.
81 //because the execution order of Finalizes is non-deterministic.
83 if (swigCPtr.Handle != global::System.IntPtr.Zero)
88 NDalicPINVOKE.delete_ushortp(swigCPtr);
90 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
96 public ushortp() : this(NDalicPINVOKE.new_ushortp(), true)
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 public void assign(ushort value)
103 NDalicPINVOKE.ushortp_assign(swigCPtr, value);
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 public ushort value()
109 ushort ret = NDalicPINVOKE.ushortp_value(swigCPtr);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public SWIGTYPE_p_unsigned_short cast()
116 global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_cast(swigCPtr);
117 SWIGTYPE_p_unsigned_short ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_short(cPtr, false);
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 public static ushortp frompointer(SWIGTYPE_p_unsigned_short t)
124 global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_frompointer(SWIGTYPE_p_unsigned_short.getCPtr(t));
125 ushortp ret = (cPtr == global::System.IntPtr.Zero) ? null : new ushortp(cPtr, false);
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();