Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
KeywordVector.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 PCAD_DOT_NET {
12
13using System;
14using System.Runtime.InteropServices;
15using Teigha.Core;
16using Teigha.TD;
17
18public class KeywordVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<SWIGTYPE_p_KeywordPair>
19 {
20 private Object locker = new Object();
21 private HandleRef swigCPtr;
22 protected bool swigCMemOwn;
23 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
24 public KeywordVector(IntPtr cPtr, bool cMemoryOwn) {
25 swigCMemOwn = cMemoryOwn;
26 swigCPtr = new HandleRef(this, cPtr);
27 }
28 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
29 public static HandleRef getCPtr(KeywordVector obj) {
30 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
31 }
32
34 Dispose(false);
35 }
36
37 public void Dispose() {
38 Dispose(true);
39 global::System.GC.SuppressFinalize(this);
40 }
41
42 protected virtual void Dispose(bool disposing) {
43 lock(this) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
45 if (swigCMemOwn) {
46 swigCMemOwn = false;
48 }
49 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
50 }
51 }
52 }
53
54 public KeywordVector(global::System.Collections.IEnumerable c) : this() {
55 if (c == null)
56 throw new global::System.ArgumentNullException("c");
57 foreach (SWIGTYPE_p_KeywordPair element in c) {
58 this.Add(element);
59 }
60 }
61
62 public KeywordVector(global::System.Collections.Generic.IEnumerable<SWIGTYPE_p_KeywordPair> c) : this() {
63 if (c == null)
64 throw new global::System.ArgumentNullException("c");
65 foreach (SWIGTYPE_p_KeywordPair element in c) {
66 this.Add(element);
67 }
68 }
69
70 public bool IsFixedSize {
71 get {
72 return false;
73 }
74 }
75
76 public bool IsReadOnly {
77 get {
78 return false;
79 }
80 }
81
82 public SWIGTYPE_p_KeywordPair this[int index] {
83 get {
84 return getitem(index);
85 }
86 set {
87 setitem(index, value);
88 }
89 }
90
91 public int Capacity {
92 get {
93 return (int)capacity();
94 }
95 set {
96 if (value < size())
97 throw new global::System.ArgumentOutOfRangeException("Capacity");
98 reserve((uint)value);
99 }
100 }
101
102 public int Count {
103 get {
104 return (int)size();
105 }
106 }
107
108 public bool IsSynchronized {
109 get {
110 return false;
111 }
112 }
113
114 public void CopyTo(SWIGTYPE_p_KeywordPair[] array)
115 {
116 CopyTo(0, array, 0, this.Count);
117 }
118
119 public void CopyTo(SWIGTYPE_p_KeywordPair[] array, int arrayIndex)
120 {
121 CopyTo(0, array, arrayIndex, this.Count);
122 }
123
124 public void CopyTo(int index, SWIGTYPE_p_KeywordPair[] array, int arrayIndex, int count)
125 {
126 if (array == null)
127 throw new global::System.ArgumentNullException("array");
128 if (index < 0)
129 throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
130 if (arrayIndex < 0)
131 throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
132 if (count < 0)
133 throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
134 if (array.Rank > 1)
135 throw new global::System.ArgumentException("Multi dimensional array.", "array");
136 if (index+count > this.Count || arrayIndex+count > array.Length)
137 throw new global::System.ArgumentException("Number of elements to copy is too large.");
138 for (int i=0; i<count; i++)
139 array.SetValue(getitemcopy(index+i), arrayIndex+i);
140 }
141
144 this.CopyTo(array);
145 return array;
146 }
147
148 global::System.Collections.Generic.IEnumerator<SWIGTYPE_p_KeywordPair> global::System.Collections.Generic.IEnumerable<SWIGTYPE_p_KeywordPair>.GetEnumerator() {
149 return new KeywordVectorEnumerator(this);
150 }
151
152 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
153 return new KeywordVectorEnumerator(this);
154 }
155
157 return new KeywordVectorEnumerator(this);
158 }
159
160 // Type-safe enumerator
165 public class KeywordVectorEnumerator : global::System.Collections.IEnumerator
166 , global::System.Collections.Generic.IEnumerator<SWIGTYPE_p_KeywordPair>
167 {
168 private KeywordVector collectionRef;
169 private int currentIndex;
170 private object currentObject;
171 private int currentSize;
172
174 collectionRef = collection;
175 currentIndex = -1;
176 currentObject = null;
177 currentSize = collectionRef.Count;
178 }
179
180 // Type-safe iterator Current
182 get {
183 if (currentIndex == -1)
184 throw new global::System.InvalidOperationException("Enumeration not started.");
185 if (currentIndex > currentSize - 1)
186 throw new global::System.InvalidOperationException("Enumeration finished.");
187 if (currentObject == null)
188 throw new global::System.InvalidOperationException("Collection modified.");
189 return (SWIGTYPE_p_KeywordPair)currentObject;
190 }
191 }
192
193 // Type-unsafe IEnumerator.Current
194 object global::System.Collections.IEnumerator.Current {
195 get {
196 return Current;
197 }
198 }
199
200 public bool MoveNext() {
201 int size = collectionRef.Count;
202 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
203 if (moveOkay) {
204 currentIndex++;
205 currentObject = collectionRef[currentIndex];
206 } else {
207 currentObject = null;
208 }
209 return moveOkay;
210 }
211
212 public void Reset() {
213 currentIndex = -1;
214 currentObject = null;
215 if (collectionRef.Count != currentSize) {
216 throw new global::System.InvalidOperationException("Collection modified.");
217 }
218 }
219
220 public void Dispose() {
221 currentIndex = -1;
222 currentObject = null;
223 }
224 }
225
226 public void Clear() {
229 }
230
234 }
235
236 private uint size() {
237 uint ret = PCADGlobalsPINVOKE.KeywordVector_size(swigCPtr);
239 return ret;
240 }
241
242 private uint capacity() {
243 uint ret = PCADGlobalsPINVOKE.KeywordVector_capacity(swigCPtr);
244 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
245 return ret;
246 }
247
248 private void reserve(uint n) {
249 PCADGlobalsPINVOKE.KeywordVector_reserve(swigCPtr, n);
250 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
251 }
252
253 public KeywordVector() : this(PCADGlobalsPINVOKE.new_KeywordVector__SWIG_0(), true) {
255 }
256
257 public KeywordVector(KeywordVector other) : this(PCADGlobalsPINVOKE.new_KeywordVector__SWIG_1(KeywordVector.getCPtr(other)), true) {
259 }
260
261 public KeywordVector(int capacity) : this(PCADGlobalsPINVOKE.new_KeywordVector__SWIG_2(capacity), true) {
263 }
264
265 private SWIGTYPE_p_KeywordPair getitemcopy(int index) {
268 return ret;
269 }
270
271 private SWIGTYPE_p_KeywordPair getitem(int index) {
272 SWIGTYPE_p_KeywordPair ret = new SWIGTYPE_p_KeywordPair(PCADGlobalsPINVOKE.KeywordVector_getitem(swigCPtr, index), false);
273 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
274 return ret;
275 }
276
277 private void setitem(int index, SWIGTYPE_p_KeywordPair val) {
278 PCADGlobalsPINVOKE.KeywordVector_setitem(swigCPtr, index, SWIGTYPE_p_KeywordPair.getCPtr(val));
279 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
280 }
281
282 public void AddRange(KeywordVector values) {
285 }
286
287 public KeywordVector GetRange(int index, int count) {
288 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.KeywordVector_GetRange(swigCPtr, index, count);
289 KeywordVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new KeywordVector(cPtr, true);
291 return ret;
292 }
293
294 public void Insert(int index, SWIGTYPE_p_KeywordPair x) {
297 }
298
299 public void InsertRange(int index, KeywordVector values) {
302 }
303
304 public void RemoveAt(int index) {
307 }
308
309 public void RemoveRange(int index, int count) {
310 PCADGlobalsPINVOKE.KeywordVector_RemoveRange(swigCPtr, index, count);
312 }
313
315 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.KeywordVector_Repeat(SWIGTYPE_p_KeywordPair.getCPtr(value), count);
316 KeywordVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new KeywordVector(cPtr, true);
318 return ret;
319 }
320
321 public void Reverse() {
324 }
325
326 public void Reverse(int index, int count) {
329 }
330
331 public void SetRange(int index, KeywordVector values) {
334 }
335
336}
337
338}
KeywordVector(global::System.Collections.IEnumerable c)
KeywordVector(IntPtr cPtr, bool cMemoryOwn)
void Insert(int index, SWIGTYPE_p_KeywordPair x)
virtual void Dispose(bool disposing)
void SetRange(int index, KeywordVector values)
void CopyTo(SWIGTYPE_p_KeywordPair[] array)
static HandleRef getCPtr(KeywordVector obj)
void AddRange(KeywordVector values)
KeywordVectorEnumerator GetEnumerator()
void RemoveRange(int index, int count)
void CopyTo(int index, SWIGTYPE_p_KeywordPair[] array, int arrayIndex, int count)
KeywordVector GetRange(int index, int count)
SWIGTYPE_p_KeywordPair[] ToArray()
void CopyTo(SWIGTYPE_p_KeywordPair[] array, int arrayIndex)
void Add(SWIGTYPE_p_KeywordPair x)
KeywordVector(KeywordVector other)
KeywordVector(global::System.Collections.Generic.IEnumerable< SWIGTYPE_p_KeywordPair > c)
void Reverse(int index, int count)
static KeywordVector Repeat(SWIGTYPE_p_KeywordPair value, int count)
void InsertRange(int index, KeywordVector values)
static global::System.IntPtr KeywordVector_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static global::System.IntPtr KeywordVector_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void KeywordVector_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void KeywordVector_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void KeywordVector_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void KeywordVector_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void KeywordVector_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static uint KeywordVector_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void KeywordVector_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr KeywordVector_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void KeywordVector_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void KeywordVector_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void KeywordVector_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_KeywordVector(global::System.Runtime.InteropServices.HandleRef jarg1)
static void KeywordVector_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)