15 using System.Collections;
16 using System.Collections.Generic;
18 public partial class CpInt64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<CpInt64Vector>
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
CpInt64VectorVector obj) {
29 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.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);
55 throw new global::System.ArgumentNullException(
"c");
63 throw new global::System.ArgumentNullException(
"c");
83 return getitem(index);
86 setitem(index, value);
92 return (
int)capacity();
96 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
126 throw new global::System.ArgumentNullException(
"array");
128 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
130 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
132 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
134 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
135 if (index+count > this.
Count || arrayIndex+count > array.Length)
136 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
137 for (
int i=0; i<count; i++)
138 array.SetValue(getitemcopy(index+i), arrayIndex+i);
147 global::System.Collections.Generic.IEnumerator<
CpInt64Vector> global::System.Collections.Generic.IEnumerable<
CpInt64Vector>.GetEnumerator() {
148 return new CpInt64VectorVectorEnumerator(
this);
151 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
152 return new CpInt64VectorVectorEnumerator(
this);
165 , global::System.Collections.Generic.IEnumerator<CpInt64Vector>
168 private int currentIndex;
169 private object currentObject;
170 private int currentSize;
173 collectionRef = collection;
175 currentObject =
null;
176 currentSize = collectionRef.
Count;
182 if (currentIndex == -1)
183 throw new global::System.InvalidOperationException(
"Enumeration not started.");
184 if (currentIndex > currentSize - 1)
185 throw new global::System.InvalidOperationException(
"Enumeration finished.");
186 if (currentObject ==
null)
187 throw new global::System.InvalidOperationException(
"Collection modified.");
193 object global::System.Collections.IEnumerator.Current {
200 int size = collectionRef.Count;
201 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
204 currentObject = collectionRef[currentIndex];
206 currentObject =
null;
213 currentObject =
null;
214 if (collectionRef.Count != currentSize) {
215 throw new global::System.InvalidOperationException(
"Collection modified.");
221 currentObject =
null;
234 private uint size() {
239 private uint capacity() {
240 uint ret = operations_research_constraint_solverPINVOKE.CpInt64VectorVector_capacity(swigCPtr);
244 private void reserve(uint n) {
245 operations_research_constraint_solverPINVOKE.CpInt64VectorVector_reserve(swigCPtr, n);
265 private CpInt64Vector getitem(
int index) {
266 CpInt64Vector ret =
new CpInt64Vector(operations_research_constraint_solverPINVOKE.CpInt64VectorVector_getitem(swigCPtr, index),
false);
267 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
271 private void setitem(
int index, CpInt64Vector val) {
272 operations_research_constraint_solverPINVOKE.CpInt64VectorVector_setitem(swigCPtr, index, CpInt64Vector.getCPtr(val));
273 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();