RakNetBPlusTreeRow.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 RakNetBPlusTreeRow : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal RakNetBPlusTreeRow(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(RakNetBPlusTreeRow obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~RakNetBPlusTreeRow() {
  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_RakNetBPlusTreeRow(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public RakNetBPlusTreeRow() : this(RakNetPINVOKE.new_RakNetBPlusTreeRow(), true) {
  37. }
  38. public void SetPoolPageSize(int size) {
  39. RakNetPINVOKE.RakNetBPlusTreeRow_SetPoolPageSize(swigCPtr, size);
  40. }
  41. public bool Insert(uint key, Row data) {
  42. bool ret = RakNetPINVOKE.RakNetBPlusTreeRow_Insert(swigCPtr, key, Row.getCPtr(data));
  43. return ret;
  44. }
  45. public void Clear() {
  46. RakNetPINVOKE.RakNetBPlusTreeRow_Clear(swigCPtr);
  47. }
  48. public uint Size() {
  49. uint ret = RakNetPINVOKE.RakNetBPlusTreeRow_Size(swigCPtr);
  50. return ret;
  51. }
  52. public bool IsEmpty() {
  53. bool ret = RakNetPINVOKE.RakNetBPlusTreeRow_IsEmpty(swigCPtr);
  54. return ret;
  55. }
  56. public RakNetPageRow GetListHead() {
  57. IntPtr cPtr = RakNetPINVOKE.RakNetBPlusTreeRow_GetListHead(swigCPtr);
  58. RakNetPageRow ret = (cPtr == IntPtr.Zero) ? null : new RakNetPageRow(cPtr, false);
  59. return ret;
  60. }
  61. public Row GetDataHead() {
  62. IntPtr cPtr = RakNetPINVOKE.RakNetBPlusTreeRow_GetDataHead(swigCPtr);
  63. Row ret = (cPtr == IntPtr.Zero) ? null : new Row(cPtr, false);
  64. return ret;
  65. }
  66. public void PrintLeaves() {
  67. RakNetPINVOKE.RakNetBPlusTreeRow_PrintLeaves(swigCPtr);
  68. }
  69. public void PrintGraph() {
  70. RakNetPINVOKE.RakNetBPlusTreeRow_PrintGraph(swigCPtr);
  71. }
  72. }
  73. }
粤ICP备19079148号