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 //------------------------------------------------------------------------------
13 public class BaseHandle : global::System.IDisposable {
14 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 protected bool swigCMemOwn;
17 internal BaseHandle(global::System.IntPtr cPtr, bool cMemoryOwn) {
18 swigCMemOwn = cMemoryOwn;
19 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseHandle obj) {
23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 DisposeQueue.Instance.Add(this);
30 public virtual void Dispose() {
31 if (!Stage.IsInstalled()) {
32 DisposeQueue.Instance.Add(this);
37 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40 NDalicPINVOKE.delete_BaseHandle(swigCPtr);
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
44 global::System.GC.SuppressFinalize(this);
50 // Returns the bool value true to indicate that an operand is true and returns false otherwise.
51 public static bool operator true(BaseHandle handle)
53 // if the C# object is null, return false
54 if( BaseHandle.ReferenceEquals( handle, null ) )
58 // returns true if the handle has a body, false otherwise
59 return handle.HasBody();
62 // Returns the bool false to indicate that an operand is false and returns true otherwise.
63 public static bool operator false(BaseHandle handle)
65 // if the C# object is null, return true
66 if( BaseHandle.ReferenceEquals( handle, null ) )
70 return !handle.HasBody();
73 // Explicit conversion from Handle to bool.
74 public static explicit operator bool(BaseHandle handle)
76 // if the C# object is null, return false
77 if( BaseHandle.ReferenceEquals( handle, null ) )
81 // returns true if the handle has a body, false otherwise
82 return handle.HasBody();
86 public static bool operator == (BaseHandle x, BaseHandle y)
88 // if the C# objects are the same return true
89 if( BaseHandle.ReferenceEquals( x, y ) )
93 if ( !BaseHandle.ReferenceEquals( x, null ) && !BaseHandle.ReferenceEquals( y, null ) )
95 // drop into native code to see if both handles point to the same body
96 return x.IsEqual( y) ;
102 // Inequality operator. Returns Null if either operand is Null
103 public static bool operator !=(BaseHandle x, BaseHandle y)
108 // Logical AND operator for &&
109 // It's possible when doing a && this function (opBitwiseAnd) is never called due
110 // to short circuiting. E.g.
111 // If you perform x && y What actually is called is
112 // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) )
114 public static BaseHandle operator &(BaseHandle x, BaseHandle y)
123 // Logical OR operator for ||
124 // It's possible when doing a || this function (opBitwiseOr) is never called due
125 // to short circuiting. E.g.
126 // If you perform x || y What actually is called is
127 // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) )
128 public static BaseHandle operator |(BaseHandle x, BaseHandle y)
130 if ( !BaseHandle.ReferenceEquals( x, null ) || !BaseHandle.ReferenceEquals( y, null ) )
145 // Logical ! operator
146 public static bool operator !(BaseHandle x)
148 // if the C# object is null, return true
149 if( BaseHandle.ReferenceEquals( x, null ) )
161 internal BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) {
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) {
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) {
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 public BaseHandle Assign(BaseHandle rhs) {
174 BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false);
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 public bool DoAction(string actionName, PropertyMap attributes) {
180 bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes));
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public string GetTypeName() {
186 string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 public bool GetTypeInfo(TypeInfo info) {
192 bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info));
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 internal BaseObject GetBaseObject() {
198 BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203 public void Reset() {
204 NDalicPINVOKE.BaseHandle_Reset(swigCPtr);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public bool EqualTo(BaseHandle rhs) {
209 bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 public bool NotEqualTo(BaseHandle rhs) {
215 bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 internal RefObject GetObjectPtr() {
221 global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr);
222 RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 public bool HasBody() {
228 bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr);
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 public bool IsEqual(BaseHandle rhs) {
234 bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs));
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();