You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

349 lines
10 KiB

  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.8
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. using System;
  9. using System.Runtime.InteropServices;
  10. public class aiFaceVector : IDisposable, System.Collections.IEnumerable
  11. #if !SWIG_DOTNET_1
  12. , System.Collections.Generic.IList<aiFace>
  13. #endif
  14. {
  15. private HandleRef swigCPtr;
  16. protected bool swigCMemOwn;
  17. internal aiFaceVector(IntPtr cPtr, bool cMemoryOwn) {
  18. swigCMemOwn = cMemoryOwn;
  19. swigCPtr = new HandleRef(this, cPtr);
  20. }
  21. internal static HandleRef getCPtr(aiFaceVector obj) {
  22. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  23. }
  24. ~aiFaceVector() {
  25. Dispose();
  26. }
  27. public virtual void Dispose() {
  28. lock(this) {
  29. if (swigCPtr.Handle != IntPtr.Zero) {
  30. if (swigCMemOwn) {
  31. swigCMemOwn = false;
  32. AssimpPINVOKE.delete_aiFaceVector(swigCPtr);
  33. }
  34. swigCPtr = new HandleRef(null, IntPtr.Zero);
  35. }
  36. GC.SuppressFinalize(this);
  37. }
  38. }
  39. public aiFaceVector(System.Collections.ICollection c) : this() {
  40. if (c == null)
  41. throw new ArgumentNullException("c");
  42. foreach (aiFace element in c) {
  43. this.Add(element);
  44. }
  45. }
  46. public bool IsFixedSize {
  47. get {
  48. return false;
  49. }
  50. }
  51. public bool IsReadOnly {
  52. get {
  53. return false;
  54. }
  55. }
  56. public aiFace this[int index] {
  57. get {
  58. return getitem(index);
  59. }
  60. set {
  61. setitem(index, value);
  62. }
  63. }
  64. public int Capacity {
  65. get {
  66. return (int)capacity();
  67. }
  68. set {
  69. if (value < size())
  70. throw new ArgumentOutOfRangeException("Capacity");
  71. reserve((uint)value);
  72. }
  73. }
  74. public int Count {
  75. get {
  76. return (int)size();
  77. }
  78. }
  79. public bool IsSynchronized {
  80. get {
  81. return false;
  82. }
  83. }
  84. #if SWIG_DOTNET_1
  85. public void CopyTo(System.Array array)
  86. #else
  87. public void CopyTo(aiFace[] array)
  88. #endif
  89. {
  90. CopyTo(0, array, 0, this.Count);
  91. }
  92. #if SWIG_DOTNET_1
  93. public void CopyTo(System.Array array, int arrayIndex)
  94. #else
  95. public void CopyTo(aiFace[] array, int arrayIndex)
  96. #endif
  97. {
  98. CopyTo(0, array, arrayIndex, this.Count);
  99. }
  100. #if SWIG_DOTNET_1
  101. public void CopyTo(int index, System.Array array, int arrayIndex, int count)
  102. #else
  103. public void CopyTo(int index, aiFace[] array, int arrayIndex, int count)
  104. #endif
  105. {
  106. if (array == null)
  107. throw new ArgumentNullException("array");
  108. if (index < 0)
  109. throw new ArgumentOutOfRangeException("index", "Value is less than zero");
  110. if (arrayIndex < 0)
  111. throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
  112. if (count < 0)
  113. throw new ArgumentOutOfRangeException("count", "Value is less than zero");
  114. if (array.Rank > 1)
  115. throw new ArgumentException("Multi dimensional array.", "array");
  116. if (index+count > this.Count || arrayIndex+count > array.Length)
  117. throw new ArgumentException("Number of elements to copy is too large.");
  118. for (int i=0; i<count; i++)
  119. array.SetValue(getitemcopy(index+i), arrayIndex+i);
  120. }
  121. #if !SWIG_DOTNET_1
  122. System.Collections.Generic.IEnumerator<aiFace> System.Collections.Generic.IEnumerable<aiFace>.GetEnumerator() {
  123. return new aiFaceVectorEnumerator(this);
  124. }
  125. #endif
  126. System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
  127. return new aiFaceVectorEnumerator(this);
  128. }
  129. public aiFaceVectorEnumerator GetEnumerator() {
  130. return new aiFaceVectorEnumerator(this);
  131. }
  132. // Type-safe enumerator
  133. /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
  134. /// whenever the collection is modified. This has been done for changes in the size of the
  135. /// collection but not when one of the elements of the collection is modified as it is a bit
  136. /// tricky to detect unmanaged code that modifies the collection under our feet.
  137. public sealed class aiFaceVectorEnumerator : System.Collections.IEnumerator
  138. #if !SWIG_DOTNET_1
  139. , System.Collections.Generic.IEnumerator<aiFace>
  140. #endif
  141. {
  142. private aiFaceVector collectionRef;
  143. private int currentIndex;
  144. private object currentObject;
  145. private int currentSize;
  146. public aiFaceVectorEnumerator(aiFaceVector collection) {
  147. collectionRef = collection;
  148. currentIndex = -1;
  149. currentObject = null;
  150. currentSize = collectionRef.Count;
  151. }
  152. // Type-safe iterator Current
  153. public aiFace Current {
  154. get {
  155. if (currentIndex == -1)
  156. throw new InvalidOperationException("Enumeration not started.");
  157. if (currentIndex > currentSize - 1)
  158. throw new InvalidOperationException("Enumeration finished.");
  159. if (currentObject == null)
  160. throw new InvalidOperationException("Collection modified.");
  161. return (aiFace)currentObject;
  162. }
  163. }
  164. // Type-unsafe IEnumerator.Current
  165. object System.Collections.IEnumerator.Current {
  166. get {
  167. return Current;
  168. }
  169. }
  170. public bool MoveNext() {
  171. int size = collectionRef.Count;
  172. bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
  173. if (moveOkay) {
  174. currentIndex++;
  175. currentObject = collectionRef[currentIndex];
  176. } else {
  177. currentObject = null;
  178. }
  179. return moveOkay;
  180. }
  181. public void Reset() {
  182. currentIndex = -1;
  183. currentObject = null;
  184. if (collectionRef.Count != currentSize) {
  185. throw new InvalidOperationException("Collection modified.");
  186. }
  187. }
  188. #if !SWIG_DOTNET_1
  189. public void Dispose() {
  190. currentIndex = -1;
  191. currentObject = null;
  192. }
  193. #endif
  194. }
  195. public void Clear() {
  196. AssimpPINVOKE.aiFaceVector_Clear(swigCPtr);
  197. }
  198. public void Add(aiFace x) {
  199. AssimpPINVOKE.aiFaceVector_Add(swigCPtr, aiFace.getCPtr(x));
  200. }
  201. private uint size() {
  202. uint ret = AssimpPINVOKE.aiFaceVector_size(swigCPtr);
  203. return ret;
  204. }
  205. private uint capacity() {
  206. uint ret = AssimpPINVOKE.aiFaceVector_capacity(swigCPtr);
  207. return ret;
  208. }
  209. private void reserve(uint n) {
  210. AssimpPINVOKE.aiFaceVector_reserve(swigCPtr, n);
  211. }
  212. public aiFaceVector() : this(AssimpPINVOKE.new_aiFaceVector__SWIG_0(), true) {
  213. }
  214. public aiFaceVector(aiFaceVector other) : this(AssimpPINVOKE.new_aiFaceVector__SWIG_1(aiFaceVector.getCPtr(other)), true) {
  215. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  216. }
  217. public aiFaceVector(int capacity) : this(AssimpPINVOKE.new_aiFaceVector__SWIG_2(capacity), true) {
  218. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  219. }
  220. private aiFace getitemcopy(int index) {
  221. IntPtr cPtr = AssimpPINVOKE.aiFaceVector_getitemcopy(swigCPtr, index);
  222. aiFace ret = (cPtr == IntPtr.Zero) ? null : new aiFace(cPtr, false);
  223. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  224. return ret;
  225. }
  226. private aiFace getitem(int index) {
  227. IntPtr cPtr = AssimpPINVOKE.aiFaceVector_getitem(swigCPtr, index);
  228. aiFace ret = (cPtr == IntPtr.Zero) ? null : new aiFace(cPtr, false);
  229. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  230. return ret;
  231. }
  232. private void setitem(int index, aiFace val) {
  233. AssimpPINVOKE.aiFaceVector_setitem(swigCPtr, index, aiFace.getCPtr(val));
  234. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  235. }
  236. public void AddRange(aiFaceVector values) {
  237. AssimpPINVOKE.aiFaceVector_AddRange(swigCPtr, aiFaceVector.getCPtr(values));
  238. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  239. }
  240. public aiFaceVector GetRange(int index, int count) {
  241. IntPtr cPtr = AssimpPINVOKE.aiFaceVector_GetRange(swigCPtr, index, count);
  242. aiFaceVector ret = (cPtr == IntPtr.Zero) ? null : new aiFaceVector(cPtr, true);
  243. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  244. return ret;
  245. }
  246. public void Insert(int index, aiFace x) {
  247. AssimpPINVOKE.aiFaceVector_Insert(swigCPtr, index, aiFace.getCPtr(x));
  248. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  249. }
  250. public void InsertRange(int index, aiFaceVector values) {
  251. AssimpPINVOKE.aiFaceVector_InsertRange(swigCPtr, index, aiFaceVector.getCPtr(values));
  252. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  253. }
  254. public void RemoveAt(int index) {
  255. AssimpPINVOKE.aiFaceVector_RemoveAt(swigCPtr, index);
  256. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  257. }
  258. public void RemoveRange(int index, int count) {
  259. AssimpPINVOKE.aiFaceVector_RemoveRange(swigCPtr, index, count);
  260. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  261. }
  262. public static aiFaceVector Repeat(aiFace value, int count) {
  263. IntPtr cPtr = AssimpPINVOKE.aiFaceVector_Repeat(aiFace.getCPtr(value), count);
  264. aiFaceVector ret = (cPtr == IntPtr.Zero) ? null : new aiFaceVector(cPtr, true);
  265. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  266. return ret;
  267. }
  268. public void Reverse() {
  269. AssimpPINVOKE.aiFaceVector_Reverse__SWIG_0(swigCPtr);
  270. }
  271. public void Reverse(int index, int count) {
  272. AssimpPINVOKE.aiFaceVector_Reverse__SWIG_1(swigCPtr, index, count);
  273. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  274. }
  275. public void SetRange(int index, aiFaceVector values) {
  276. AssimpPINVOKE.aiFaceVector_SetRange(swigCPtr, index, aiFaceVector.getCPtr(values));
  277. if (AssimpPINVOKE.SWIGPendingException.Pending) throw AssimpPINVOKE.SWIGPendingException.Retrieve();
  278. }
  279. public bool Contains(aiFace value) {
  280. bool ret = AssimpPINVOKE.aiFaceVector_Contains(swigCPtr, aiFace.getCPtr(value));
  281. return ret;
  282. }
  283. public int IndexOf(aiFace value) {
  284. int ret = AssimpPINVOKE.aiFaceVector_IndexOf(swigCPtr, aiFace.getCPtr(value));
  285. return ret;
  286. }
  287. public int LastIndexOf(aiFace value) {
  288. int ret = AssimpPINVOKE.aiFaceVector_LastIndexOf(swigCPtr, aiFace.getCPtr(value));
  289. return ret;
  290. }
  291. public bool Remove(aiFace value) {
  292. bool ret = AssimpPINVOKE.aiFaceVector_Remove(swigCPtr, aiFace.getCPtr(value));
  293. return ret;
  294. }
  295. }