Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
StdVectorOdUInt16.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
16public class StdVectorOdUInt16 : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IList<ushort>
17 {
18 private Object locker = new Object();
19 private HandleRef swigCPtr;
20 protected bool swigCMemOwn;
21 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
22 public StdVectorOdUInt16(IntPtr cPtr, bool cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = new HandleRef(this, cPtr);
25 }
26 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
27 public static HandleRef getCPtr(StdVectorOdUInt16 obj) {
28 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
29 }
30
32 Dispose(false);
33 }
34
35 public void Dispose() {
36 Dispose(true);
37 global::System.GC.SuppressFinalize(this);
38 }
39
40 protected virtual void Dispose(bool disposing) {
41 lock(this) {
42 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
43 if (swigCMemOwn) {
44 swigCMemOwn = false;
46 }
47 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
48 }
49 }
50 }
51
52 public StdVectorOdUInt16(global::System.Collections.IEnumerable c) : this() {
53 if (c == null)
54 throw new global::System.ArgumentNullException("c");
55 foreach (ushort element in c) {
56 this.Add(element);
57 }
58 }
59
60 public StdVectorOdUInt16(global::System.Collections.Generic.IEnumerable<ushort> c) : this() {
61 if (c == null)
62 throw new global::System.ArgumentNullException("c");
63 foreach (ushort element in c) {
64 this.Add(element);
65 }
66 }
67
68 public bool IsFixedSize {
69 get {
70 return false;
71 }
72 }
73
74 public bool IsReadOnly {
75 get {
76 return false;
77 }
78 }
79
80 public ushort this[int index] {
81 get {
82 return getitem(index);
83 }
84 set {
85 setitem(index, value);
86 }
87 }
88
89 public int Capacity {
90 get {
91 return (int)capacity();
92 }
93 set {
94 if (value < size())
95 throw new global::System.ArgumentOutOfRangeException("Capacity");
96 reserve((uint)value);
97 }
98 }
99
100 public int Count {
101 get {
102 return (int)size();
103 }
104 }
105
106 public bool IsSynchronized {
107 get {
108 return false;
109 }
110 }
111
112 public void CopyTo(ushort[] array)
113 {
114 CopyTo(0, array, 0, this.Count);
115 }
116
117 public void CopyTo(ushort[] array, int arrayIndex)
118 {
119 CopyTo(0, array, arrayIndex, this.Count);
120 }
121
122 public void CopyTo(int index, ushort[] array, int arrayIndex, int count)
123 {
124 if (array == null)
125 throw new global::System.ArgumentNullException("array");
126 if (index < 0)
127 throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
128 if (arrayIndex < 0)
129 throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
130 if (count < 0)
131 throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
132 if (array.Rank > 1)
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);
138 }
139
140 public ushort[] ToArray() {
141 ushort[] array = new ushort[this.Count];
142 this.CopyTo(array);
143 return array;
144 }
145
146 global::System.Collections.Generic.IEnumerator<ushort> global::System.Collections.Generic.IEnumerable<ushort>.GetEnumerator() {
147 return new StdVectorOdUInt16Enumerator(this);
148 }
149
150 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
151 return new StdVectorOdUInt16Enumerator(this);
152 }
153
155 return new StdVectorOdUInt16Enumerator(this);
156 }
157
158 // Type-safe enumerator
163 public class StdVectorOdUInt16Enumerator : global::System.Collections.IEnumerator
164 , global::System.Collections.Generic.IEnumerator<ushort>
165 {
166 private StdVectorOdUInt16 collectionRef;
167 private int currentIndex;
168 private object currentObject;
169 private int currentSize;
170
172 collectionRef = collection;
173 currentIndex = -1;
174 currentObject = null;
175 currentSize = collectionRef.Count;
176 }
177
178 // Type-safe iterator Current
179 public ushort Current {
180 get {
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;
188 }
189 }
190
191 // Type-unsafe IEnumerator.Current
192 object global::System.Collections.IEnumerator.Current {
193 get {
194 return Current;
195 }
196 }
197
198 public bool MoveNext() {
199 int size = collectionRef.Count;
200 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
201 if (moveOkay) {
202 currentIndex++;
203 currentObject = collectionRef[currentIndex];
204 } else {
205 currentObject = null;
206 }
207 return moveOkay;
208 }
209
210 public void Reset() {
211 currentIndex = -1;
212 currentObject = null;
213 if (collectionRef.Count != currentSize) {
214 throw new global::System.InvalidOperationException("Collection modified.");
215 }
216 }
217
218 public void Dispose() {
219 currentIndex = -1;
220 currentObject = null;
221 }
222 }
223
224 public void Clear() {
227 }
228
229 public void Add(ushort x) {
232 }
233
234 private uint size() {
235 uint ret = GlobalsPINVOKE.StdVectorOdUInt16_size(swigCPtr);
237 return ret;
238 }
239
240 private uint capacity() {
241 uint ret = GlobalsPINVOKE.StdVectorOdUInt16_capacity(swigCPtr);
242 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
243 return ret;
244 }
245
246 private void reserve(uint n) {
247 GlobalsPINVOKE.StdVectorOdUInt16_reserve(swigCPtr, n);
248 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
249 }
250
251 public StdVectorOdUInt16() : this(GlobalsPINVOKE.new_StdVectorOdUInt16__SWIG_0(), true) {
253 }
254
255 public StdVectorOdUInt16(StdVectorOdUInt16 other) : this(GlobalsPINVOKE.new_StdVectorOdUInt16__SWIG_1(StdVectorOdUInt16.getCPtr(other)), true) {
257 }
258
259 public StdVectorOdUInt16(int capacity) : this(GlobalsPINVOKE.new_StdVectorOdUInt16__SWIG_2(capacity), true) {
261 }
262
263 private ushort getitemcopy(int index) {
264 ushort ret = GlobalsPINVOKE.StdVectorOdUInt16_getitemcopy(swigCPtr, index);
266 return ret;
267 }
268
269 private ushort getitem(int index) {
270 ushort ret = GlobalsPINVOKE.StdVectorOdUInt16_getitem(swigCPtr, index);
271 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
272 return ret;
273 }
274
275 private void setitem(int index, ushort val) {
276 GlobalsPINVOKE.StdVectorOdUInt16_setitem(swigCPtr, index, val);
277 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
278 }
279
280 public void AddRange(StdVectorOdUInt16 values) {
283 }
284
285 public StdVectorOdUInt16 GetRange(int index, int count) {
286 global::System.IntPtr cPtr = GlobalsPINVOKE.StdVectorOdUInt16_GetRange(swigCPtr, index, count);
287 StdVectorOdUInt16 ret = (cPtr == global::System.IntPtr.Zero) ? null : new StdVectorOdUInt16(cPtr, true);
289 return ret;
290 }
291
292 public void Insert(int index, ushort x) {
293 GlobalsPINVOKE.StdVectorOdUInt16_Insert(swigCPtr, index, x);
295 }
296
297 public void InsertRange(int index, StdVectorOdUInt16 values) {
300 }
301
302 public void RemoveAt(int index) {
305 }
306
307 public void RemoveRange(int index, int count) {
308 GlobalsPINVOKE.StdVectorOdUInt16_RemoveRange(swigCPtr, index, count);
310 }
311
312 public static StdVectorOdUInt16 Repeat(ushort value, int count) {
313 global::System.IntPtr cPtr = GlobalsPINVOKE.StdVectorOdUInt16_Repeat(value, count);
314 StdVectorOdUInt16 ret = (cPtr == global::System.IntPtr.Zero) ? null : new StdVectorOdUInt16(cPtr, true);
316 return ret;
317 }
318
319 public void Reverse() {
322 }
323
324 public void Reverse(int index, int count) {
327 }
328
329 public void SetRange(int index, StdVectorOdUInt16 values) {
332 }
333
334 public bool Contains(ushort value) {
335 bool ret = GlobalsPINVOKE.StdVectorOdUInt16_Contains(swigCPtr, value);
337 return ret;
338 }
339
340 public int IndexOf(ushort value) {
343 return ret;
344 }
345
346 public int LastIndexOf(ushort value) {
349 return ret;
350 }
351
352 public bool Remove(ushort value) {
353 bool ret = GlobalsPINVOKE.StdVectorOdUInt16_Remove(swigCPtr, value);
355 return ret;
356 }
357
358}
359
360}
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)
StdVectorOdUInt16(IntPtr cPtr, bool cMemoryOwn)
StdVectorOdUInt16Enumerator GetEnumerator()
StdVectorOdUInt16(StdVectorOdUInt16 other)
void SetRange(int index, StdVectorOdUInt16 values)
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)
StdVectorOdUInt16 GetRange(int index, int count)
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)