15 using System.Collections;
17 public class UtilInt64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<UtilInt64Vector>
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
24 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
28 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 global::System.GC.SuppressFinalize(
this);
40 protected virtual void Dispose(
bool disposing) {
42 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
47 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
54 throw new global::System.ArgumentNullException(
"c");
62 throw new global::System.ArgumentNullException(
"c");
82 return getitem(index);
85 setitem(index, value);
91 return (
int)capacity();
95 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
125 throw new global::System.ArgumentNullException(
"array");
127 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
129 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
131 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
133 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
134 if (index+count > this.
Count || arrayIndex+count > array.Length)
135 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
136 for (
int i=0; i<count; i++)
137 array.SetValue(getitemcopy(index+i), arrayIndex+i);
147 return new UtilInt64VectorVectorEnumerator(
this);
150 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
151 return new UtilInt64VectorVectorEnumerator(
this);
164 , global::System.Collections.Generic.IEnumerator<UtilInt64Vector>
167 private int currentIndex;
168 private object currentObject;
169 private int currentSize;
172 collectionRef = collection;
174 currentObject =
null;
175 currentSize = collectionRef.
Count;
181 if (currentIndex == -1)
182 throw new global::System.InvalidOperationException(
"Enumeration not started.");
183 if (currentIndex > currentSize - 1)
184 throw new global::System.InvalidOperationException(
"Enumeration finished.");
185 if (currentObject ==
null)
186 throw new global::System.InvalidOperationException(
"Collection modified.");
192 object global::System.Collections.IEnumerator.Current {
199 int size = collectionRef.Count;
200 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
203 currentObject = collectionRef[currentIndex];
205 currentObject =
null;
212 currentObject =
null;
213 if (collectionRef.Count != currentSize) {
214 throw new global::System.InvalidOperationException(
"Collection modified.");
220 currentObject =
null;
233 private uint size() {
238 private uint capacity() {
239 uint ret = operations_research_utilPINVOKE.UtilInt64VectorVector_capacity(swigCPtr);
243 private void reserve(uint n) {
244 operations_research_utilPINVOKE.UtilInt64VectorVector_reserve(swigCPtr, n);
264 private UtilInt64Vector getitem(
int index) {
265 UtilInt64Vector ret =
new UtilInt64Vector(operations_research_utilPINVOKE.UtilInt64VectorVector_getitem(swigCPtr, index),
false);
266 if (operations_research_utilPINVOKE.SWIGPendingException.Pending)
throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
270 private void setitem(
int index, UtilInt64Vector val) {
271 operations_research_utilPINVOKE.UtilInt64VectorVector_setitem(swigCPtr, index, UtilInt64Vector.getCPtr(val));
272 if (operations_research_utilPINVOKE.SWIGPendingException.Pending)
throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();