RakNetListSystemAddress.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 RakNetListSystemAddress : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal RakNetListSystemAddress(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(RakNetListSystemAddress obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~RakNetListSystemAddress() {
  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_RakNetListSystemAddress(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public SystemAddress 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 RakNetListSystemAddress() : this(RakNetPINVOKE.new_RakNetListSystemAddress__SWIG_0(), true) {
  48. }
  49. public RakNetListSystemAddress(RakNetListSystemAddress original_copy) : this(RakNetPINVOKE.new_RakNetListSystemAddress__SWIG_1(RakNetListSystemAddress.getCPtr(original_copy)), true) {
  50. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  51. }
  52. public RakNetListSystemAddress CopyData(RakNetListSystemAddress original_copy) {
  53. RakNetListSystemAddress ret = new RakNetListSystemAddress(RakNetPINVOKE.RakNetListSystemAddress_CopyData(swigCPtr, RakNetListSystemAddress.getCPtr(original_copy)), false);
  54. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  55. return ret;
  56. }
  57. public SystemAddress Get(uint position) {
  58. SystemAddress ret = new SystemAddress(RakNetPINVOKE.RakNetListSystemAddress_Get(swigCPtr, position), false);
  59. return ret;
  60. }
  61. public void Push(SystemAddress input, string file, uint line) {
  62. RakNetPINVOKE.RakNetListSystemAddress_Push(swigCPtr, SystemAddress.getCPtr(input), file, line);
  63. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  64. }
  65. public SystemAddress Pop() {
  66. SystemAddress ret = new SystemAddress(RakNetPINVOKE.RakNetListSystemAddress_Pop(swigCPtr), false);
  67. return ret;
  68. }
  69. public void Insert(SystemAddress input, uint position, string file, uint line) {
  70. RakNetPINVOKE.RakNetListSystemAddress_Insert__SWIG_0(swigCPtr, SystemAddress.getCPtr(input), position, file, line);
  71. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  72. }
  73. public void Insert(SystemAddress input, string file, uint line) {
  74. RakNetPINVOKE.RakNetListSystemAddress_Insert__SWIG_1(swigCPtr, SystemAddress.getCPtr(input), file, line);
  75. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  76. }
  77. public void Replace(SystemAddress input, SystemAddress filler, uint position, string file, uint line) {
  78. RakNetPINVOKE.RakNetListSystemAddress_Replace__SWIG_0(swigCPtr, SystemAddress.getCPtr(input), SystemAddress.getCPtr(filler), position, file, line);
  79. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  80. }
  81. public void Replace(SystemAddress input) {
  82. RakNetPINVOKE.RakNetListSystemAddress_Replace__SWIG_1(swigCPtr, SystemAddress.getCPtr(input));
  83. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  84. }
  85. public void RemoveAtIndex(uint position) {
  86. RakNetPINVOKE.RakNetListSystemAddress_RemoveAtIndex(swigCPtr, position);
  87. }
  88. public void RemoveAtIndexFast(uint position) {
  89. RakNetPINVOKE.RakNetListSystemAddress_RemoveAtIndexFast(swigCPtr, position);
  90. }
  91. public void RemoveFromEnd(uint num) {
  92. RakNetPINVOKE.RakNetListSystemAddress_RemoveFromEnd__SWIG_0(swigCPtr, num);
  93. }
  94. public void RemoveFromEnd() {
  95. RakNetPINVOKE.RakNetListSystemAddress_RemoveFromEnd__SWIG_1(swigCPtr);
  96. }
  97. public uint GetIndexOf(SystemAddress input) {
  98. uint ret = RakNetPINVOKE.RakNetListSystemAddress_GetIndexOf(swigCPtr, SystemAddress.getCPtr(input));
  99. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  100. return ret;
  101. }
  102. public uint Size() {
  103. uint ret = RakNetPINVOKE.RakNetListSystemAddress_Size(swigCPtr);
  104. return ret;
  105. }
  106. public void Clear(bool doNotDeallocateSmallBlocks, string file, uint line) {
  107. RakNetPINVOKE.RakNetListSystemAddress_Clear(swigCPtr, doNotDeallocateSmallBlocks, file, line);
  108. }
  109. public void Preallocate(uint countNeeded, string file, uint line) {
  110. RakNetPINVOKE.RakNetListSystemAddress_Preallocate(swigCPtr, countNeeded, file, line);
  111. }
  112. public void Compress(string file, uint line) {
  113. RakNetPINVOKE.RakNetListSystemAddress_Compress(swigCPtr, file, line);
  114. }
  115. }
  116. }
粤ICP备19079148号