14using System.Runtime.InteropServices;
17, System.Collections.Generic.IList<byte >
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 (
byte element
in c) {
63 : this(
GlobalsPINVOKE.new_OdVectorOdUInt8__SWIG_0(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null)
65 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
74 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
82 public OdVectorOdUInt8(
int capacity) : this(
GlobalsPINVOKE.new_OdVectorOdUInt8__SWIG_2(capacity), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null) {
83 MemoryTransaction mTr = MemoryManager.GetMemoryManager().GetCurrentTransaction();
104 public byte 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(
byte [] array,
int arrayIndex)
146 public void CopyTo(
int index,
byte [] 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<
byte > System.Collections.Generic.IEnumerable<
byte >.GetEnumerator() {
165 return new OdVectorOdUInt8Enumerator(
this);
168 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
169 return new OdVectorOdUInt8Enumerator(
this);
182 , System.Collections.Generic.IEnumerator<byte >
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 (
byte )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;
252 private uint size() {
258 private uint capacity() {
259 uint ret = GlobalsPINVOKE.OdVectorOdUInt8_capacity(swigCPtr);
260 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
264 private void reserve(uint n) {
265 GlobalsPINVOKE.OdVectorOdUInt8_reserve(swigCPtr, n);
266 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
274 private byte getitemcopy(
int index) {
282 private byte getitem(
int index) {
285 byte ret = GlobalsPINVOKE.OdVectorOdUInt8_getitem(swigCPtr, index);
286 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
290 private void setitem(
int index,
byte val) {
291 GlobalsPINVOKE.OdVectorOdUInt8_setitem(swigCPtr, index, val );
292 if (GlobalsPINVOKE.SWIGPendingException.Pending)
throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
static global::System.Exception Retrieve()
static void OdVectorOdUInt8_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void OdVectorOdUInt8_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdVectorOdUInt8_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, byte jarg3)
static void OdVectorOdUInt8_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool OdVectorOdUInt8_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2)
static uint OdVectorOdUInt8_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static int OdVectorOdUInt8_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2)
static void delete_OdVectorOdUInt8(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdVectorOdUInt8_Repeat(byte jarg1, int jarg2)
static void OdVectorOdUInt8_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void OdVectorOdUInt8_Add(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2)
static global::System.IntPtr OdVectorOdUInt8_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void OdVectorOdUInt8_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void OdVectorOdUInt8_resize(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2)
static byte OdVectorOdUInt8_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void OdVectorOdUInt8_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool OdVectorOdUInt8_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2)
static void OdVectorOdUInt8_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static int OdVectorOdUInt8_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, byte jarg2)
static void OdVectorOdUInt8_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
OdVectorOdUInt8Enumerator(OdVectorOdUInt8 collection)
void Insert(int index, byte x)
void CopyTo(byte[] array, int arrayIndex)
bool Contains(byte value)
static HandleRef getCPtr(OdVectorOdUInt8 obj)
OdVectorOdUInt8(System.Collections.ICollection c)
void InsertRange(int index, OdVectorOdUInt8 values)
virtual void Dispose(bool disposing)
void Reverse(int index, int count)
static OdVectorOdUInt8 Repeat(byte value, int count)
void resize(uint logicalLength)
OdVectorOdUInt8 GetRange(int index, int count)
int LastIndexOf(byte value)
void RemoveRange(int index, int count)
OdVectorOdUInt8Enumerator GetEnumerator()
void CopyTo(int index, byte[] array, int arrayIndex, int count)
void SetRange(int index, OdVectorOdUInt8 values)
void AddRange(OdVectorOdUInt8 values)
void CopyTo(byte[] array)
OdVectorOdUInt8(int capacity)
OdVectorOdUInt8(IntPtr cPtr, bool cMemoryOwn)
OdVectorOdUInt8(OdVectorOdUInt8 other)