Cell.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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 Cell : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal Cell(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(Cell obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~Cell() {
  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_Cell(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public void Get(out string output)
  37. {
  38. string temp=new String('c', (int) this.i);
  39. output=GetHelper(temp);
  40. }
  41. public Cell() : this(RakNetPINVOKE.new_Cell__SWIG_0(), true) {
  42. }
  43. public void Clear() {
  44. RakNetPINVOKE.Cell_Clear(swigCPtr);
  45. }
  46. public void Set(int input) {
  47. RakNetPINVOKE.Cell_Set__SWIG_0(swigCPtr, input);
  48. }
  49. public void Set(uint input) {
  50. RakNetPINVOKE.Cell_Set__SWIG_1(swigCPtr, input);
  51. }
  52. public void Set(double input) {
  53. RakNetPINVOKE.Cell_Set__SWIG_2(swigCPtr, input);
  54. }
  55. public void Set(string input) {
  56. RakNetPINVOKE.Cell_Set__SWIG_3(swigCPtr, input);
  57. }
  58. public void Get(out int output) {
  59. RakNetPINVOKE.Cell_Get__SWIG_0(swigCPtr, out output);
  60. }
  61. public void Get(out double output) {
  62. RakNetPINVOKE.Cell_Get__SWIG_1(swigCPtr, out output);
  63. }
  64. public RakString ToString(Table.ColumnType columnType) {
  65. RakString ret = new RakString(RakNetPINVOKE.Cell_ToString(swigCPtr, (int)columnType), true);
  66. return ret;
  67. }
  68. public Cell CopyData(Cell input) {
  69. Cell ret = new Cell(RakNetPINVOKE.Cell_CopyData(swigCPtr, Cell.getCPtr(input)), false);
  70. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  71. return ret;
  72. }
  73. public Cell(Cell input) : this(RakNetPINVOKE.new_Cell__SWIG_1(Cell.getCPtr(input)), true) {
  74. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  75. }
  76. public Table.ColumnType EstimateColumnType() {
  77. Table.ColumnType ret = (Table.ColumnType)RakNetPINVOKE.Cell_EstimateColumnType(swigCPtr);
  78. return ret;
  79. }
  80. public bool isEmpty {
  81. set {
  82. RakNetPINVOKE.Cell_isEmpty_set(swigCPtr, value);
  83. }
  84. get {
  85. bool ret = RakNetPINVOKE.Cell_isEmpty_get(swigCPtr);
  86. return ret;
  87. }
  88. }
  89. public double i {
  90. set {
  91. RakNetPINVOKE.Cell_i_set(swigCPtr, value);
  92. }
  93. get {
  94. double ret = RakNetPINVOKE.Cell_i_get(swigCPtr);
  95. return ret;
  96. }
  97. }
  98. public void Set(byte[] inByteArray, int inputLength) {
  99. RakNetPINVOKE.Cell_Set__SWIG_4(swigCPtr, inByteArray, inputLength);
  100. }
  101. public void Get(byte[] inOutByteArray, out int outputLength) {
  102. RakNetPINVOKE.Cell_Get__SWIG_2(swigCPtr, inOutByteArray, out outputLength);
  103. }
  104. private string GetHelper(string output) {
  105. string ret = RakNetPINVOKE.Cell_GetHelper(swigCPtr, output);
  106. return ret;
  107. }
  108. }
  109. }
粤ICP备19079148号