15 using System.Collections;
16 using System.Collections.Generic;
18 public partial class CpInt64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable
19 , global::System.Collections.Generic.IEnumerable<CpInt64Vector>
21 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
29 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
CpInt64VectorVector obj) {
30 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
39 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
46 global::System.GC.SuppressFinalize(
this);
52 throw new global::System.ArgumentNullException(
"c");
72 return getitem(index);
75 setitem(index, value);
81 return (
int)capacity();
85 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
115 throw new global::System.ArgumentNullException(
"array");
117 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
119 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
121 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
123 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
124 if (index+count > this.
Count || arrayIndex+count > array.Length)
125 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
126 for (
int i=0; i<count; i++)
127 array.SetValue(getitemcopy(index+i), arrayIndex+i);
130 global::System.Collections.Generic.IEnumerator<
CpInt64Vector> global::System.Collections.Generic.IEnumerable<
CpInt64Vector>.GetEnumerator() {
131 return new CpInt64VectorVectorEnumerator(
this);
134 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
135 return new CpInt64VectorVectorEnumerator(
this);
148 , global::System.Collections.Generic.IEnumerator<CpInt64Vector>
151 private int currentIndex;
152 private object currentObject;
153 private int currentSize;
156 collectionRef = collection;
158 currentObject =
null;
159 currentSize = collectionRef.
Count;
165 if (currentIndex == -1)
166 throw new global::System.InvalidOperationException(
"Enumeration not started.");
167 if (currentIndex > currentSize - 1)
168 throw new global::System.InvalidOperationException(
"Enumeration finished.");
169 if (currentObject ==
null)
170 throw new global::System.InvalidOperationException(
"Collection modified.");
176 object global::System.Collections.IEnumerator.Current {
183 int size = collectionRef.Count;
184 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
187 currentObject = collectionRef[currentIndex];
189 currentObject =
null;
196 currentObject =
null;
197 if (collectionRef.Count != currentSize) {
198 throw new global::System.InvalidOperationException(
"Collection modified.");
204 currentObject =
null;
217 private uint size() {
222 private uint capacity() {
223 uint ret = operations_research_constraint_solverPINVOKE.CpInt64VectorVector_capacity(swigCPtr);
227 private void reserve(uint n) {
228 operations_research_constraint_solverPINVOKE.CpInt64VectorVector_reserve(swigCPtr, n);
248 private CpInt64Vector getitem(
int index) {
249 CpInt64Vector ret =
new CpInt64Vector(operations_research_constraint_solverPINVOKE.CpInt64VectorVector_getitem(swigCPtr, index),
false);
250 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
254 private void setitem(
int index, CpInt64Vector val) {
255 operations_research_constraint_solverPINVOKE.CpInt64VectorVector_setitem(swigCPtr, index, CpInt64Vector.getCPtr(val));
256 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();