introvoyz041's picture
Migrated from GitHub
b1b3bae verified
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.1
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class VectorOfStringVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<StringVector>
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal VectorOfStringVector(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorOfStringVector obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~VectorOfStringVector() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
CoolPropPINVOKE.delete_VectorOfStringVector(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public VectorOfStringVector(global::System.Collections.IEnumerable c) : this() {
if (c == null)
throw new global::System.ArgumentNullException("c");
foreach (StringVector element in c) {
this.Add(element);
}
}
public VectorOfStringVector(global::System.Collections.Generic.IEnumerable<StringVector> c) : this() {
if (c == null)
throw new global::System.ArgumentNullException("c");
foreach (StringVector element in c) {
this.Add(element);
}
}
public bool IsFixedSize {
get {
return false;
}
}
public bool IsReadOnly {
get {
return false;
}
}
public StringVector this[int index] {
get {
return getitem(index);
}
set {
setitem(index, value);
}
}
public int Capacity {
get {
return (int)capacity();
}
set {
if (value < size())
throw new global::System.ArgumentOutOfRangeException("Capacity");
reserve((uint)value);
}
}
public int Count {
get {
return (int)size();
}
}
public bool IsSynchronized {
get {
return false;
}
}
public void CopyTo(StringVector[] array)
{
CopyTo(0, array, 0, this.Count);
}
public void CopyTo(StringVector[] array, int arrayIndex)
{
CopyTo(0, array, arrayIndex, this.Count);
}
public void CopyTo(int index, StringVector[] array, int arrayIndex, int count)
{
if (array == null)
throw new global::System.ArgumentNullException("array");
if (index < 0)
throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
if (arrayIndex < 0)
throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (count < 0)
throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
if (array.Rank > 1)
throw new global::System.ArgumentException("Multi dimensional array.", "array");
if (index+count > this.Count || arrayIndex+count > array.Length)
throw new global::System.ArgumentException("Number of elements to copy is too large.");
for (int i=0; i<count; i++)
array.SetValue(getitemcopy(index+i), arrayIndex+i);
}
public StringVector[] ToArray() {
StringVector[] array = new StringVector[this.Count];
this.CopyTo(array);
return array;
}
global::System.Collections.Generic.IEnumerator<StringVector> global::System.Collections.Generic.IEnumerable<StringVector>.GetEnumerator() {
return new VectorOfStringVectorEnumerator(this);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
return new VectorOfStringVectorEnumerator(this);
}
public VectorOfStringVectorEnumerator GetEnumerator() {
return new VectorOfStringVectorEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class VectorOfStringVectorEnumerator : global::System.Collections.IEnumerator
, global::System.Collections.Generic.IEnumerator<StringVector>
{
private VectorOfStringVector collectionRef;
private int currentIndex;
private object currentObject;
private int currentSize;
public VectorOfStringVectorEnumerator(VectorOfStringVector collection) {
collectionRef = collection;
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public StringVector Current {
get {
if (currentIndex == -1)
throw new global::System.InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new global::System.InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new global::System.InvalidOperationException("Collection modified.");
return (StringVector)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object global::System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
currentObject = collectionRef[currentIndex];
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new global::System.InvalidOperationException("Collection modified.");
}
}
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
}
public void Clear() {
CoolPropPINVOKE.VectorOfStringVector_Clear(swigCPtr);
}
public void Add(StringVector x) {
CoolPropPINVOKE.VectorOfStringVector_Add(swigCPtr, StringVector.getCPtr(x));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
private uint size() {
uint ret = CoolPropPINVOKE.VectorOfStringVector_size(swigCPtr);
return ret;
}
private uint capacity() {
uint ret = CoolPropPINVOKE.VectorOfStringVector_capacity(swigCPtr);
return ret;
}
private void reserve(uint n) {
CoolPropPINVOKE.VectorOfStringVector_reserve(swigCPtr, n);
}
public VectorOfStringVector() : this(CoolPropPINVOKE.new_VectorOfStringVector__SWIG_0(), true) {
}
public VectorOfStringVector(VectorOfStringVector other) : this(CoolPropPINVOKE.new_VectorOfStringVector__SWIG_1(VectorOfStringVector.getCPtr(other)), true) {
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public VectorOfStringVector(int capacity) : this(CoolPropPINVOKE.new_VectorOfStringVector__SWIG_2(capacity), true) {
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
private StringVector getitemcopy(int index) {
StringVector ret = new StringVector(CoolPropPINVOKE.VectorOfStringVector_getitemcopy(swigCPtr, index), true);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private StringVector getitem(int index) {
StringVector ret = new StringVector(CoolPropPINVOKE.VectorOfStringVector_getitem(swigCPtr, index), false);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(int index, StringVector val) {
CoolPropPINVOKE.VectorOfStringVector_setitem(swigCPtr, index, StringVector.getCPtr(val));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public void AddRange(VectorOfStringVector values) {
CoolPropPINVOKE.VectorOfStringVector_AddRange(swigCPtr, VectorOfStringVector.getCPtr(values));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public VectorOfStringVector GetRange(int index, int count) {
global::System.IntPtr cPtr = CoolPropPINVOKE.VectorOfStringVector_GetRange(swigCPtr, index, count);
VectorOfStringVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new VectorOfStringVector(cPtr, true);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Insert(int index, StringVector x) {
CoolPropPINVOKE.VectorOfStringVector_Insert(swigCPtr, index, StringVector.getCPtr(x));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public void InsertRange(int index, VectorOfStringVector values) {
CoolPropPINVOKE.VectorOfStringVector_InsertRange(swigCPtr, index, VectorOfStringVector.getCPtr(values));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveAt(int index) {
CoolPropPINVOKE.VectorOfStringVector_RemoveAt(swigCPtr, index);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveRange(int index, int count) {
CoolPropPINVOKE.VectorOfStringVector_RemoveRange(swigCPtr, index, count);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public static VectorOfStringVector Repeat(StringVector value, int count) {
global::System.IntPtr cPtr = CoolPropPINVOKE.VectorOfStringVector_Repeat(StringVector.getCPtr(value), count);
VectorOfStringVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new VectorOfStringVector(cPtr, true);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Reverse() {
CoolPropPINVOKE.VectorOfStringVector_Reverse__SWIG_0(swigCPtr);
}
public void Reverse(int index, int count) {
CoolPropPINVOKE.VectorOfStringVector_Reverse__SWIG_1(swigCPtr, index, count);
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
public void SetRange(int index, VectorOfStringVector values) {
CoolPropPINVOKE.VectorOfStringVector_SetRange(swigCPtr, index, VectorOfStringVector.getCPtr(values));
if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve();
}
}