RakNetListCellPointer.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 RakNetListCellPointer : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal RakNetListCellPointer(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(RakNetListCellPointer obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~RakNetListCellPointer() {
  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_RakNetListCellPointer(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public Cell this[int index]
  37. {
  38. get
  39. {
  40. return Get((uint)index); // use indexto retrieve and return another value.
  41. }
  42. set
  43. {
  44. Replace(value, value, (uint)index, "Not used", 0);// use index and value to set the value somewhere.
  45. }
  46. }
  47. public Cell Get(uint position)
  48. {
  49. return GetHelper(position);
  50. }
  51. public Cell Pop()
  52. {
  53. return PopHelper();
  54. }
  55. public RakNetListCellPointer() : this(RakNetPINVOKE.new_RakNetListCellPointer__SWIG_0(), true) {
  56. }
  57. public RakNetListCellPointer(RakNetListCellPointer original_copy) : this(RakNetPINVOKE.new_RakNetListCellPointer__SWIG_1(RakNetListCellPointer.getCPtr(original_copy)), true) {
  58. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  59. }
  60. public RakNetListCellPointer CopyData(RakNetListCellPointer original_copy) {
  61. RakNetListCellPointer ret = new RakNetListCellPointer(RakNetPINVOKE.RakNetListCellPointer_CopyData(swigCPtr, RakNetListCellPointer.getCPtr(original_copy)), false);
  62. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  63. return ret;
  64. }
  65. public void Push(Cell input, string file, uint line) {
  66. RakNetPINVOKE.RakNetListCellPointer_Push(swigCPtr, Cell.getCPtr(input), file, line);
  67. }
  68. public void Insert(Cell input, uint position, string file, uint line) {
  69. RakNetPINVOKE.RakNetListCellPointer_Insert__SWIG_0(swigCPtr, Cell.getCPtr(input), position, file, line);
  70. }
  71. public void Insert(Cell input, string file, uint line) {
  72. RakNetPINVOKE.RakNetListCellPointer_Insert__SWIG_1(swigCPtr, Cell.getCPtr(input), file, line);
  73. }
  74. public void Replace(Cell input, Cell filler, uint position, string file, uint line) {
  75. RakNetPINVOKE.RakNetListCellPointer_Replace__SWIG_0(swigCPtr, Cell.getCPtr(input), Cell.getCPtr(filler), position, file, line);
  76. }
  77. public void Replace(Cell input) {
  78. RakNetPINVOKE.RakNetListCellPointer_Replace__SWIG_1(swigCPtr, Cell.getCPtr(input));
  79. }
  80. public void RemoveAtIndex(uint position) {
  81. RakNetPINVOKE.RakNetListCellPointer_RemoveAtIndex(swigCPtr, position);
  82. }
  83. public void RemoveAtIndexFast(uint position) {
  84. RakNetPINVOKE.RakNetListCellPointer_RemoveAtIndexFast(swigCPtr, position);
  85. }
  86. public void RemoveFromEnd(uint num) {
  87. RakNetPINVOKE.RakNetListCellPointer_RemoveFromEnd__SWIG_0(swigCPtr, num);
  88. }
  89. public void RemoveFromEnd() {
  90. RakNetPINVOKE.RakNetListCellPointer_RemoveFromEnd__SWIG_1(swigCPtr);
  91. }
  92. public uint GetIndexOf(Cell input) {
  93. uint ret = RakNetPINVOKE.RakNetListCellPointer_GetIndexOf(swigCPtr, Cell.getCPtr(input));
  94. return ret;
  95. }
  96. public uint Size() {
  97. uint ret = RakNetPINVOKE.RakNetListCellPointer_Size(swigCPtr);
  98. return ret;
  99. }
  100. public void Clear(bool doNotDeallocateSmallBlocks, string file, uint line) {
  101. RakNetPINVOKE.RakNetListCellPointer_Clear(swigCPtr, doNotDeallocateSmallBlocks, file, line);
  102. }
  103. public void Preallocate(uint countNeeded, string file, uint line) {
  104. RakNetPINVOKE.RakNetListCellPointer_Preallocate(swigCPtr, countNeeded, file, line);
  105. }
  106. public void Compress(string file, uint line) {
  107. RakNetPINVOKE.RakNetListCellPointer_Compress(swigCPtr, file, line);
  108. }
  109. public Cell GetHelper(uint position) {
  110. IntPtr cPtr = RakNetPINVOKE.RakNetListCellPointer_GetHelper(swigCPtr, position);
  111. Cell ret = (cPtr == IntPtr.Zero) ? null : new Cell(cPtr, false);
  112. return ret;
  113. }
  114. public Cell PopHelper() {
  115. IntPtr cPtr = RakNetPINVOKE.RakNetListCellPointer_PopHelper(swigCPtr);
  116. Cell ret = (cPtr == IntPtr.Zero) ? null : new Cell(cPtr, false);
  117. return ret;
  118. }
  119. }
  120. }
粤ICP备19079148号