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 TouchPointContainer : global::System.IDisposable, global::System.Collections.IEnumerable
14 , global::System.Collections.Generic.IEnumerable<TouchPoint>
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal TouchPointContainer(global::System.IntPtr cPtr, bool cMemoryOwn) {
20 swigCMemOwn = cMemoryOwn;
21 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
24 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPointContainer obj) {
25 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28 ~TouchPointContainer() {
32 public virtual void Dispose() {
34 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
37 NDalicPINVOKE.delete_TouchPointContainer(swigCPtr);
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41 global::System.GC.SuppressFinalize(this);
45 public TouchPointContainer(global::System.Collections.ICollection c) : this() {
47 throw new global::System.ArgumentNullException("c");
48 foreach (TouchPoint element in c) {
53 public bool IsFixedSize {
59 public bool IsReadOnly {
65 public TouchPoint this[int index] {
67 return getitem(index);
70 setitem(index, value);
76 return (int)capacity();
80 throw new global::System.ArgumentOutOfRangeException("Capacity");
91 public bool IsSynchronized {
97 public void CopyTo(TouchPoint[] array)
99 CopyTo(0, array, 0, this.Count);
102 public void CopyTo(TouchPoint[] array, int arrayIndex)
104 CopyTo(0, array, arrayIndex, this.Count);
107 public void CopyTo(int index, TouchPoint[] array, int arrayIndex, int count)
110 throw new global::System.ArgumentNullException("array");
112 throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
114 throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
116 throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
118 throw new global::System.ArgumentException("Multi dimensional array.", "array");
119 if (index+count > this.Count || arrayIndex+count > array.Length)
120 throw new global::System.ArgumentException("Number of elements to copy is too large.");
121 for (int i=0; i<count; i++)
122 array.SetValue(getitemcopy(index+i), arrayIndex+i);
125 global::System.Collections.Generic.IEnumerator<TouchPoint> global::System.Collections.Generic.IEnumerable<TouchPoint>.GetEnumerator() {
126 return new TouchPointContainerEnumerator(this);
129 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
130 return new TouchPointContainerEnumerator(this);
133 public TouchPointContainerEnumerator GetEnumerator() {
134 return new TouchPointContainerEnumerator(this);
137 // Type-safe enumerator
138 /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
139 /// whenever the collection is modified. This has been done for changes in the size of the
140 /// collection but not when one of the elements of the collection is modified as it is a bit
141 /// tricky to detect unmanaged code that modifies the collection under our feet.
142 public sealed class TouchPointContainerEnumerator : global::System.Collections.IEnumerator
143 , global::System.Collections.Generic.IEnumerator<TouchPoint>
145 private TouchPointContainer collectionRef;
146 private int currentIndex;
147 private object currentObject;
148 private int currentSize;
150 public TouchPointContainerEnumerator(TouchPointContainer collection) {
151 collectionRef = collection;
153 currentObject = null;
154 currentSize = collectionRef.Count;
157 // Type-safe iterator Current
158 public TouchPoint Current {
160 if (currentIndex == -1)
161 throw new global::System.InvalidOperationException("Enumeration not started.");
162 if (currentIndex > currentSize - 1)
163 throw new global::System.InvalidOperationException("Enumeration finished.");
164 if (currentObject == null)
165 throw new global::System.InvalidOperationException("Collection modified.");
166 return (TouchPoint)currentObject;
170 // Type-unsafe IEnumerator.Current
171 object global::System.Collections.IEnumerator.Current {
177 public bool MoveNext() {
178 int size = collectionRef.Count;
179 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
182 currentObject = collectionRef[currentIndex];
184 currentObject = null;
189 public void Reset() {
191 currentObject = null;
192 if (collectionRef.Count != currentSize) {
193 throw new global::System.InvalidOperationException("Collection modified.");
197 public void Dispose() {
199 currentObject = null;
203 public void Clear() {
204 NDalicPINVOKE.TouchPointContainer_Clear(swigCPtr);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public void Add(TouchPoint x) {
209 NDalicPINVOKE.TouchPointContainer_Add(swigCPtr, TouchPoint.getCPtr(x));
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 private uint size() {
214 uint ret = NDalicPINVOKE.TouchPointContainer_size(swigCPtr);
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219 private uint capacity() {
220 uint ret = NDalicPINVOKE.TouchPointContainer_capacity(swigCPtr);
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 private void reserve(uint n) {
226 NDalicPINVOKE.TouchPointContainer_reserve(swigCPtr, n);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230 public TouchPointContainer() : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_0(), true) {
231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 public TouchPointContainer(TouchPointContainer other) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_1(TouchPointContainer.getCPtr(other)), true) {
235 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 public TouchPointContainer(int capacity) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_2(capacity), true) {
239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 private TouchPoint getitemcopy(int index) {
243 TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitemcopy(swigCPtr, index), true);
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 private TouchPoint getitem(int index) {
249 TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitem(swigCPtr, index), false);
250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254 private void setitem(int index, TouchPoint val) {
255 NDalicPINVOKE.TouchPointContainer_setitem(swigCPtr, index, TouchPoint.getCPtr(val));
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 public void AddRange(TouchPointContainer values) {
260 NDalicPINVOKE.TouchPointContainer_AddRange(swigCPtr, TouchPointContainer.getCPtr(values));
261 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264 public TouchPointContainer GetRange(int index, int count) {
265 global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_GetRange(swigCPtr, index, count);
266 TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);
267 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271 public void Insert(int index, TouchPoint x) {
272 NDalicPINVOKE.TouchPointContainer_Insert(swigCPtr, index, TouchPoint.getCPtr(x));
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 public void InsertRange(int index, TouchPointContainer values) {
277 NDalicPINVOKE.TouchPointContainer_InsertRange(swigCPtr, index, TouchPointContainer.getCPtr(values));
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 public void RemoveAt(int index) {
282 NDalicPINVOKE.TouchPointContainer_RemoveAt(swigCPtr, index);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
286 public void RemoveRange(int index, int count) {
287 NDalicPINVOKE.TouchPointContainer_RemoveRange(swigCPtr, index, count);
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 public static TouchPointContainer Repeat(TouchPoint value, int count) {
292 global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_Repeat(TouchPoint.getCPtr(value), count);
293 TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 public void Reverse() {
299 NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_0(swigCPtr);
300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
303 public void Reverse(int index, int count) {
304 NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_1(swigCPtr, index, count);
305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308 public void SetRange(int index, TouchPointContainer values) {
309 NDalicPINVOKE.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values));
310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();