//------------------------------------------------------------------------------ // // // This file was automatically generated by SWIG (http://www.swig.org). // Version 3.0.10 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ namespace Dali { public class ItemIdContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IList { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; internal ItemIdContainer(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(ItemIdContainer obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~ItemIdContainer() { DisposeQueue.Instance.Add(this); } public virtual void Dispose() { if (!Stage.IsInstalled()) { DisposeQueue.Instance.Add(this); return; } lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_ItemIdContainer(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); } } public ItemIdContainer(global::System.Collections.ICollection c) : this() { if (c == null) throw new global::System.ArgumentNullException("c"); foreach (uint element in c) { this.Add(element); } } public bool IsFixedSize { get { return false; } } public bool IsReadOnly { get { return false; } } public uint 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(uint[] array) { CopyTo(0, array, 0, this.Count); } public void CopyTo(uint[] array, int arrayIndex) { CopyTo(0, array, arrayIndex, this.Count); } public void CopyTo(int index, uint[] 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 global::System.Collections.Generic.IEnumerable.GetEnumerator() { return new ItemIdContainerEnumerator(this); } global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return new ItemIdContainerEnumerator(this); } public ItemIdContainerEnumerator GetEnumerator() { return new ItemIdContainerEnumerator(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 ItemIdContainerEnumerator : global::System.Collections.IEnumerator , global::System.Collections.Generic.IEnumerator { private ItemIdContainer collectionRef; private int currentIndex; private object currentObject; private int currentSize; public ItemIdContainerEnumerator(ItemIdContainer collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; } // Type-safe iterator Current public uint 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 (uint)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() { NDalicPINVOKE.ItemIdContainer_Clear(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void Add(uint x) { NDalicPINVOKE.ItemIdContainer_Add(swigCPtr, x); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } private uint size() { uint ret = NDalicPINVOKE.ItemIdContainer_size(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private uint capacity() { uint ret = NDalicPINVOKE.ItemIdContainer_capacity(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private void reserve(uint n) { NDalicPINVOKE.ItemIdContainer_reserve(swigCPtr, n); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ItemIdContainer() : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ItemIdContainer(ItemIdContainer other) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_1(ItemIdContainer.getCPtr(other)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ItemIdContainer(int capacity) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_2(capacity), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } private uint getitemcopy(int index) { uint ret = NDalicPINVOKE.ItemIdContainer_getitemcopy(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private uint getitem(int index) { uint ret = NDalicPINVOKE.ItemIdContainer_getitem(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private void setitem(int index, uint val) { NDalicPINVOKE.ItemIdContainer_setitem(swigCPtr, index, val); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void AddRange(ItemIdContainer values) { NDalicPINVOKE.ItemIdContainer_AddRange(swigCPtr, ItemIdContainer.getCPtr(values)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ItemIdContainer GetRange(int index, int count) { global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_GetRange(swigCPtr, index, count); ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Insert(int index, uint x) { NDalicPINVOKE.ItemIdContainer_Insert(swigCPtr, index, x); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void InsertRange(int index, ItemIdContainer values) { NDalicPINVOKE.ItemIdContainer_InsertRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveAt(int index) { NDalicPINVOKE.ItemIdContainer_RemoveAt(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void RemoveRange(int index, int count) { NDalicPINVOKE.ItemIdContainer_RemoveRange(swigCPtr, index, count); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public static ItemIdContainer Repeat(uint value, int count) { global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_Repeat(value, count); ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void Reverse() { NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_0(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void Reverse(int index, int count) { NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_1(swigCPtr, index, count); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void SetRange(int index, ItemIdContainer values) { NDalicPINVOKE.ItemIdContainer_SetRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public bool Contains(uint value) { bool ret = NDalicPINVOKE.ItemIdContainer_Contains(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public int IndexOf(uint value) { int ret = NDalicPINVOKE.ItemIdContainer_IndexOf(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public int LastIndexOf(uint value) { int ret = NDalicPINVOKE.ItemIdContainer_LastIndexOf(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public bool Remove(uint value) { bool ret = NDalicPINVOKE.ItemIdContainer_Remove(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }