Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
CFxStringArray.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 CFxStringArray : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<CFxString>
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 CFxStringArray(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(CFxStringArray 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 CFxStringArray(global::System.Collections.IEnumerable c) : this() {
55 if (c == null)
56 throw new global::System.ArgumentNullException("c");
57 foreach (CFxString element in c) {
58 this.Add(element);
59 }
60 }
61
62 public CFxStringArray(global::System.Collections.Generic.IEnumerable<CFxString> c) : this() {
63 if (c == null)
64 throw new global::System.ArgumentNullException("c");
65 foreach (CFxString 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 CFxString 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(CFxString[] array)
115 {
116 CopyTo(0, array, 0, this.Count);
117 }
118
119 public void CopyTo(CFxString[] array, int arrayIndex)
120 {
121 CopyTo(0, array, arrayIndex, this.Count);
122 }
123
124 public void CopyTo(int index, CFxString[] 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
142 public CFxString[] ToArray() {
143 CFxString[] array = new CFxString[this.Count];
144 this.CopyTo(array);
145 return array;
146 }
147
148 global::System.Collections.Generic.IEnumerator<CFxString> global::System.Collections.Generic.IEnumerable<CFxString>.GetEnumerator() {
149 return new CFxStringArrayEnumerator(this);
150 }
151
152 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
153 return new CFxStringArrayEnumerator(this);
154 }
155
157 return new CFxStringArrayEnumerator(this);
158 }
159
160 // Type-safe enumerator
165 public class CFxStringArrayEnumerator : global::System.Collections.IEnumerator
166 , global::System.Collections.Generic.IEnumerator<CFxString>
167 {
168 private CFxStringArray 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 (CFxString)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
231 public void Add(CFxString x) {
234 }
235
236 private uint size() {
237 uint ret = PCADGlobalsPINVOKE.CFxStringArray_size(swigCPtr);
239 return ret;
240 }
241
242 private uint capacity() {
243 uint ret = PCADGlobalsPINVOKE.CFxStringArray_capacity(swigCPtr);
244 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
245 return ret;
246 }
247
248 private void reserve(uint n) {
249 PCADGlobalsPINVOKE.CFxStringArray_reserve(swigCPtr, n);
250 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
251 }
252
253 public CFxStringArray() : this(PCADGlobalsPINVOKE.new_CFxStringArray__SWIG_0(), true) {
255 }
256
257 public CFxStringArray(CFxStringArray other) : this(PCADGlobalsPINVOKE.new_CFxStringArray__SWIG_1(CFxStringArray.getCPtr(other)), true) {
259 }
260
261 public CFxStringArray(int capacity) : this(PCADGlobalsPINVOKE.new_CFxStringArray__SWIG_2(capacity), true) {
263 }
264
265 private CFxString getitemcopy(int index) {
266 CFxString ret = new CFxString(PCADGlobalsPINVOKE.CFxStringArray_getitemcopy(swigCPtr, index), true);
268 return ret;
269 }
270
271 private CFxString getitem(int index) {
272 CFxString ret = new CFxString(PCADGlobalsPINVOKE.CFxStringArray_getitem(swigCPtr, index), false);
273 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
274 return ret;
275 }
276
277 private void setitem(int index, CFxString val) {
278 PCADGlobalsPINVOKE.CFxStringArray_setitem(swigCPtr, index, CFxString.getCPtr(val));
279 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
280 }
281
282 public void AddRange(CFxStringArray values) {
285 }
286
287 public CFxStringArray GetRange(int index, int count) {
288 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.CFxStringArray_GetRange(swigCPtr, index, count);
289 CFxStringArray ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxStringArray(cPtr, true);
291 return ret;
292 }
293
294 public void Insert(int index, CFxString x) {
297 }
298
299 public void InsertRange(int index, CFxStringArray values) {
302 }
303
304 public void RemoveAt(int index) {
307 }
308
309 public void RemoveRange(int index, int count) {
310 PCADGlobalsPINVOKE.CFxStringArray_RemoveRange(swigCPtr, index, count);
312 }
313
314 public static CFxStringArray Repeat(CFxString value, int count) {
315 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.CFxStringArray_Repeat(CFxString.getCPtr(value), count);
316 CFxStringArray ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxStringArray(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, CFxStringArray values) {
334 }
335
336}
337
338}
void RemoveRange(int index, int count)
static HandleRef getCPtr(CFxStringArray obj)
void Insert(int index, CFxString x)
CFxStringArray(CFxStringArray other)
void CopyTo(int index, CFxString[] array, int arrayIndex, int count)
CFxStringArray(global::System.Collections.Generic.IEnumerable< CFxString > c)
void SetRange(int index, CFxStringArray values)
void Reverse(int index, int count)
CFxStringArray(IntPtr cPtr, bool cMemoryOwn)
static CFxStringArray Repeat(CFxString value, int count)
CFxStringArray(global::System.Collections.IEnumerable c)
virtual void Dispose(bool disposing)
void CopyTo(CFxString[] array, int arrayIndex)
void InsertRange(int index, CFxStringArray values)
void AddRange(CFxStringArray values)
CFxStringArray GetRange(int index, int count)
CFxStringArrayEnumerator GetEnumerator()
void CopyTo(CFxString[] array)
static HandleRef getCPtr(CFxString obj)
Definition: CFxString.cs:28
static void CFxStringArray_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void CFxStringArray_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr CFxStringArray_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr CFxStringArray_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void CFxStringArray_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static uint CFxStringArray_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void CFxStringArray_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr CFxStringArray_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void delete_CFxStringArray(global::System.Runtime.InteropServices.HandleRef jarg1)
static void CFxStringArray_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxStringArray_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxStringArray_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void CFxStringArray_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxStringArray_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void CFxStringArray_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)