Files
SLikeNet/bindings/csharp/interfaces/RakNetGUID.cs
2025-11-24 14:19:51 +05:30

183 lines
4.9 KiB
C#

/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace SLNet {
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;
SLikeNetPINVOKE.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(SLikeNetPINVOKE.new_RakNetGUID__SWIG_0(), true) {
}
public RakNetGUID(ulong _g) : this(SLikeNetPINVOKE.new_RakNetGUID__SWIG_1(_g), true) {
}
public ulong g {
set {
SLikeNetPINVOKE.RakNetGUID_g_set(swigCPtr, value);
}
get {
ulong ret = SLikeNetPINVOKE.RakNetGUID_g_get(swigCPtr);
return ret;
}
}
public override string ToString() {
string ret = SLikeNetPINVOKE.RakNetGUID_ToString__SWIG_0(swigCPtr);
return ret;
}
public void ToString(string dest, uint destSize) {
SLikeNetPINVOKE.RakNetGUID_ToString__SWIG_1(swigCPtr, dest, destSize);
}
public bool FromString(string source) {
bool ret = SLikeNetPINVOKE.RakNetGUID_FromString(swigCPtr, source);
return ret;
}
public static uint ToUint32(RakNetGUID g) {
uint ret = SLikeNetPINVOKE.RakNetGUID_ToUint32(RakNetGUID.getCPtr(g));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public RakNetGUID CopyData(RakNetGUID input) {
RakNetGUID ret = new RakNetGUID(SLikeNetPINVOKE.RakNetGUID_CopyData(swigCPtr, RakNetGUID.getCPtr(input)), false);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public ushort systemIndex {
set {
SLikeNetPINVOKE.RakNetGUID_systemIndex_set(swigCPtr, value);
}
get {
ushort ret = SLikeNetPINVOKE.RakNetGUID_systemIndex_get(swigCPtr);
return ret;
}
}
public static int size() {
int ret = SLikeNetPINVOKE.RakNetGUID_size();
return ret;
}
public bool Equals(RakNetGUID right) {
bool ret = SLikeNetPINVOKE.RakNetGUID_Equals(swigCPtr, RakNetGUID.getCPtr(right));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool OpNotEqual(RakNetGUID right) {
bool ret = SLikeNetPINVOKE.RakNetGUID_OpNotEqual(swigCPtr, RakNetGUID.getCPtr(right));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool OpGreater(RakNetGUID right) {
bool ret = SLikeNetPINVOKE.RakNetGUID_OpGreater(swigCPtr, RakNetGUID.getCPtr(right));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private bool OpLess(RakNetGUID right) {
bool ret = SLikeNetPINVOKE.RakNetGUID_OpLess(swigCPtr, RakNetGUID.getCPtr(right));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}