14using System.Runtime.InteropServices;
16public class StdVectorOdUInt16 : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IList<ushort>
18 private Object locker =
new Object();
19 private HandleRef swigCPtr;
21 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
24 swigCPtr =
new HandleRef(
this, cPtr);
26 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
28 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
37 global::System.GC.SuppressFinalize(
this);
40 protected virtual void Dispose(
bool disposing) {
42 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
47 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
54 throw new global::System.ArgumentNullException(
"c");
55 foreach (ushort element
in c) {
60 public StdVectorOdUInt16(global::System.Collections.Generic.IEnumerable<ushort> c) : this() {
62 throw new global::System.ArgumentNullException(
"c");
63 foreach (ushort element
in c) {
80 public ushort
this[
int index] {
82 return getitem(index);
85 setitem(index,
value);
91 return (
int)capacity();
95 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
117 public void CopyTo(ushort[] array,
int arrayIndex)
122 public void CopyTo(
int index, ushort[] array,
int arrayIndex,
int count)
125 throw new global::System.ArgumentNullException(
"array");
127 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
129 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
131 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
133 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
134 if (index+count > this.
Count || arrayIndex+count > array.Length)
135 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
136 for (
int i=0; i<count; i++)
137 array.SetValue(getitemcopy(index+i), arrayIndex+i);
141 ushort[] array =
new ushort[this.
Count];
146 global::System.Collections.Generic.IEnumerator<ushort> global::System.Collections.Generic.IEnumerable<ushort>.GetEnumerator() {
147 return new StdVectorOdUInt16Enumerator(
this);
150 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
151 return new StdVectorOdUInt16Enumerator(
this);
164 , global::System.Collections.Generic.IEnumerator<ushort>
167 private int currentIndex;
168 private object currentObject;
169 private int currentSize;
172 collectionRef = collection;
174 currentObject =
null;
175 currentSize = collectionRef.
Count;
181 if (currentIndex == -1)
182 throw new global::System.InvalidOperationException(
"Enumeration not started.");
183 if (currentIndex > currentSize - 1)
184 throw new global::System.InvalidOperationException(
"Enumeration finished.");
185 if (currentObject ==
null)
186 throw new global::System.InvalidOperationException(
"Collection modified.");
187 return (ushort)currentObject;
192 object global::System.Collections.IEnumerator.Current {
199 int size = collectionRef.
Count;
200 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
203 currentObject = collectionRef[currentIndex];
205 currentObject =
null;
212 currentObject =
null;
213 if (collectionRef.
Count != currentSize) {
214 throw new global::System.InvalidOperationException(
"Collection modified.");
220 currentObject =
null;
229 public void Add(ushort x) {
234 private uint size() {
240 private uint capacity() {
241 uint ret = GlobalsPINVOKE.StdVectorOdUInt16_capacity(swigCPtr);
242 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
246 private void reserve(uint n) {
247 GlobalsPINVOKE.StdVectorOdUInt16_reserve(swigCPtr, n);
248 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
263 private ushort getitemcopy(
int index) {
269 private ushort getitem(
int index) {
270 ushort ret = GlobalsPINVOKE.StdVectorOdUInt16_getitem(swigCPtr, index);
271 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
275 private void setitem(
int index, ushort val) {
276 GlobalsPINVOKE.StdVectorOdUInt16_setitem(swigCPtr, index, val);
277 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
292 public void Insert(
int index, ushort x) {
static global::System.Exception Retrieve()
static void StdVectorOdUInt16_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void StdVectorOdUInt16_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void StdVectorOdUInt16_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, ushort jarg3)
static ushort StdVectorOdUInt16_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int StdVectorOdUInt16_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2)
static bool StdVectorOdUInt16_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2)
static void StdVectorOdUInt16_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static int StdVectorOdUInt16_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2)
static void StdVectorOdUInt16_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_StdVectorOdUInt16(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr StdVectorOdUInt16_Repeat(ushort jarg1, int jarg2)
static global::System.IntPtr StdVectorOdUInt16_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void StdVectorOdUInt16_Add(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2)
static bool StdVectorOdUInt16_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2)
static uint StdVectorOdUInt16_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void StdVectorOdUInt16_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void StdVectorOdUInt16_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void StdVectorOdUInt16_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static void StdVectorOdUInt16_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
StdVectorOdUInt16Enumerator(StdVectorOdUInt16 collection)
StdVectorOdUInt16(IntPtr cPtr, bool cMemoryOwn)
StdVectorOdUInt16Enumerator GetEnumerator()
StdVectorOdUInt16(int capacity)
StdVectorOdUInt16(StdVectorOdUInt16 other)
void SetRange(int index, StdVectorOdUInt16 values)
int IndexOf(ushort value)
static HandleRef getCPtr(StdVectorOdUInt16 obj)
virtual void Dispose(bool disposing)
void Insert(int index, ushort x)
void RemoveRange(int index, int count)
void CopyTo(ushort[] array, int arrayIndex)
bool Remove(ushort value)
bool Contains(ushort value)
void CopyTo(ushort[] array)
StdVectorOdUInt16 GetRange(int index, int count)
int LastIndexOf(ushort value)
void CopyTo(int index, ushort[] array, int arrayIndex, int count)
StdVectorOdUInt16(global::System.Collections.IEnumerable c)
void InsertRange(int index, StdVectorOdUInt16 values)
StdVectorOdUInt16(global::System.Collections.Generic.IEnumerable< ushort > c)
void Reverse(int index, int count)
static StdVectorOdUInt16 Repeat(ushort value, int count)
void AddRange(StdVectorOdUInt16 values)