Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
CFxHistoryObjectArray.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 CFxHistoryObjectArray : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IList<CFxHistoryObject>
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 CFxHistoryObjectArray(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(CFxHistoryObjectArray 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 CFxHistoryObjectArray(global::System.Collections.IEnumerable c) : this() {
55 if (c == null)
56 throw new global::System.ArgumentNullException("c");
57 foreach (CFxHistoryObject element in c) {
58 this.Add(element);
59 }
60 }
61
62 public CFxHistoryObjectArray(global::System.Collections.Generic.IEnumerable<CFxHistoryObject> c) : this() {
63 if (c == null)
64 throw new global::System.ArgumentNullException("c");
65 foreach (CFxHistoryObject 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 CFxHistoryObject 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(CFxHistoryObject[] array)
115 {
116 CopyTo(0, array, 0, this.Count);
117 }
118
119 public void CopyTo(CFxHistoryObject[] array, int arrayIndex)
120 {
121 CopyTo(0, array, arrayIndex, this.Count);
122 }
123
124 public void CopyTo(int index, CFxHistoryObject[] 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
143 CFxHistoryObject[] array = new CFxHistoryObject[this.Count];
144 this.CopyTo(array);
145 return array;
146 }
147
148 global::System.Collections.Generic.IEnumerator<CFxHistoryObject> global::System.Collections.Generic.IEnumerable<CFxHistoryObject>.GetEnumerator() {
149 return new CFxHistoryObjectArrayEnumerator(this);
150 }
151
152 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
153 return new CFxHistoryObjectArrayEnumerator(this);
154 }
155
157 return new CFxHistoryObjectArrayEnumerator(this);
158 }
159
160 // Type-safe enumerator
165 public class CFxHistoryObjectArrayEnumerator : global::System.Collections.IEnumerator
166 , global::System.Collections.Generic.IEnumerator<CFxHistoryObject>
167 {
168 private CFxHistoryObjectArray 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 (CFxHistoryObject)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(CFxHistoryObject x) {
234 }
235
236 private uint size() {
239 return ret;
240 }
241
242 private uint capacity() {
243 uint ret = PCADGlobalsPINVOKE.CFxHistoryObjectArray_capacity(swigCPtr);
244 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
245 return ret;
246 }
247
248 private void reserve(uint n) {
249 PCADGlobalsPINVOKE.CFxHistoryObjectArray_reserve(swigCPtr, n);
250 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
251 }
252
253 public CFxHistoryObjectArray() : this(PCADGlobalsPINVOKE.new_CFxHistoryObjectArray__SWIG_0(), true) {
255 }
256
257 public CFxHistoryObjectArray(CFxHistoryObjectArray other) : this(PCADGlobalsPINVOKE.new_CFxHistoryObjectArray__SWIG_1(CFxHistoryObjectArray.getCPtr(other)), true) {
259 }
260
261 public CFxHistoryObjectArray(int capacity) : this(PCADGlobalsPINVOKE.new_CFxHistoryObjectArray__SWIG_2(capacity), true) {
263 }
264
265 private CFxHistoryObject getitemcopy(int index) {
266 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.CFxHistoryObjectArray_getitemcopy(swigCPtr, index);
267 CFxHistoryObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxHistoryObject(cPtr, false);
269 return ret;
270 }
271
272 private CFxHistoryObject getitem(int index) {
273 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.CFxHistoryObjectArray_getitem(swigCPtr, index);
274 CFxHistoryObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxHistoryObject(cPtr, false);
275 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
276 return ret;
277 }
278
279 private void setitem(int index, CFxHistoryObject val) {
280 PCADGlobalsPINVOKE.CFxHistoryObjectArray_setitem(swigCPtr, index, CFxHistoryObject.getCPtr(val));
281 if (PCADGlobalsPINVOKE.SWIGPendingException.Pending) throw PCADGlobalsPINVOKE.SWIGPendingException.Retrieve();
282 }
283
284 public void AddRange(CFxHistoryObjectArray values) {
287 }
288
289 public CFxHistoryObjectArray GetRange(int index, int count) {
290 global::System.IntPtr cPtr = PCADGlobalsPINVOKE.CFxHistoryObjectArray_GetRange(swigCPtr, index, count);
291 CFxHistoryObjectArray ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxHistoryObjectArray(cPtr, true);
293 return ret;
294 }
295
296 public void Insert(int index, CFxHistoryObject x) {
299 }
300
301 public void InsertRange(int index, CFxHistoryObjectArray values) {
304 }
305
306 public void RemoveAt(int index) {
309 }
310
311 public void RemoveRange(int index, int count) {
314 }
315
318 CFxHistoryObjectArray ret = (cPtr == global::System.IntPtr.Zero) ? null : new CFxHistoryObjectArray(cPtr, true);
320 return ret;
321 }
322
323 public void Reverse() {
326 }
327
328 public void Reverse(int index, int count) {
331 }
332
333 public void SetRange(int index, CFxHistoryObjectArray values) {
336 }
337
341 return ret;
342 }
343
347 return ret;
348 }
349
353 return ret;
354 }
355
359 return ret;
360 }
361
362}
363
364}
void SetRange(int index, CFxHistoryObjectArray values)
void CopyTo(int index, CFxHistoryObject[] array, int arrayIndex, int count)
bool Contains(CFxHistoryObject value)
void CopyTo(CFxHistoryObject[] array)
CFxHistoryObjectArray GetRange(int index, int count)
virtual void Dispose(bool disposing)
void AddRange(CFxHistoryObjectArray values)
CFxHistoryObjectArray(CFxHistoryObjectArray other)
void RemoveRange(int index, int count)
static CFxHistoryObjectArray Repeat(CFxHistoryObject value, int count)
CFxHistoryObjectArray(global::System.Collections.IEnumerable c)
int IndexOf(CFxHistoryObject value)
void Insert(int index, CFxHistoryObject x)
bool Remove(CFxHistoryObject value)
CFxHistoryObjectArray(global::System.Collections.Generic.IEnumerable< CFxHistoryObject > c)
CFxHistoryObjectArray(IntPtr cPtr, bool cMemoryOwn)
static HandleRef getCPtr(CFxHistoryObjectArray obj)
void CopyTo(CFxHistoryObject[] array, int arrayIndex)
void InsertRange(int index, CFxHistoryObjectArray values)
CFxHistoryObjectArrayEnumerator GetEnumerator()
int LastIndexOf(CFxHistoryObject value)
static HandleRef getCPtr(CFxHistoryObject obj)
static int CFxHistoryObjectArray_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void CFxHistoryObjectArray_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxHistoryObjectArray_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxHistoryObjectArray_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static void CFxHistoryObjectArray_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void CFxHistoryObjectArray_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void CFxHistoryObjectArray_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void CFxHistoryObjectArray_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void CFxHistoryObjectArray_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void CFxHistoryObjectArray_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static global::System.IntPtr CFxHistoryObjectArray_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool CFxHistoryObjectArray_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void delete_CFxHistoryObjectArray(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr CFxHistoryObjectArray_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static bool CFxHistoryObjectArray_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void CFxHistoryObjectArray_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr CFxHistoryObjectArray_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static uint CFxHistoryObjectArray_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static int CFxHistoryObjectArray_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)