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;
30 public virtual void Dispose() {
32 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
35 NDalicPINVOKE.delete_BaseHandle(swigCPtr);
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
39 global::System.GC.SuppressFinalize(this);
44 // Returns the bool value true to indicate that an operand is true and returns false otherwise.
45 public static bool operator true(BaseHandle handle)
47 // if the C# object is null, return false
48 if( BaseHandle.ReferenceEquals( handle, null ) )
52 // returns true if the handle has a body, false otherwise
53 return handle.HasBody();
56 // Returns the bool false to indicate that an operand is false and returns true otherwise.
57 public static bool operator false(BaseHandle handle)
59 // if the C# object is null, return true
60 if( BaseHandle.ReferenceEquals( handle, null ) )
64 return !handle.HasBody();
67 // Explicit conversion from Handle to bool.
68 public static explicit operator bool(BaseHandle handle)
70 // if the C# object is null, return false
71 if( BaseHandle.ReferenceEquals( handle, null ) )
75 // returns true if the handle has a body, false otherwise
76 return handle.HasBody();
80 public static bool operator == (BaseHandle x, BaseHandle y)
82 // if the C# objects are the same return true
83 if( BaseHandle.ReferenceEquals( x, y ) )
87 if ( !BaseHandle.ReferenceEquals( x, null ) && !BaseHandle.ReferenceEquals( y, null ) )
89 // drop into native code to see if both handles point to the same body
90 return x.IsEqual( y) ;
96 // Inequality operator. Returns Null if either operand is Null
97 public static bool operator !=(BaseHandle x, BaseHandle y)
102 // Logical AND operator for &&
103 // It's possible when doing a && this function (opBitwiseAnd) is never called due
104 // to short circuiting. E.g.
105 // If you perform x && y What actually is called is
106 // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) )
108 public static BaseHandle operator &(BaseHandle x, BaseHandle y)
117 // Logical OR operator for ||
118 // It's possible when doing a || this function (opBitwiseOr) is never called due
119 // to short circuiting. E.g.
120 // If you perform x || y What actually is called is
121 // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) )
122 public static BaseHandle operator |(BaseHandle x, BaseHandle y)
124 if ( !BaseHandle.ReferenceEquals( x, null ) || !BaseHandle.ReferenceEquals( y, null ) )
139 // Logical ! operator
140 public static bool operator !(BaseHandle x)
142 // if the C# object is null, return true
143 if( BaseHandle.ReferenceEquals( x, null ) )
155 public BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) {
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) {
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) {
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public BaseHandle Assign(BaseHandle rhs) {
168 BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false);
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 public bool DoAction(string actionName, Property.Map attributes) {
174 bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, Property.Map.getCPtr(attributes));
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 public string GetTypeName() {
180 string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public bool GetTypeInfo(TypeInfo info) {
186 bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info));
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 public BaseObject GetBaseObject() {
192 BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 public void Reset() {
198 NDalicPINVOKE.BaseHandle_Reset(swigCPtr);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 public bool EqualTo(BaseHandle rhs) {
203 bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public bool NotEqualTo(BaseHandle rhs) {
209 bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs));
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 public RefObject GetObjectPtr() {
215 global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr);
216 RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 public bool HasBody() {
222 bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 public bool IsEqual(BaseHandle rhs) {
228 bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs));
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();