/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ using System; using System.Runtime.InteropServices; public class aiVector3DVectorVector : IDisposable, System.Collections.IEnumerable #if !SWIG_DOTNET_1 , System.Collections.Generic.IEnumerable #endif { private HandleRef swigCPtr; protected bool swigCMemOwn; internal aiVector3DVectorVector(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(aiVector3DVectorVector obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~aiVector3DVectorVector() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; Assimp_NETPINVOKE.delete_aiVector3DVectorVector(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); } GC.SuppressFinalize(this); } } public aiVector3DVectorVector(System.Collections.ICollection c) : this() { if (c == null) throw new ArgumentNullException("c"); foreach (aiVector3DVector element in c) { this.Add(element); } } public bool IsFixedSize { get { return false; } } public bool IsReadOnly { get { return false; } } public aiVector3DVector this[int index] { get { return getitem(index); } set { setitem(index, value); } } public int Capacity { get { return (int)capacity(); } set { if (value < size()) throw new ArgumentOutOfRangeException("Capacity"); reserve((uint)value); } } public int Count { get { return (int)size(); } } public bool IsSynchronized { get { return false; } } #if SWIG_DOTNET_1 public void CopyTo(System.Array array) #else public void CopyTo(aiVector3DVector[] array) #endif { CopyTo(0, array, 0, this.Count); } #if SWIG_DOTNET_1 public void CopyTo(System.Array array, int arrayIndex) #else public void CopyTo(aiVector3DVector[] array, int arrayIndex) #endif { CopyTo(0, array, arrayIndex, this.Count); } #if SWIG_DOTNET_1 public void CopyTo(int index, System.Array array, int arrayIndex, int count) #else public void CopyTo(int index, aiVector3DVector[] array, int arrayIndex, int count) #endif { if (array == null) throw new ArgumentNullException("array"); if (index < 0) throw new ArgumentOutOfRangeException("index", "Value is less than zero"); if (arrayIndex < 0) throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); if (count < 0) throw new ArgumentOutOfRangeException("count", "Value is less than zero"); if (array.Rank > 1) throw new ArgumentException("Multi dimensional array.", "array"); if (index+count > this.Count || arrayIndex+count > array.Length) throw new ArgumentException("Number of elements to copy is too large."); for (int i=0; i System.Collections.Generic.IEnumerable.GetEnumerator() { return new aiVector3DVectorVectorEnumerator(this); } #endif System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return new aiVector3DVectorVectorEnumerator(this); } public aiVector3DVectorVectorEnumerator GetEnumerator() { return new aiVector3DVectorVectorEnumerator(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 aiVector3DVectorVectorEnumerator : System.Collections.IEnumerator #if !SWIG_DOTNET_1 , System.Collections.Generic.IEnumerator #endif { private aiVector3DVectorVector collectionRef; private int currentIndex; private object currentObject; private int currentSize; public aiVector3DVectorVectorEnumerator(aiVector3DVectorVector collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; } // Type-safe iterator Current public aiVector3DVector Current { get { if (currentIndex == -1) throw new InvalidOperationException("Enumeration not started."); if (currentIndex > currentSize - 1) throw new InvalidOperationException("Enumeration finished."); if (currentObject == null) throw new InvalidOperationException("Collection modified."); return (aiVector3DVector)currentObject; } } // Type-unsafe IEnumerator.Current object 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 InvalidOperationException("Collection modified."); } } #if !SWIG_DOTNET_1 public void Dispose() { currentIndex = -1; currentObject = null; } #endif } public void Clear() { Assimp_NETPINVOKE.aiVector3DVectorVector_Clear(swigCPtr); } public void Add(aiVector3DVector x) { Assimp_NETPINVOKE.aiVector3DVectorVector_Add(swigCPtr, aiVector3DVector.getCPtr(x)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } private uint size() { uint ret = Assimp_NETPINVOKE.aiVector3DVectorVector_size(swigCPtr); return ret; } private uint capacity() { uint ret = Assimp_NETPINVOKE.aiVector3DVectorVector_capacity(swigCPtr); return ret; } private void reserve(uint n) { Assimp_NETPINVOKE.aiVector3DVectorVector_reserve(swigCPtr, n); } public aiVector3DVectorVector() : this(Assimp_NETPINVOKE.new_aiVector3DVectorVector__SWIG_0(), true) { } public aiVector3DVectorVector(aiVector3DVectorVector other) : this(Assimp_NETPINVOKE.new_aiVector3DVectorVector__SWIG_1(aiVector3DVectorVector.getCPtr(other)), true) { if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public aiVector3DVectorVector(int capacity) : this(Assimp_NETPINVOKE.new_aiVector3DVectorVector__SWIG_2(capacity), true) { if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } private aiVector3DVector getitemcopy(int index) { aiVector3DVector ret = new aiVector3DVector(Assimp_NETPINVOKE.aiVector3DVectorVector_getitemcopy(swigCPtr, index), true); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); return ret; } private aiVector3DVector getitem(int index) { aiVector3DVector ret = new aiVector3DVector(Assimp_NETPINVOKE.aiVector3DVectorVector_getitem(swigCPtr, index), false); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); return ret; } private void setitem(int index, aiVector3DVector val) { Assimp_NETPINVOKE.aiVector3DVectorVector_setitem(swigCPtr, index, aiVector3DVector.getCPtr(val)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public void AddRange(aiVector3DVectorVector values) { Assimp_NETPINVOKE.aiVector3DVectorVector_AddRange(swigCPtr, aiVector3DVectorVector.getCPtr(values)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public aiVector3DVectorVector GetRange(int index, int count) { IntPtr cPtr = Assimp_NETPINVOKE.aiVector3DVectorVector_GetRange(swigCPtr, index, count); aiVector3DVectorVector ret = (cPtr == IntPtr.Zero) ? null : new aiVector3DVectorVector(cPtr, true); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Insert(int index, aiVector3DVector x) { Assimp_NETPINVOKE.aiVector3DVectorVector_Insert(swigCPtr, index, aiVector3DVector.getCPtr(x)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public void InsertRange(int index, aiVector3DVectorVector values) { Assimp_NETPINVOKE.aiVector3DVectorVector_InsertRange(swigCPtr, index, aiVector3DVectorVector.getCPtr(values)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveAt(int index) { Assimp_NETPINVOKE.aiVector3DVectorVector_RemoveAt(swigCPtr, index); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveRange(int index, int count) { Assimp_NETPINVOKE.aiVector3DVectorVector_RemoveRange(swigCPtr, index, count); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public static aiVector3DVectorVector Repeat(aiVector3DVector value, int count) { IntPtr cPtr = Assimp_NETPINVOKE.aiVector3DVectorVector_Repeat(aiVector3DVector.getCPtr(value), count); aiVector3DVectorVector ret = (cPtr == IntPtr.Zero) ? null : new aiVector3DVectorVector(cPtr, true); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Reverse() { Assimp_NETPINVOKE.aiVector3DVectorVector_Reverse__SWIG_0(swigCPtr); } public void Reverse(int index, int count) { Assimp_NETPINVOKE.aiVector3DVectorVector_Reverse__SWIG_1(swigCPtr, index, count); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } public void SetRange(int index, aiVector3DVectorVector values) { Assimp_NETPINVOKE.aiVector3DVectorVector_SetRange(swigCPtr, index, aiVector3DVectorVector.getCPtr(values)); if (Assimp_NETPINVOKE.SWIGPendingException.Pending) throw Assimp_NETPINVOKE.SWIGPendingException.Retrieve(); } }