RakNetListUnsignedShort.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.1
  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. namespace RakNet {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class RakNetListUnsignedShort : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal RakNetListUnsignedShort(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(RakNetListUnsignedShort obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~RakNetListUnsignedShort() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. RakNetPINVOKE.delete_RakNetListUnsignedShort(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public ushort Get(uint position) {
  37. SWIGTYPE_p_unsigned_short ret = GetHelper(position);
  38. return UnsignedShortPointer.frompointer(ret).value();
  39. }
  40. public ushort Pop() {
  41. SWIGTYPE_p_unsigned_short ret = PopHelper();
  42. return UnsignedShortPointer.frompointer(ret).value();
  43. }
  44. public ushort this[int index]
  45. {
  46. get
  47. {
  48. return Get((uint)index); // use indexto retrieve and return another value.
  49. }
  50. set
  51. {
  52. Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
  53. }
  54. }
  55. public RakNetListUnsignedShort() : this(RakNetPINVOKE.new_RakNetListUnsignedShort__SWIG_0(), true) {
  56. }
  57. public RakNetListUnsignedShort(RakNetListUnsignedShort original_copy) : this(RakNetPINVOKE.new_RakNetListUnsignedShort__SWIG_1(RakNetListUnsignedShort.getCPtr(original_copy)), true) {
  58. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  59. }
  60. public RakNetListUnsignedShort CopyData(RakNetListUnsignedShort original_copy) {
  61. RakNetListUnsignedShort ret = new RakNetListUnsignedShort(RakNetPINVOKE.RakNetListUnsignedShort_CopyData(swigCPtr, RakNetListUnsignedShort.getCPtr(original_copy)), false);
  62. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  63. return ret;
  64. }
  65. private SWIGTYPE_p_unsigned_short GetHelper(uint position) {
  66. SWIGTYPE_p_unsigned_short ret = new SWIGTYPE_p_unsigned_short(RakNetPINVOKE.RakNetListUnsignedShort_GetHelper(swigCPtr, position), false);
  67. return ret;
  68. }
  69. public void Push(ushort input, string file, uint line) {
  70. RakNetPINVOKE.RakNetListUnsignedShort_Push(swigCPtr, input, file, line);
  71. }
  72. private SWIGTYPE_p_unsigned_short PopHelper() {
  73. SWIGTYPE_p_unsigned_short ret = new SWIGTYPE_p_unsigned_short(RakNetPINVOKE.RakNetListUnsignedShort_PopHelper(swigCPtr), false);
  74. return ret;
  75. }
  76. public void Insert(ushort input, uint position, string file, uint line) {
  77. RakNetPINVOKE.RakNetListUnsignedShort_Insert__SWIG_0(swigCPtr, input, position, file, line);
  78. }
  79. public void Insert(ushort input, string file, uint line) {
  80. RakNetPINVOKE.RakNetListUnsignedShort_Insert__SWIG_1(swigCPtr, input, file, line);
  81. }
  82. public void Replace(ushort input, ushort filler, uint position, string file, uint line) {
  83. RakNetPINVOKE.RakNetListUnsignedShort_Replace__SWIG_0(swigCPtr, input, filler, position, file, line);
  84. }
  85. public void Replace(ushort input) {
  86. RakNetPINVOKE.RakNetListUnsignedShort_Replace__SWIG_1(swigCPtr, input);
  87. }
  88. public void RemoveAtIndex(uint position) {
  89. RakNetPINVOKE.RakNetListUnsignedShort_RemoveAtIndex(swigCPtr, position);
  90. }
  91. public void RemoveAtIndexFast(uint position) {
  92. RakNetPINVOKE.RakNetListUnsignedShort_RemoveAtIndexFast(swigCPtr, position);
  93. }
  94. public void RemoveFromEnd(uint num) {
  95. RakNetPINVOKE.RakNetListUnsignedShort_RemoveFromEnd__SWIG_0(swigCPtr, num);
  96. }
  97. public void RemoveFromEnd() {
  98. RakNetPINVOKE.RakNetListUnsignedShort_RemoveFromEnd__SWIG_1(swigCPtr);
  99. }
  100. public uint GetIndexOf(ushort input) {
  101. uint ret = RakNetPINVOKE.RakNetListUnsignedShort_GetIndexOf(swigCPtr, input);
  102. return ret;
  103. }
  104. public uint Size() {
  105. uint ret = RakNetPINVOKE.RakNetListUnsignedShort_Size(swigCPtr);
  106. return ret;
  107. }
  108. public void Clear(bool doNotDeallocateSmallBlocks, string file, uint line) {
  109. RakNetPINVOKE.RakNetListUnsignedShort_Clear(swigCPtr, doNotDeallocateSmallBlocks, file, line);
  110. }
  111. public void Preallocate(uint countNeeded, string file, uint line) {
  112. RakNetPINVOKE.RakNetListUnsignedShort_Preallocate(swigCPtr, countNeeded, file, line);
  113. }
  114. public void Compress(string file, uint line) {
  115. RakNetPINVOKE.RakNetListUnsignedShort_Compress(swigCPtr, file, line);
  116. }
  117. }
  118. }
粤ICP备19079148号