Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdVectorOdInt32.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 OdVectorOdInt32 : IDisposable, System.Collections.IEnumerable
17, System.Collections.Generic.IList<Int32 /*SIMPLETYPE*/>
18 {
19 private Object locker = new Object();
20 private HandleRef swigCPtr;
21 protected bool swigCMemOwn;
22 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
23 public OdVectorOdInt32(IntPtr cPtr, bool cMemoryOwn) {
24 swigCMemOwn = cMemoryOwn;
25 swigCPtr = new HandleRef(this, cPtr);
26 }
27 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
28 public static HandleRef getCPtr(OdVectorOdInt32 obj) {
29 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
30 }
31
33 Dispose(false);
34 }
35
36 public void Dispose() {
37 Dispose(true);
38 global::System.GC.SuppressFinalize(this);
39 }
40
41 protected virtual void Dispose(bool disposing) {
42 lock(this) {
43 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44 if (swigCMemOwn) {
45 swigCMemOwn = false;
47 }
48 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
49 }
50 }
51 }
52
53// ctors
54 public OdVectorOdInt32(System.Collections.ICollection c) : this() {
55 if (c == null)
56 throw new ArgumentNullException("c");
57 foreach (Int32 /*SIMPLETYPE*/ element in c) {
58 this.Add(element);
59 }
60 }
61
63 : this(GlobalsPINVOKE.new_OdVectorOdInt32__SWIG_0(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null)
64 {
65 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #9
66 if (null != mTr)
67 {
68 mTr.AddObject(new OdVectorOdInt32(swigCPtr.Handle, true));
69 }
71 }
72
73 public OdVectorOdInt32(OdVectorOdInt32 other) : this(GlobalsPINVOKE.new_OdVectorOdInt32__SWIG_1(OdVectorOdInt32.getCPtr(other)), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
74 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #10
75 if (null != mTr)
76 {
77 mTr.AddObject(new OdVectorOdInt32(swigCPtr.Handle, true));
78 }
80 }
81
82 public OdVectorOdInt32(int capacity) : this(GlobalsPINVOKE.new_OdVectorOdInt32__SWIG_2(capacity), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
83 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #11
84 if (null != mTr)
85 {
86 mTr.AddObject(new OdVectorOdInt32(swigCPtr.Handle, true));
87 }
89 }
90
91// methods
92 public bool IsFixedSize {
93 get {
94 return false;
95 }
96 }
97
98 public bool IsReadOnly {
99 get {
100 return false;
101 }
102 }
103
104 public Int32 /*SIMPLETYPE*/ this[int index] {
105 get {
106 return getitem(index);
107 }
108 set {
109 setitem(index, value);
110 }
111 }
112
113 public int Capacity {
114 get {
115 return (int)capacity();
116 }
117 set {
118 if (value < size())
119 throw new ArgumentOutOfRangeException("Capacity");
120 reserve((uint)value);
121 }
122 }
123
124 public int Count {
125 get {
126 return (int)size();
127 }
128 }
129
130 public bool IsSynchronized {
131 get {
132 return false;
133 }
134 }
135
136 public void CopyTo(Int32 /*SIMPLETYPE*/[] array)
137 {
138 CopyTo(0, array, 0, this.Count);
139 }
140
141 public void CopyTo(Int32 /*SIMPLETYPE*/[] array, int arrayIndex)
142 {
143 CopyTo(0, array, arrayIndex, this.Count);
144 }
145
146 public void CopyTo(int index, Int32 /*SIMPLETYPE*/[] array, int arrayIndex, int count)
147 {
148 if (array == null)
149 throw new ArgumentNullException("array");
150 if (index < 0)
151 throw new ArgumentOutOfRangeException("index", "Value is less than zero");
152 if (arrayIndex < 0)
153 throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
154 if (count < 0)
155 throw new ArgumentOutOfRangeException("count", "Value is less than zero");
156 if (array.Rank > 1)
157 throw new ArgumentException("Multi dimensional array.", "array");
158 if (index+count > this.Count || arrayIndex+count > array.Length)
159 throw new ArgumentException("Number of elements to copy is too large.");
160 for (int i=0; i<count; i++)
161 array.SetValue(getitemcopy(index+i), arrayIndex+i);
162 }
163
164 System.Collections.Generic.IEnumerator<Int32 /*SIMPLETYPE*/> System.Collections.Generic.IEnumerable<Int32 /*SIMPLETYPE*/>.GetEnumerator() {
165 return new OdVectorOdInt32Enumerator(this);
166 }
167
168 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
169 return new OdVectorOdInt32Enumerator(this);
170 }
171
173 return new OdVectorOdInt32Enumerator(this);
174 }
175
176 // Type-safe enumerator
181 public class OdVectorOdInt32Enumerator : System.Collections.IEnumerator
182 , System.Collections.Generic.IEnumerator<Int32 /*SIMPLETYPE*/>
183 {
184 private OdVectorOdInt32 collectionRef;
185 private int currentIndex;
186 private object currentObject;
187 private int currentSize;
188
190 collectionRef = collection;
191 currentIndex = -1;
192 currentObject = null;
193 currentSize = collectionRef.Count;
194 }
195
196 // Type-safe iterator Current
197 public Int32 /*SIMPLETYPE*/ Current {
198 get {
199 if (currentIndex == -1)
200 throw new InvalidOperationException("Enumeration not started.");
201 if (currentIndex > currentSize - 1)
202 throw new InvalidOperationException("Enumeration finished.");
203 if (currentObject == null)
204 throw new InvalidOperationException("Collection modified.");
205 return (Int32 /*SIMPLETYPE*/)currentObject;
206 }
207 }
208
209 // Type-unsafe IEnumerator.Current
210 object System.Collections.IEnumerator.Current {
211 get {
212 return Current;
213 }
214 }
215
216 public bool MoveNext() {
217 int size = collectionRef.Count;
218 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
219 if (moveOkay) {
220 currentIndex++;
221 currentObject = collectionRef[currentIndex];
222 } else {
223 currentObject = null;
224 }
225 return moveOkay;
226 }
227
228 public void Reset() {
229 currentIndex = -1;
230 currentObject = null;
231 if (collectionRef.Count != currentSize) {
232 throw new InvalidOperationException("Collection modified.");
233 }
234 }
235
236 public void Dispose() {
237 currentIndex = -1;
238 currentObject = null;
239 }
240 }
241
242 public void Clear() {
245 }
246
247 public void Add(Int32 /*SIMPLETYPE cstype*/ x) {
248 GlobalsPINVOKE.OdVectorOdInt32_Add(swigCPtr, x /*SIMPLETYPE csin*/);
250 }
251
252 private uint size() {
253 uint ret = GlobalsPINVOKE.OdVectorOdInt32_size(swigCPtr);
255 return ret;
256 }
257
258 private uint capacity() {
259 uint ret = GlobalsPINVOKE.OdVectorOdInt32_capacity(swigCPtr);
260 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
261 return ret;
262 }
263
264 private void reserve(uint n) {
265 GlobalsPINVOKE.OdVectorOdInt32_reserve(swigCPtr, n);
266 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
267 }
268
269 public void resize(uint logicalLength) {
270 GlobalsPINVOKE.OdVectorOdInt32_resize(swigCPtr, logicalLength);
272 }
273
274 private Int32 getitemcopy(int index) {
275// test csout
276 /*SIMPLETYPE*/
277 Int32 ret = GlobalsPINVOKE.OdVectorOdInt32_getitemcopy(swigCPtr, index);
279 return ret;
280 }
281
282 private Int32 /*SIMPLETYPE cstype*/ getitem(int index) {
283// test csout
284 /*SIMPLETYPE csout*/
285 Int32 ret = GlobalsPINVOKE.OdVectorOdInt32_getitem(swigCPtr, index);
286 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
287 return ret;
288 }
289
290 private void setitem(int index, Int32 /*SIMPLETYPE cstype*/ val) {
291 GlobalsPINVOKE.OdVectorOdInt32_setitem(swigCPtr, index, val /*SIMPLETYPE csin*/);
292 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
293 }
294
295 public void AddRange(OdVectorOdInt32 values) {
298 }
299
300 public OdVectorOdInt32 GetRange(int index, int count) {
301 global::System.IntPtr cPtr = GlobalsPINVOKE.OdVectorOdInt32_GetRange(swigCPtr, index, count);
302 OdVectorOdInt32 ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdVectorOdInt32(cPtr, false);
304 return ret;
305 }
306
307 public void Insert(int index, Int32 /*SIMPLETYPE cstype*/ x) {
308 GlobalsPINVOKE.OdVectorOdInt32_Insert(swigCPtr, index, x /*SIMPLETYPE csin*/);
310 }
311
312 public void InsertRange(int index, OdVectorOdInt32 values) {
315 }
316
317 public void RemoveAt(int index) {
320 }
321
322 public void RemoveRange(int index, int count) {
323 GlobalsPINVOKE.OdVectorOdInt32_RemoveRange(swigCPtr, index, count);
325 }
326
327 public static OdVectorOdInt32 Repeat(Int32 /*SIMPLETYPE cstype*/ value, int count) {
328 global::System.IntPtr cPtr = GlobalsPINVOKE.OdVectorOdInt32_Repeat(value /*SIMPLETYPE csin*/, count);
329 OdVectorOdInt32 ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdVectorOdInt32(cPtr, true);
331 return ret;
332 }
333
334 public void Reverse() {
337 }
338
339 public void Reverse(int index, int count) {
340 GlobalsPINVOKE.OdVectorOdInt32_Reverse__SWIG_1(swigCPtr, index, count);
342 }
343
344 public void SetRange(int index, OdVectorOdInt32 values) {
347 }
348
349 public bool Contains(Int32 /*SIMPLETYPE cstype*/ value) {
350 bool ret = GlobalsPINVOKE.OdVectorOdInt32_Contains(swigCPtr, value /*SIMPLETYPE csin*/);
352 return ret;
353 }
354
355 public int IndexOf(Int32 /*SIMPLETYPE cstype*/ value) {
356 int ret = GlobalsPINVOKE.OdVectorOdInt32_IndexOf(swigCPtr, value /*SIMPLETYPE csin*/);
358 return ret;
359 }
360
361 public int LastIndexOf(Int32 /*SIMPLETYPE cstype*/ value) {
362 int ret = GlobalsPINVOKE.OdVectorOdInt32_LastIndexOf(swigCPtr, value /*SIMPLETYPE csin*/);
364 return ret;
365 }
366
367 public bool Remove(Int32 /*SIMPLETYPE cstype*/ value) {
368 bool ret = GlobalsPINVOKE.OdVectorOdInt32_Remove(swigCPtr, value /*SIMPLETYPE csin*/);
370 return ret;
371 }
372
373}
374
375}
static global::System.Exception Retrieve()
static bool OdVectorOdInt32_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static void OdVectorOdInt32_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr OdVectorOdInt32_Repeat(Int32 jarg1, int jarg2)
static void OdVectorOdInt32_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, Int32 jarg3)
static void OdVectorOdInt32_Add(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static bool OdVectorOdInt32_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static int OdVectorOdInt32_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static void OdVectorOdInt32_resize(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static int OdVectorOdInt32_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static Int32 OdVectorOdInt32_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void OdVectorOdInt32_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdInt32_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void OdVectorOdInt32_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void OdVectorOdInt32_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdInt32_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void OdVectorOdInt32_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdVectorOdInt32_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void delete_OdVectorOdInt32(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdInt32_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static uint OdVectorOdInt32_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static OdVectorOdInt32 Repeat(Int32 value, int count)
virtual void Dispose(bool disposing)
OdVectorOdInt32Enumerator GetEnumerator()
void CopyTo(Int32[] array, int arrayIndex)
void resize(uint logicalLength)
static HandleRef getCPtr(OdVectorOdInt32 obj)
void RemoveRange(int index, int count)
void CopyTo(Int32[] array)
OdVectorOdInt32(System.Collections.ICollection c)
OdVectorOdInt32(IntPtr cPtr, bool cMemoryOwn)
void CopyTo(int index, Int32[] array, int arrayIndex, int count)
void AddRange(OdVectorOdInt32 values)
void SetRange(int index, OdVectorOdInt32 values)
OdVectorOdInt32(OdVectorOdInt32 other)
OdVectorOdInt32 GetRange(int index, int count)
void Insert(int index, Int32 x)
void Reverse(int index, int count)
void InsertRange(int index, OdVectorOdInt32 values)