//------------------------------------------------------------------------------
//
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.2
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class Point2iList : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal Point2iList(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Point2iList obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~Point2iList() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
GestureEstimatePINVOKE.delete_Point2iList(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public Point2iList(global::System.Collections.IEnumerable c) : this() {
if (c == null)
throw new global::System.ArgumentNullException("c");
foreach (Point2i element in c) {
this.Add(element);
}
}
public Point2iList(global::System.Collections.Generic.IEnumerable c) : this() {
if (c == null)
throw new global::System.ArgumentNullException("c");
foreach (Point2i element in c) {
this.Add(element);
}
}
public bool IsFixedSize {
get {
return false;
}
}
public bool IsReadOnly {
get {
return false;
}
}
public Point2i this[int index] {
get {
return getitem(index);
}
set {
setitem(index, value);
}
}
public int Capacity {
get {
return (int)capacity();
}
set {
if (value < size())
throw new global::System.ArgumentOutOfRangeException("Capacity");
reserve((uint)value);
}
}
public int Count {
get {
return (int)size();
}
}
public bool IsSynchronized {
get {
return false;
}
}
public void CopyTo(Point2i[] array)
{
CopyTo(0, array, 0, this.Count);
}
public void CopyTo(Point2i[] array, int arrayIndex)
{
CopyTo(0, array, arrayIndex, this.Count);
}
public void CopyTo(int index, Point2i[] array, int arrayIndex, int count)
{
if (array == null)
throw new global::System.ArgumentNullException("array");
if (index < 0)
throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
if (arrayIndex < 0)
throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (count < 0)
throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
if (array.Rank > 1)
throw new global::System.ArgumentException("Multi dimensional array.", "array");
if (index+count > this.Count || arrayIndex+count > array.Length)
throw new global::System.ArgumentException("Number of elements to copy is too large.");
for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() {
return new Point2iListEnumerator(this);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
return new Point2iListEnumerator(this);
}
public Point2iListEnumerator GetEnumerator() {
return new Point2iListEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class Point2iListEnumerator : global::System.Collections.IEnumerator
, global::System.Collections.Generic.IEnumerator
{
private Point2iList collectionRef;
private int currentIndex;
private object currentObject;
private int currentSize;
public Point2iListEnumerator(Point2iList collection) {
collectionRef = collection;
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public Point2i Current {
get {
if (currentIndex == -1)
throw new global::System.InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new global::System.InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new global::System.InvalidOperationException("Collection modified.");
return (Point2i)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object global::System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
currentObject = collectionRef[currentIndex];
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new global::System.InvalidOperationException("Collection modified.");
}
}
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
}
public void Clear() {
GestureEstimatePINVOKE.Point2iList_Clear(swigCPtr);
}
public void Add(Point2i x) {
GestureEstimatePINVOKE.Point2iList_Add(swigCPtr, Point2i.getCPtr(x));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
private uint size() {
uint ret = GestureEstimatePINVOKE.Point2iList_size(swigCPtr);
return ret;
}
private uint capacity() {
uint ret = GestureEstimatePINVOKE.Point2iList_capacity(swigCPtr);
return ret;
}
private void reserve(uint n) {
GestureEstimatePINVOKE.Point2iList_reserve(swigCPtr, n);
}
public Point2iList() : this(GestureEstimatePINVOKE.new_Point2iList__SWIG_0(), true) {
}
public Point2iList(Point2iList other) : this(GestureEstimatePINVOKE.new_Point2iList__SWIG_1(Point2iList.getCPtr(other)), true) {
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public Point2iList(int capacity) : this(GestureEstimatePINVOKE.new_Point2iList__SWIG_2(capacity), true) {
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
private Point2i getitemcopy(int index) {
Point2i ret = new Point2i(GestureEstimatePINVOKE.Point2iList_getitemcopy(swigCPtr, index), true);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private Point2i getitem(int index) {
Point2i ret = new Point2i(GestureEstimatePINVOKE.Point2iList_getitem(swigCPtr, index), false);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(int index, Point2i val) {
GestureEstimatePINVOKE.Point2iList_setitem(swigCPtr, index, Point2i.getCPtr(val));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public void AddRange(Point2iList values) {
GestureEstimatePINVOKE.Point2iList_AddRange(swigCPtr, Point2iList.getCPtr(values));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public Point2iList GetRange(int index, int count) {
global::System.IntPtr cPtr = GestureEstimatePINVOKE.Point2iList_GetRange(swigCPtr, index, count);
Point2iList ret = (cPtr == global::System.IntPtr.Zero) ? null : new Point2iList(cPtr, true);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Insert(int index, Point2i x) {
GestureEstimatePINVOKE.Point2iList_Insert(swigCPtr, index, Point2i.getCPtr(x));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public void InsertRange(int index, Point2iList values) {
GestureEstimatePINVOKE.Point2iList_InsertRange(swigCPtr, index, Point2iList.getCPtr(values));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveAt(int index) {
GestureEstimatePINVOKE.Point2iList_RemoveAt(swigCPtr, index);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveRange(int index, int count) {
GestureEstimatePINVOKE.Point2iList_RemoveRange(swigCPtr, index, count);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public static Point2iList Repeat(Point2i value, int count) {
global::System.IntPtr cPtr = GestureEstimatePINVOKE.Point2iList_Repeat(Point2i.getCPtr(value), count);
Point2iList ret = (cPtr == global::System.IntPtr.Zero) ? null : new Point2iList(cPtr, true);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Reverse() {
GestureEstimatePINVOKE.Point2iList_Reverse__SWIG_0(swigCPtr);
}
public void Reverse(int index, int count) {
GestureEstimatePINVOKE.Point2iList_Reverse__SWIG_1(swigCPtr, index, count);
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
public void SetRange(int index, Point2iList values) {
GestureEstimatePINVOKE.Point2iList_SetRange(swigCPtr, index, Point2iList.getCPtr(values));
if (GestureEstimatePINVOKE.SWIGPendingException.Pending) throw GestureEstimatePINVOKE.SWIGPendingException.Retrieve();
}
}