15 using System.Collections;
16 using System.Collections.Generic;
18 public partial class LocalSearchOperatorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IList<LocalSearchOperator>
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
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);
148 return new LocalSearchOperatorVectorEnumerator(
this);
151 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
152 return new LocalSearchOperatorVectorEnumerator(
this);
165 , global::System.Collections.Generic.IEnumerator<LocalSearchOperator>
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;
233 private uint size() {
238 private uint capacity() {
239 uint ret = operations_research_constraint_solverPINVOKE.LocalSearchOperatorVector_capacity(swigCPtr);
243 private void reserve(uint n) {
244 operations_research_constraint_solverPINVOKE.LocalSearchOperatorVector_reserve(swigCPtr, n);
265 private LocalSearchOperator getitem(
int index) {
266 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.LocalSearchOperatorVector_getitem(swigCPtr, index);
267 LocalSearchOperator ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new LocalSearchOperator(cPtr,
false);
268 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
272 private void setitem(
int index, LocalSearchOperator val) {
273 operations_research_constraint_solverPINVOKE.LocalSearchOperatorVector_setitem(swigCPtr, index, LocalSearchOperator.getCPtr(val));
274 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();