Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Vector2.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 namespace Tizen.NUI
19 {
20
21     /// <summary>
22     /// A two-dimensional vector.
23     /// </summary>
24     public class Vector2 : global::System.IDisposable
25     {
26         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27         /// <summary>
28         /// swigCMemOwn.
29         /// </summary>
30         protected bool swigCMemOwn;
31
32         internal Vector2(global::System.IntPtr cPtr, bool cMemoryOwn)
33         {
34             swigCMemOwn = cMemoryOwn;
35             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36         }
37
38         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector2 obj)
39         {
40             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41         }
42
43         //A Flag to check who called Dispose(). (By User or DisposeQueue)
44         private bool isDisposeQueued = false;
45
46         /// <summary>
47         /// A Flat to check if it is already disposed.
48         /// </summary>
49         protected bool disposed = false;
50
51         /// <summary>
52         /// Destructor.
53         /// </summary>
54         /// <since_tizen> 3 </since_tizen>
55         ~Vector2()
56         {
57             if(!isDisposeQueued)
58             {
59                 isDisposeQueued = true;
60                 DisposeQueue.Instance.Add(this);
61             }
62         }
63
64         /// <summary>
65         /// Dispose.
66         /// </summary>
67         /// <since_tizen> 3 </since_tizen>
68         public void Dispose()
69         {
70             //Throw excpetion if Dispose() is called in separate thread.
71             if (!Window.IsInstalled())
72             {
73                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
74             }
75
76             if (isDisposeQueued)
77             {
78                 Dispose(DisposeTypes.Implicit);
79             }
80             else
81             {
82                 Dispose(DisposeTypes.Explicit);
83                 System.GC.SuppressFinalize(this);
84             }
85         }
86
87         /// <summary>
88         /// Dispose.
89         /// </summary>
90         /// <param name="type">The dispose type</param>
91         /// <since_tizen> 3 </since_tizen>
92         protected virtual void Dispose(DisposeTypes type)
93         {
94             if (disposed)
95             {
96                 return;
97             }
98
99             if(type == DisposeTypes.Explicit)
100             {
101                 //Called by User
102                 //Release your own managed resources here.
103                 //You should release all of your own disposable objects here.
104             }
105
106             //Release your own unmanaged resources here.
107             //You should not access any managed member here except static instance.
108             //because the execution order of Finalizes is non-deterministic.
109
110             if (swigCPtr.Handle != global::System.IntPtr.Zero)
111             {
112                 if (swigCMemOwn)
113                 {
114                     swigCMemOwn = false;
115                     NDalicPINVOKE.delete_Vector2(swigCPtr);
116                 }
117                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
118             }
119             disposed = true;
120         }
121
122         /// <summary>
123         /// The addition operator.
124         /// </summary>
125         /// <param name="arg1">The first value.</param>
126         /// <param name="arg2">The second value.</param>
127         /// <returns>The vector containing the result of the addition.</returns>
128         /// <since_tizen> 3 </since_tizen>
129         public static Vector2 operator +(Vector2 arg1, Vector2 arg2)
130         {
131             return arg1.Add(arg2);
132         }
133
134         /// <summary>
135         /// The subtraction operator.
136         /// </summary>
137         /// <param name="arg1">The first value.</param>
138         /// <param name="arg2">The second value.</param>
139         /// <returns>The vector containing the result of the subtraction.</returns>
140         /// <since_tizen> 3 </since_tizen>
141         public static Vector2 operator -(Vector2 arg1, Vector2 arg2)
142         {
143             return arg1.Subtract(arg2);
144         }
145
146         /// <summary>
147         /// The unary negation operator.
148         /// </summary>
149         /// <param name="arg1">The target value.</param>
150         /// <returns>The vector containing the negation.</returns>
151         /// <since_tizen> 3 </since_tizen>
152         public static Vector2 operator -(Vector2 arg1)
153         {
154             return arg1.Subtract();
155         }
156
157         /// <summary>
158         /// The multiplication operator.
159         /// </summary>
160         /// <param name="arg1">The first value.</param>
161         /// <param name="arg2">The second value.</param>
162         /// <returns>The vector containing the result of the multiplication.</returns>
163         /// <since_tizen> 3 </since_tizen>
164         public static Vector2 operator *(Vector2 arg1, Vector2 arg2)
165         {
166             return arg1.Multiply(arg2);
167         }
168
169         /// <summary>
170         /// Th multiplication operator.
171         /// </summary>
172         /// <param name="arg1">The first value.</param>
173         /// <param name="arg2">The float value to scale the vector.</param>
174         /// <returns>The vector containing the result of the scaling.</returns>
175         /// <since_tizen> 3 </since_tizen>
176         public static Vector2 operator *(Vector2 arg1, float arg2)
177         {
178             return arg1.Multiply(arg2);
179         }
180
181         /// <summary>
182         /// The division operator.
183         /// </summary>
184         /// <param name="arg1">The first value.</param>
185         /// <param name="arg2">The second value.</param>
186         /// <returns>The vector containing the result of the division.</returns>
187         /// <since_tizen> 3 </since_tizen>
188         public static Vector2 operator /(Vector2 arg1, Vector2 arg2)
189         {
190             return arg1.Divide(arg2);
191         }
192
193         /// <summary>
194         /// Th division operator.
195         /// </summary>
196         /// <param name="arg1">The first value.</param>
197         /// <param name="arg2">The float value to scale the vector by.</param>
198         /// <returns>The vector containing the result of the scaling.</returns>
199         /// <since_tizen> 3 </since_tizen>
200         public static Vector2 operator /(Vector2 arg1, float arg2)
201         {
202             return arg1.Divide(arg2);
203         }
204
205         /// <summary>
206         /// The array subscript operator overload.
207         /// </summary>
208         /// <param name="index">The subscript index.</param>
209         /// <returns>The float at the given index.</returns>
210         /// <since_tizen> 3 </since_tizen>
211         public float this[uint index]
212         {
213             get
214             {
215                 return ValueOfIndex(index);
216             }
217         }
218
219         internal static Vector2 GetVector2FromPtr(global::System.IntPtr cPtr)
220         {
221             Vector2 ret = new Vector2(cPtr, false);
222             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223             return ret;
224         }
225
226         /// <summary>
227         /// The default constructor initializes the vector to 0.
228         /// </summary>
229         /// <since_tizen> 3 </since_tizen>
230         public Vector2() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)
231         {
232             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233         }
234
235         /// <summary>
236         /// The constructor.
237         /// </summary>
238         /// <param name="x">The x or width component.</param>
239         /// <param name="y">The y or height component.</param>
240         /// <since_tizen> 3 </since_tizen>
241         public Vector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true)
242         {
243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244         }
245
246         /// <summary>
247         /// The conversion constructor from an array of two floats.
248         /// </summary>
249         /// <param name="array">The array of xy.</param>
250         /// <since_tizen> 3 </since_tizen>
251         public Vector2(float[] array) : this(NDalicPINVOKE.new_Vector2__SWIG_2(array), true)
252         {
253             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254         }
255
256         /// <summary>
257         /// The constructor.
258         /// </summary>
259         /// <param name="vec3">Vector3 to create this vector from.</param>
260         /// <since_tizen> 3 </since_tizen>
261         public Vector2(Vector3 vec3) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Vector3.getCPtr(vec3)), true)
262         {
263             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264         }
265
266         /// <summary>
267         /// The constructor.
268         /// </summary>
269         /// <param name="vec4">Vector4 to create this vector from.</param>
270         /// <since_tizen> 3 </since_tizen>
271         public Vector2(Vector4 vec4) : this(NDalicPINVOKE.new_Vector2__SWIG_4(Vector4.getCPtr(vec4)), true)
272         {
273             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274         }
275
276         /// <summary>
277         /// (1.0f,1.0f).
278         /// </summary>
279         /// <since_tizen> 3 </since_tizen>
280         public static Vector2 One
281         {
282             get
283             {
284                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ONE_get();
285                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
286                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287                 return ret;
288             }
289         }
290
291         /// <summary>
292         /// The vector representing the x-axis.
293         /// </summary>
294         /// <since_tizen> 3 </since_tizen>
295         public static Vector2 XAxis
296         {
297             get
298             {
299                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_XAXIS_get();
300                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
301                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302                 return ret;
303             }
304         }
305
306         /// <summary>
307         /// The vector representing the y-axis.
308         /// </summary>
309         /// <since_tizen> 3 </since_tizen>
310         public static Vector2 YAxis
311         {
312             get
313             {
314                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_YAXIS_get();
315                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
316                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317                 return ret;
318             }
319         }
320
321         /// <summary>
322         /// The vector representing the negative x-axis.
323         /// </summary>
324         /// <since_tizen> 3 </since_tizen>
325         public static Vector2 NegativeXAxis
326         {
327             get
328             {
329                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_XAXIS_get();
330                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
331                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332                 return ret;
333             }
334         }
335
336         /// <summary>
337         /// The vector representing the negative y-axis.
338         /// </summary>
339         /// <since_tizen> 3 </since_tizen>
340         public static Vector2 NegativeYAxis
341         {
342             get
343             {
344                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_YAXIS_get();
345                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
346                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347                 return ret;
348             }
349         }
350
351         /// <summary>
352         /// (0.0f, 0.0f).
353         /// </summary>
354         /// <since_tizen> 3 </since_tizen>
355         public static Vector2 Zero
356         {
357             get
358             {
359                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ZERO_get();
360                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
361                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362                 return ret;
363             }
364         }
365
366         private Vector2 Add(Vector2 rhs)
367         {
368             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Add(swigCPtr, Vector2.getCPtr(rhs)), true);
369             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370             return ret;
371         }
372
373         private Vector2 AddAssign(Vector2 rhs)
374         {
375             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_AddAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
376             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377             return ret;
378         }
379
380         private Vector2 Subtract(Vector2 rhs)
381         {
382             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
383             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
384             return ret;
385         }
386
387         private Vector2 SubtractAssign(Vector2 rhs)
388         {
389             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_SubtractAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
390             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
391             return ret;
392         }
393
394         private Vector2 Multiply(Vector2 rhs)
395         {
396             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
397             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398             return ret;
399         }
400
401         private Vector2 Multiply(float rhs)
402         {
403             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, rhs), true);
404             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
405             return ret;
406         }
407
408         private Vector2 MultiplyAssign(Vector2 rhs)
409         {
410             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
411             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
412             return ret;
413         }
414
415         private Vector2 MultiplyAssign(float rhs)
416         {
417             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
418             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419             return ret;
420         }
421
422         private Vector2 Divide(Vector2 rhs)
423         {
424             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
425             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426             return ret;
427         }
428
429         private Vector2 Divide(float rhs)
430         {
431             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, rhs), true);
432             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433             return ret;
434         }
435
436         private Vector2 DivideAssign(Vector2 rhs)
437         {
438             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
439             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
440             return ret;
441         }
442
443         private Vector2 DivideAssign(float rhs)
444         {
445             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_1(swigCPtr, rhs), false);
446             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
447             return ret;
448         }
449
450         private Vector2 Subtract()
451         {
452             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true);
453             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454             return ret;
455         }
456
457         private bool EqualTo(Vector2 rhs)
458         {
459             bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Vector2.getCPtr(rhs));
460             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
461             return ret;
462         }
463
464         private bool NotEqualTo(Vector2 rhs)
465         {
466             bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Vector2.getCPtr(rhs));
467             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468             return ret;
469         }
470
471         private float ValueOfIndex(uint index)
472         {
473             float ret = NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);
474             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
475             return ret;
476         }
477
478         /// <summary>
479         /// Returns the length of the vector.
480         /// </summary>
481         /// <returns>The length of the vector.</returns>
482         /// <since_tizen> 3 </since_tizen>
483         public float Length()
484         {
485             float ret = NDalicPINVOKE.Vector2_Length(swigCPtr);
486             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
487             return ret;
488         }
489
490         /// <summary>
491         /// Returns the length of the vector squared.<br />
492         /// This is more efficient than Length() for threshold
493         /// testing as it avoids the use of a square root.<br />
494         /// </summary>
495         /// <returns>The length of the vector squared</returns>
496         /// <since_tizen> 3 </since_tizen>
497         public float LengthSquared()
498         {
499             float ret = NDalicPINVOKE.Vector2_LengthSquared(swigCPtr);
500             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501             return ret;
502         }
503
504         /// <summary>
505         /// Sets the vector to be the unit length, whilst maintaining its direction.
506         /// </summary>
507         /// <since_tizen> 3 </since_tizen>
508         public void Normalize()
509         {
510             NDalicPINVOKE.Vector2_Normalize(swigCPtr);
511             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
512         }
513
514         /// <summary>
515         /// Clamps the vector between minimum and maximum vectors.
516         /// </summary>
517         /// <param name="min">The minimum vector.</param>
518         /// <param name="max">The maximum vector.</param>
519         /// <since_tizen> 3 </since_tizen>
520         public void Clamp(Vector2 min, Vector2 max)
521         {
522             NDalicPINVOKE.Vector2_Clamp(swigCPtr, Vector2.getCPtr(min), Vector2.getCPtr(max));
523             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
524         }
525
526         internal SWIGTYPE_p_float AsFloat()
527         {
528             global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_AsFloat__SWIG_0(swigCPtr);
529             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
530             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531             return ret;
532         }
533
534         /// <summary>
535         /// The x component.
536         /// </summary>
537         /// <since_tizen> 3 </since_tizen>
538         public float X
539         {
540             set
541             {
542                 NDalicPINVOKE.Vector2_X_set(swigCPtr, value);
543                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544             }
545             get
546             {
547                 float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);
548                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549                 return ret;
550             }
551         }
552
553         /// <summary>
554         /// The width.
555         /// </summary>
556         /// <since_tizen> 3 </since_tizen>
557         public float Width
558         {
559             set
560             {
561                 NDalicPINVOKE.Vector2_Width_set(swigCPtr, value);
562                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
563             }
564             get
565             {
566                 float ret = NDalicPINVOKE.Vector2_Width_get(swigCPtr);
567                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568                 return ret;
569             }
570         }
571
572         /// <summary>
573         /// The y component.
574         /// </summary>
575         /// <since_tizen> 3 </since_tizen>
576         public float Y
577         {
578             set
579             {
580                 NDalicPINVOKE.Vector2_Y_set(swigCPtr, value);
581                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
582             }
583             get
584             {
585                 float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);
586                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587                 return ret;
588             }
589         }
590
591         /// <summary>
592         /// The height.
593         /// </summary>
594         /// <since_tizen> 3 </since_tizen>
595         public float Height
596         {
597             set
598             {
599                 NDalicPINVOKE.Vector2_Height_set(swigCPtr, value);
600                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
601             }
602             get
603             {
604                 float ret = NDalicPINVOKE.Vector2_Height_get(swigCPtr);
605                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
606                 return ret;
607             }
608         }
609
610     }
611
612 }