//------------------------------------------------------------------------------ // // // This file was automatically generated by SWIG (http://www.swig.org). // Version 3.0.6 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ namespace mscl { public class SatellitePRNs : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IList { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; internal SatellitePRNs(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(SatellitePRNs obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~SatellitePRNs() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; msclPINVOKE.delete_SatellitePRNs(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); } } public SatellitePRNs(global::System.Collections.ICollection c) : this() { if (c == null) throw new global::System.ArgumentNullException("c"); foreach (ushort element in c) { this.Add(element); } } public bool IsFixedSize { get { return false; } } public bool IsReadOnly { get { return false; } } public ushort 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(ushort[] array) { CopyTo(0, array, 0, this.Count); } public void CopyTo(ushort[] array, int arrayIndex) { CopyTo(0, array, arrayIndex, this.Count); } public void CopyTo(int index, ushort[] 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 SatellitePRNsEnumerator(this); } global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return new SatellitePRNsEnumerator(this); } public SatellitePRNsEnumerator GetEnumerator() { return new SatellitePRNsEnumerator(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 SatellitePRNsEnumerator : global::System.Collections.IEnumerator , global::System.Collections.Generic.IEnumerator { private SatellitePRNs collectionRef; private int currentIndex; private object currentObject; private int currentSize; public SatellitePRNsEnumerator(SatellitePRNs collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; } // Type-safe iterator Current public ushort 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 (ushort)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() { msclPINVOKE.SatellitePRNs_Clear(swigCPtr); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void Add(ushort x) { msclPINVOKE.SatellitePRNs_Add(swigCPtr, x); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } private uint size() { uint ret = msclPINVOKE.SatellitePRNs_size(swigCPtr); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } private uint capacity() { uint ret = msclPINVOKE.SatellitePRNs_capacity(swigCPtr); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } private void reserve(uint n) { msclPINVOKE.SatellitePRNs_reserve(swigCPtr, n); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public SatellitePRNs() : this(msclPINVOKE.new_SatellitePRNs__SWIG_0(), true) { if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public SatellitePRNs(SatellitePRNs other) : this(msclPINVOKE.new_SatellitePRNs__SWIG_1(SatellitePRNs.getCPtr(other)), true) { if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public SatellitePRNs(int capacity) : this(msclPINVOKE.new_SatellitePRNs__SWIG_2(capacity), true) { if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } private ushort getitemcopy(int index) { ushort ret = msclPINVOKE.SatellitePRNs_getitemcopy(swigCPtr, index); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } private ushort getitem(int index) { ushort ret = msclPINVOKE.SatellitePRNs_getitem(swigCPtr, index); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } private void setitem(int index, ushort val) { msclPINVOKE.SatellitePRNs_setitem(swigCPtr, index, val); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void AddRange(SatellitePRNs values) { msclPINVOKE.SatellitePRNs_AddRange(swigCPtr, SatellitePRNs.getCPtr(values)); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public SatellitePRNs GetRange(int index, int count) { global::System.IntPtr cPtr = msclPINVOKE.SatellitePRNs_GetRange(swigCPtr, index, count); SatellitePRNs ret = (cPtr == global::System.IntPtr.Zero) ? null : new SatellitePRNs(cPtr, true); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Insert(int index, ushort x) { msclPINVOKE.SatellitePRNs_Insert(swigCPtr, index, x); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void InsertRange(int index, SatellitePRNs values) { msclPINVOKE.SatellitePRNs_InsertRange(swigCPtr, index, SatellitePRNs.getCPtr(values)); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveAt(int index) { msclPINVOKE.SatellitePRNs_RemoveAt(swigCPtr, index); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveRange(int index, int count) { msclPINVOKE.SatellitePRNs_RemoveRange(swigCPtr, index, count); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public static SatellitePRNs Repeat(ushort value, int count) { global::System.IntPtr cPtr = msclPINVOKE.SatellitePRNs_Repeat(value, count); SatellitePRNs ret = (cPtr == global::System.IntPtr.Zero) ? null : new SatellitePRNs(cPtr, true); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Reverse() { msclPINVOKE.SatellitePRNs_Reverse__SWIG_0(swigCPtr); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void Reverse(int index, int count) { msclPINVOKE.SatellitePRNs_Reverse__SWIG_1(swigCPtr, index, count); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public void SetRange(int index, SatellitePRNs values) { msclPINVOKE.SatellitePRNs_SetRange(swigCPtr, index, SatellitePRNs.getCPtr(values)); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); } public bool Contains(ushort value) { bool ret = msclPINVOKE.SatellitePRNs_Contains(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } public int IndexOf(ushort value) { int ret = msclPINVOKE.SatellitePRNs_IndexOf(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } public int LastIndexOf(ushort value) { int ret = msclPINVOKE.SatellitePRNs_LastIndexOf(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } public bool Remove(ushort value) { bool ret = msclPINVOKE.SatellitePRNs_Remove(swigCPtr, value); if (msclPINVOKE.SWIGPendingException.Pending) throw msclPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }