| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- /* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.1
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
- namespace RakNet {
- using System;
- using System.Runtime.InteropServices;
- #pragma warning disable 0660
- public class RakNetGUID : IDisposable {
- private HandleRef swigCPtr;
- protected bool swigCMemOwn;
- internal RakNetGUID(IntPtr cPtr, bool cMemoryOwn) {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new HandleRef(this, cPtr);
- }
- internal static HandleRef getCPtr(RakNetGUID obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
- ~RakNetGUID() {
- Dispose();
- }
- public virtual void Dispose() {
- lock(this) {
- if (swigCPtr.Handle != IntPtr.Zero) {
- if (swigCMemOwn) {
- swigCMemOwn = false;
- RakNetPINVOKE.delete_RakNetGUID(swigCPtr);
- }
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
- GC.SuppressFinalize(this);
- }
- }
- public override int GetHashCode()
- {
- // return (int)(this.g%int.MaxValue);
- return (int) ToUint32(this);
- }
- public static bool operator ==(RakNetGUID a, RakNetGUID b)
- {
- // If both are null, or both are same instance, return true.
- if (System.Object.ReferenceEquals(a, b))
- {
- return true;
- }
- // If one is null, but not both, return false.
- if (((object)a == null) || ((object)b == null))
- {
- return false;
- }
- return a.Equals(b);//Equals should be overloaded as well
- }
- public static bool operator !=(RakNetGUID a, RakNetGUID b)
- {
- return a.OpNotEqual(b);
- }
- public static bool operator < (RakNetGUID a, RakNetGUID b)
- {
- return a.OpLess(b);
- }
- public static bool operator >(RakNetGUID a, RakNetGUID b)
- {
- return a.OpGreater(b);
- }
- public static bool operator <=(RakNetGUID a, RakNetGUID b)
- {
- return (a.OpLess(b) || a==b);
- }
- public static bool operator >=(RakNetGUID a, RakNetGUID b)
- {
- return (a.OpGreater(b) || a==b);
- }
- public void ToString(out string dest)
- {
- dest = ToString();
- }
- public RakNetGUID() : this(RakNetPINVOKE.new_RakNetGUID__SWIG_0(), true) {
- }
- public RakNetGUID(ulong _g) : this(RakNetPINVOKE.new_RakNetGUID__SWIG_1(_g), true) {
- }
- public ulong g {
- set {
- RakNetPINVOKE.RakNetGUID_g_set(swigCPtr, value);
- }
- get {
- ulong ret = RakNetPINVOKE.RakNetGUID_g_get(swigCPtr);
- return ret;
- }
- }
- public override string ToString() {
- string ret = RakNetPINVOKE.RakNetGUID_ToString(swigCPtr);
- return ret;
- }
- public bool FromString(string source) {
- bool ret = RakNetPINVOKE.RakNetGUID_FromString(swigCPtr, source);
- return ret;
- }
- public static uint ToUint32(RakNetGUID g) {
- uint ret = RakNetPINVOKE.RakNetGUID_ToUint32(RakNetGUID.getCPtr(g));
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- public RakNetGUID CopyData(RakNetGUID input) {
- RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakNetGUID_CopyData(swigCPtr, RakNetGUID.getCPtr(input)), false);
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- public ushort systemIndex {
- set {
- RakNetPINVOKE.RakNetGUID_systemIndex_set(swigCPtr, value);
- }
- get {
- ushort ret = RakNetPINVOKE.RakNetGUID_systemIndex_get(swigCPtr);
- return ret;
- }
- }
- public static int size() {
- int ret = RakNetPINVOKE.RakNetGUID_size();
- return ret;
- }
- public bool Equals(RakNetGUID right) {
- bool ret = RakNetPINVOKE.RakNetGUID_Equals(swigCPtr, RakNetGUID.getCPtr(right));
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- private bool OpNotEqual(RakNetGUID right) {
- bool ret = RakNetPINVOKE.RakNetGUID_OpNotEqual(swigCPtr, RakNetGUID.getCPtr(right));
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- private bool OpGreater(RakNetGUID right) {
- bool ret = RakNetPINVOKE.RakNetGUID_OpGreater(swigCPtr, RakNetGUID.getCPtr(right));
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- private bool OpLess(RakNetGUID right) {
- bool ret = RakNetPINVOKE.RakNetGUID_OpLess(swigCPtr, RakNetGUID.getCPtr(right));
- if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
- }
|