14using System.Runtime.InteropServices;
17, System.Collections.Generic.IList<Int32 >
19 private Object locker =
new Object();
20 private HandleRef swigCPtr;
22 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 swigCPtr =
new HandleRef(
this, cPtr);
27 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
29 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
38 global::System.GC.SuppressFinalize(
this);
41 protected virtual void Dispose(
bool disposing) {
43 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
48 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
56 throw new ArgumentNullException(
"c");
57 foreach (Int32 element
in c) {
63 : this(
GlobalsPINVOKE.new_OdVectorOdInt32__SWIG_0(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null)
65 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
74 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
82 public OdVectorOdInt32(
int capacity) : this(
GlobalsPINVOKE.new_OdVectorOdInt32__SWIG_2(capacity), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
83 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
104 public Int32
this[
int index] {
106 return getitem(index);
109 setitem(index,
value);
115 return (
int)capacity();
119 throw new ArgumentOutOfRangeException(
"Capacity");
120 reserve((uint)
value);
141 public void CopyTo(Int32 [] array,
int arrayIndex)
146 public void CopyTo(
int index, Int32 [] array,
int arrayIndex,
int count)
149 throw new ArgumentNullException(
"array");
151 throw new ArgumentOutOfRangeException(
"index",
"Value is less than zero");
153 throw new ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
155 throw new ArgumentOutOfRangeException(
"count",
"Value is less than zero");
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);
164 System.Collections.Generic.IEnumerator<Int32 > System.Collections.Generic.IEnumerable<Int32 >.GetEnumerator() {
165 return new OdVectorOdInt32Enumerator(
this);
168 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
169 return new OdVectorOdInt32Enumerator(
this);
182 , System.Collections.Generic.IEnumerator<Int32 >
185 private int currentIndex;
186 private object currentObject;
187 private int currentSize;
190 collectionRef = collection;
192 currentObject =
null;
193 currentSize = collectionRef.
Count;
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 )currentObject;
210 object System.Collections.IEnumerator.Current {
217 int size = collectionRef.
Count;
218 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
221 currentObject = collectionRef[currentIndex];
223 currentObject =
null;
230 currentObject =
null;
231 if (collectionRef.
Count != currentSize) {
232 throw new InvalidOperationException(
"Collection modified.");
238 currentObject =
null;
247 public void Add(Int32 x) {
252 private uint size() {
258 private uint capacity() {
259 uint ret = GlobalsPINVOKE.OdVectorOdInt32_capacity(swigCPtr);
260 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
264 private void reserve(uint n) {
265 GlobalsPINVOKE.OdVectorOdInt32_reserve(swigCPtr, n);
266 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
274 private Int32 getitemcopy(
int index) {
282 private Int32 getitem(
int index) {
285 Int32 ret = GlobalsPINVOKE.OdVectorOdInt32_getitem(swigCPtr, index);
286 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
290 private void setitem(
int index, Int32 val) {
291 GlobalsPINVOKE.OdVectorOdInt32_setitem(swigCPtr, index, val );
292 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
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)
OdVectorOdInt32Enumerator(OdVectorOdInt32 collection)
static OdVectorOdInt32 Repeat(Int32 value, int count)
OdVectorOdInt32(int capacity)
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)
bool Contains(Int32 value)
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)
int LastIndexOf(Int32 value)
void Insert(int index, Int32 x)
void Reverse(int index, int count)
void InsertRange(int index, OdVectorOdInt32 values)