DotNet Reference

DotNet Reference

util/UtilInt64VectorVector.cs
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.12
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
11 namespace Google.OrTools.Util {
12 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 
17 public class UtilInt64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable
18  , global::System.Collections.Generic.IEnumerable<UtilInt64Vector>
19  {
20  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21  protected bool swigCMemOwn;
22 
23  internal UtilInt64VectorVector(global::System.IntPtr cPtr, bool cMemoryOwn) {
24  swigCMemOwn = cMemoryOwn;
25  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26  }
27 
28  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(UtilInt64VectorVector obj) {
29  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30  }
31 
33  Dispose();
34  }
35 
36  public virtual void Dispose() {
37  lock(this) {
38  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
39  if (swigCMemOwn) {
40  swigCMemOwn = false;
42  }
43  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
44  }
45  global::System.GC.SuppressFinalize(this);
46  }
47  }
48 
49  public UtilInt64VectorVector(global::System.Collections.ICollection c) : this() {
50  if (c == null)
51  throw new global::System.ArgumentNullException("c");
52  foreach (UtilInt64Vector element in c) {
53  this.Add(element);
54  }
55  }
56 
57  public bool IsFixedSize {
58  get {
59  return false;
60  }
61  }
62 
63  public bool IsReadOnly {
64  get {
65  return false;
66  }
67  }
68 
69  public UtilInt64Vector this[int index] {
70  get {
71  return getitem(index);
72  }
73  set {
74  setitem(index, value);
75  }
76  }
77 
78  public int Capacity {
79  get {
80  return (int)capacity();
81  }
82  set {
83  if (value < size())
84  throw new global::System.ArgumentOutOfRangeException("Capacity");
85  reserve((uint)value);
86  }
87  }
88 
89  public int Count {
90  get {
91  return (int)size();
92  }
93  }
94 
95  public bool IsSynchronized {
96  get {
97  return false;
98  }
99  }
100 
101  public void CopyTo(UtilInt64Vector[] array)
102  {
103  CopyTo(0, array, 0, this.Count);
104  }
105 
106  public void CopyTo(UtilInt64Vector[] array, int arrayIndex)
107  {
108  CopyTo(0, array, arrayIndex, this.Count);
109  }
110 
111  public void CopyTo(int index, UtilInt64Vector[] array, int arrayIndex, int count)
112  {
113  if (array == null)
114  throw new global::System.ArgumentNullException("array");
115  if (index < 0)
116  throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
117  if (arrayIndex < 0)
118  throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
119  if (count < 0)
120  throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
121  if (array.Rank > 1)
122  throw new global::System.ArgumentException("Multi dimensional array.", "array");
123  if (index+count > this.Count || arrayIndex+count > array.Length)
124  throw new global::System.ArgumentException("Number of elements to copy is too large.");
125  for (int i=0; i<count; i++)
126  array.SetValue(getitemcopy(index+i), arrayIndex+i);
127  }
128 
129  global::System.Collections.Generic.IEnumerator<UtilInt64Vector> global::System.Collections.Generic.IEnumerable<UtilInt64Vector>.GetEnumerator() {
130  return new UtilInt64VectorVectorEnumerator(this);
131  }
132 
133  global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
134  return new UtilInt64VectorVectorEnumerator(this);
135  }
136 
138  return new UtilInt64VectorVectorEnumerator(this);
139  }
140 
141  // Type-safe enumerator
146  public sealed class UtilInt64VectorVectorEnumerator : global::System.Collections.IEnumerator
147  , global::System.Collections.Generic.IEnumerator<UtilInt64Vector>
148  {
149  private UtilInt64VectorVector collectionRef;
150  private int currentIndex;
151  private object currentObject;
152  private int currentSize;
153 
155  collectionRef = collection;
156  currentIndex = -1;
157  currentObject = null;
158  currentSize = collectionRef.Count;
159  }
160 
161  // Type-safe iterator Current
163  get {
164  if (currentIndex == -1)
165  throw new global::System.InvalidOperationException("Enumeration not started.");
166  if (currentIndex > currentSize - 1)
167  throw new global::System.InvalidOperationException("Enumeration finished.");
168  if (currentObject == null)
169  throw new global::System.InvalidOperationException("Collection modified.");
170  return (UtilInt64Vector)currentObject;
171  }
172  }
173 
174  // Type-unsafe IEnumerator.Current
175  object global::System.Collections.IEnumerator.Current {
176  get {
177  return Current;
178  }
179  }
180 
181  public bool MoveNext() {
182  int size = collectionRef.Count;
183  bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
184  if (moveOkay) {
185  currentIndex++;
186  currentObject = collectionRef[currentIndex];
187  } else {
188  currentObject = null;
189  }
190  return moveOkay;
191  }
192 
193  public void Reset() {
194  currentIndex = -1;
195  currentObject = null;
196  if (collectionRef.Count != currentSize) {
197  throw new global::System.InvalidOperationException("Collection modified.");
198  }
199  }
200 
201  public void Dispose() {
202  currentIndex = -1;
203  currentObject = null;
204  }
205  }
206 
207  public void Clear() {
209  }
210 
211  public void Add(UtilInt64Vector x) {
214  }
215 
216  private uint size() {
218  return ret;
219  }
220 
221  private uint capacity() {
222  uint ret = operations_research_utilPINVOKE.UtilInt64VectorVector_capacity(swigCPtr);
223  return ret;
224  }
225 
226  private void reserve(uint n) {
227  operations_research_utilPINVOKE.UtilInt64VectorVector_reserve(swigCPtr, n);
228  }
229 
230  public UtilInt64VectorVector() : this(operations_research_utilPINVOKE.new_UtilInt64VectorVector__SWIG_0(), true) {
231  }
232 
233  public UtilInt64VectorVector(UtilInt64VectorVector other) : this(operations_research_utilPINVOKE.new_UtilInt64VectorVector__SWIG_1(UtilInt64VectorVector.getCPtr(other)), true) {
235  }
236 
237  public UtilInt64VectorVector(int capacity) : this(operations_research_utilPINVOKE.new_UtilInt64VectorVector__SWIG_2(capacity), true) {
239  }
240 
241  private UtilInt64Vector getitemcopy(int index) {
244  return ret;
245  }
246 
247  private UtilInt64Vector getitem(int index) {
248  UtilInt64Vector ret = new UtilInt64Vector(operations_research_utilPINVOKE.UtilInt64VectorVector_getitem(swigCPtr, index), false);
249  if (operations_research_utilPINVOKE.SWIGPendingException.Pending) throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
250  return ret;
251  }
252 
253  private void setitem(int index, UtilInt64Vector val) {
254  operations_research_utilPINVOKE.UtilInt64VectorVector_setitem(swigCPtr, index, UtilInt64Vector.getCPtr(val));
255  if (operations_research_utilPINVOKE.SWIGPendingException.Pending) throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
256  }
257 
258  public void AddRange(UtilInt64VectorVector values) {
261  }
262 
263  public UtilInt64VectorVector GetRange(int index, int count) {
264  global::System.IntPtr cPtr = operations_research_utilPINVOKE.UtilInt64VectorVector_GetRange(swigCPtr, index, count);
265  UtilInt64VectorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new UtilInt64VectorVector(cPtr, true);
267  return ret;
268  }
269 
270  public void Insert(int index, UtilInt64Vector x) {
273  }
274 
275  public void InsertRange(int index, UtilInt64VectorVector values) {
278  }
279 
280  public void RemoveAt(int index) {
283  }
284 
285  public void RemoveRange(int index, int count) {
288  }
289 
290  public static UtilInt64VectorVector Repeat(UtilInt64Vector value, int count) {
291  global::System.IntPtr cPtr = operations_research_utilPINVOKE.UtilInt64VectorVector_Repeat(UtilInt64Vector.getCPtr(value), count);
292  UtilInt64VectorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new UtilInt64VectorVector(cPtr, true);
294  return ret;
295  }
296 
297  public void Reverse() {
299  }
300 
301  public void Reverse(int index, int count) {
304  }
305 
306  public void SetRange(int index, UtilInt64VectorVector values) {
309  }
310 
311 }
312 
313 }
UtilInt64VectorVector(UtilInt64VectorVector other)
static uint UtilInt64VectorVector_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void UtilInt64VectorVector_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
bool IsFixedSize
UtilInt64VectorVectorEnumerator(UtilInt64VectorVector collection)
UtilInt64VectorVector GetRange(int index, int count)
void Add(UtilInt64Vector x)
Note that the IEnumerator documentation requires an InvalidOperationException to be thrown whenever t...
static void UtilInt64VectorVector_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
void Reverse(int index, int count)
static global::System.IntPtr UtilInt64VectorVector_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
UtilInt64VectorVector(global::System.Collections.ICollection c)
int Capacity
static void UtilInt64VectorVector_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
void CopyTo(UtilInt64Vector[] array)
static void UtilInt64VectorVector_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void InsertRange(int index, UtilInt64VectorVector values)
static void UtilInt64VectorVector_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
void Insert(int index, UtilInt64Vector x)
static global::System.IntPtr UtilInt64VectorVector_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool Pending
UtilInt64Vector Current
static void UtilInt64VectorVector_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr UtilInt64VectorVector_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
bool swigCMemOwn
bool IsSynchronized
void Clear()
UtilInt64VectorVector(int capacity)
void CopyTo(UtilInt64Vector[] array, int arrayIndex)
static global::System.Exception Retrieve()
static UtilInt64VectorVector Repeat(UtilInt64Vector value, int count)
void Reset()
bool IsReadOnly
void CopyTo(int index, UtilInt64Vector[] array, int arrayIndex, int count)
void RemoveRange(int index, int count)
static void UtilInt64VectorVector_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetRange(int index, UtilInt64VectorVector values)
static void delete_UtilInt64VectorVector(global::System.Runtime.InteropServices.HandleRef jarg1)
void RemoveAt(int index)
UtilInt64VectorVector()
UtilInt64VectorVectorEnumerator GetEnumerator()
static void UtilInt64VectorVector_AddRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
int Count
Definition: util/Domain.cs:11
static void UtilInt64VectorVector_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
void Reverse()
static void UtilInt64VectorVector_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
virtual void Dispose()
bool MoveNext()
void AddRange(UtilInt64VectorVector values)
void Dispose()