Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdVectorOdGePoint3d.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 OdVectorOdGePoint3d : IDisposable, System.Collections.IEnumerable
17, System.Collections.Generic.IList<OdGePoint3d>
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 OdVectorOdGePoint3d(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(OdVectorOdGePoint3d 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 OdVectorOdGePoint3d(System.Collections.ICollection c) : this() {
55 if (c == null)
56 throw new ArgumentNullException("c");
57 foreach (OdGePoint3d element in c) {
58 this.Add(element);
59 }
60 }
61
63 : this(GlobalsPINVOKE.new_OdVectorOdGePoint3d__SWIG_0(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null)
64 {
65 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #9
66 if (null != mTr)
67 {
68 mTr.AddObject(new OdVectorOdGePoint3d(swigCPtr.Handle, true));
69 }
71 }
72
73 public OdVectorOdGePoint3d(OdVectorOdGePoint3d other) : this(GlobalsPINVOKE.new_OdVectorOdGePoint3d__SWIG_1(OdVectorOdGePoint3d.getCPtr(other)), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
74 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #10
75 if (null != mTr)
76 {
77 mTr.AddObject(new OdVectorOdGePoint3d(swigCPtr.Handle, true));
78 }
80 }
81
82 public OdVectorOdGePoint3d(int capacity) : this(GlobalsPINVOKE.new_OdVectorOdGePoint3d__SWIG_2(capacity), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
83 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction(); // MemoryTransaction #11
84 if (null != mTr)
85 {
86 mTr.AddObject(new OdVectorOdGePoint3d(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 OdGePoint3d 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(OdGePoint3d[] array)
137 {
138 CopyTo(0, array, 0, this.Count);
139 }
140
141 public void CopyTo(OdGePoint3d[] array, int arrayIndex)
142 {
143 CopyTo(0, array, arrayIndex, this.Count);
144 }
145
146 public void CopyTo(int index, OdGePoint3d[] 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<OdGePoint3d> System.Collections.Generic.IEnumerable<OdGePoint3d>.GetEnumerator() {
165 return new OdVectorOdGePoint3dEnumerator(this);
166 }
167
168 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
169 return new OdVectorOdGePoint3dEnumerator(this);
170 }
171
173 return new OdVectorOdGePoint3dEnumerator(this);
174 }
175
176 // Type-safe enumerator
181 public class OdVectorOdGePoint3dEnumerator : System.Collections.IEnumerator
182 , System.Collections.Generic.IEnumerator<OdGePoint3d>
183 {
184 private OdVectorOdGePoint3d 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
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 (OdGePoint3d)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(OdGePoint3d x) {
250 }
251
252 private uint size() {
253 uint ret = GlobalsPINVOKE.OdVectorOdGePoint3d_size(swigCPtr);
255 return ret;
256 }
257
258 private uint capacity() {
259 uint ret = GlobalsPINVOKE.OdVectorOdGePoint3d_capacity(swigCPtr);
260 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
261 return ret;
262 }
263
264 private void reserve(uint n) {
265 GlobalsPINVOKE.OdVectorOdGePoint3d_reserve(swigCPtr, n);
266 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
267 }
268
269 public void resize(uint logicalLength) {
270 GlobalsPINVOKE.OdVectorOdGePoint3d_resize(swigCPtr, logicalLength);
272 }
273
274 private OdGePoint3d getitemcopy(int index) {
277 return ret;
278 }
279
280 private OdGePoint3d getitem(int index) {
281 OdGePoint3d ret = new OdGePoint3d(GlobalsPINVOKE.OdVectorOdGePoint3d_getitem(swigCPtr, index), false);
282 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
283 return ret;
284 }
285
286 private void setitem(int index, OdGePoint3d val) {
287 GlobalsPINVOKE.OdVectorOdGePoint3d_setitem(swigCPtr, index, OdGePoint3d.getCPtr(val));
288 if (GlobalsPINVOKE.SWIGPendingException.Pending) throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
289 }
290
291 public void AddRange(OdVectorOdGePoint3d values) {
294 }
295
296 public OdVectorOdGePoint3d GetRange(int index, int count) {
297 global::System.IntPtr cPtr = GlobalsPINVOKE.OdVectorOdGePoint3d_GetRange(swigCPtr, index, count);
298 OdVectorOdGePoint3d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdVectorOdGePoint3d(cPtr, false);
300 return ret;
301 }
302
303 public void Insert(int index, OdGePoint3d x) {
306 }
307
308 public void InsertRange(int index, OdVectorOdGePoint3d values) {
311 }
312
313 public void RemoveAt(int index) {
316 }
317
318 public void RemoveRange(int index, int count) {
319 GlobalsPINVOKE.OdVectorOdGePoint3d_RemoveRange(swigCPtr, index, count);
321 }
322
323 public static OdVectorOdGePoint3d Repeat(OdGePoint3d value, int count) {
324 global::System.IntPtr cPtr = GlobalsPINVOKE.OdVectorOdGePoint3d_Repeat(OdGePoint3d.getCPtr(value), count);
325 OdVectorOdGePoint3d ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdVectorOdGePoint3d(cPtr, true);
327 return ret;
328 }
329
330 public void Reverse() {
333 }
334
335 public void Reverse(int index, int count) {
338 }
339
340 public void SetRange(int index, OdVectorOdGePoint3d values) {
343 }
344
348 return ret;
349 }
350
354 return ret;
355 }
356
360 return ret;
361 }
362
363 public bool Remove(OdGePoint3d value) {
366 return ret;
367 }
368
369}
370
371}
static global::System.Exception Retrieve()
static global::System.IntPtr OdVectorOdGePoint3d_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int OdVectorOdGePoint3d_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdVectorOdGePoint3d_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void OdVectorOdGePoint3d_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdVectorOdGePoint3d_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static uint OdVectorOdGePoint3d_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdGePoint3d_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void OdVectorOdGePoint3d_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdVectorOdGePoint3d_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void OdVectorOdGePoint3d_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr OdVectorOdGePoint3d_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void OdVectorOdGePoint3d_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void delete_OdVectorOdGePoint3d(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdGePoint3d_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void OdVectorOdGePoint3d_resize(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static int OdVectorOdGePoint3d_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void OdVectorOdGePoint3d_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void OdVectorOdGePoint3d_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void OdVectorOdGePoint3d_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdGePoint3d_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static HandleRef getCPtr(OdGePoint3d obj)
Definition: OdGePoint3d.cs:26
void Reverse(int index, int count)
virtual void Dispose(bool disposing)
void SetRange(int index, OdVectorOdGePoint3d values)
OdVectorOdGePoint3d(OdVectorOdGePoint3d other)
static HandleRef getCPtr(OdVectorOdGePoint3d obj)
void CopyTo(int index, OdGePoint3d[] array, int arrayIndex, int count)
void resize(uint logicalLength)
bool Contains(OdGePoint3d value)
OdVectorOdGePoint3d(IntPtr cPtr, bool cMemoryOwn)
void Insert(int index, OdGePoint3d x)
OdVectorOdGePoint3d GetRange(int index, int count)
static OdVectorOdGePoint3d Repeat(OdGePoint3d value, int count)
int LastIndexOf(OdGePoint3d value)
void RemoveRange(int index, int count)
void CopyTo(OdGePoint3d[] array)
void InsertRange(int index, OdVectorOdGePoint3d values)
void AddRange(OdVectorOdGePoint3d values)
OdVectorOdGePoint3dEnumerator GetEnumerator()
void CopyTo(OdGePoint3d[] array, int arrayIndex)
OdVectorOdGePoint3d(System.Collections.ICollection c)