/* ----------------------------------------------------------------------------
 * 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;

public class RakWString : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal RakWString(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(RakWString obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~RakWString() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          SLikeNetPINVOKE.delete_RakWString(swigCPtr);
        }
        swigCPtr = new HandleRef(null, IntPtr.Zero);
      }
      GC.SuppressFinalize(this);
    }
  }

  public RakWString() : this(SLikeNetPINVOKE.new_RakWString__SWIG_0(), true) {
  }

  public RakWString(RakString right) : this(SLikeNetPINVOKE.new_RakWString__SWIG_1(RakString.getCPtr(right)), true) {
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public RakWString(SWIGTYPE_p_wchar_t input) : this(SLikeNetPINVOKE.new_RakWString__SWIG_2(SWIGTYPE_p_wchar_t.getCPtr(input)), true) {
  }

  public RakWString(RakWString right) : this(SLikeNetPINVOKE.new_RakWString__SWIG_3(RakWString.getCPtr(right)), true) {
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public RakWString(string input) : this(SLikeNetPINVOKE.new_RakWString__SWIG_4(input), true) {
  }

  public SWIGTYPE_p_wchar_t C_String() {
    IntPtr cPtr = SLikeNetPINVOKE.RakWString_C_String(swigCPtr);
    SWIGTYPE_p_wchar_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_wchar_t(cPtr, false);
    return ret;
  }

  public RakWString CopyData(RakWString right) {
    RakWString ret = new RakWString(SLikeNetPINVOKE.RakWString_CopyData__SWIG_0(swigCPtr, RakWString.getCPtr(right)), false);
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public RakWString CopyData(RakString right) {
    RakWString ret = new RakWString(SLikeNetPINVOKE.RakWString_CopyData__SWIG_1(swigCPtr, RakString.getCPtr(right)), false);
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public RakWString CopyData(SWIGTYPE_p_wchar_t str) {
    RakWString ret = new RakWString(SLikeNetPINVOKE.RakWString_CopyData__SWIG_2(swigCPtr, SWIGTYPE_p_wchar_t.getCPtr(str)), false);
    return ret;
  }

  public RakWString CopyData(string str) {
    RakWString ret = new RakWString(SLikeNetPINVOKE.RakWString_CopyData__SWIG_4(swigCPtr, str), false);
    return ret;
  }

  public bool Equals(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_Equals(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  private bool OpLess(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_OpLess(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  private bool OpLessEquals(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_OpLessEquals(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  private bool OpGreater(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_OpGreater(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  private bool OpGreaterEquals(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_OpGreaterEquals(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  private bool OpNotEqual(RakWString right) {
    bool ret = SLikeNetPINVOKE.RakWString_OpNotEqual(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void Set(SWIGTYPE_p_wchar_t str) {
    SLikeNetPINVOKE.RakWString_Set(swigCPtr, SWIGTYPE_p_wchar_t.getCPtr(str));
  }

  public bool IsEmpty() {
    bool ret = SLikeNetPINVOKE.RakWString_IsEmpty(swigCPtr);
    return ret;
  }

  public uint GetLength() {
    uint ret = SLikeNetPINVOKE.RakWString_GetLength(swigCPtr);
    return ret;
  }

  public static uint ToInteger(RakWString rs) {
    uint ret = SLikeNetPINVOKE.RakWString_ToInteger(RakWString.getCPtr(rs));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int StrCmp(RakWString right) {
    int ret = SLikeNetPINVOKE.RakWString_StrCmp(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int StrICmp(RakWString right) {
    int ret = SLikeNetPINVOKE.RakWString_StrICmp(swigCPtr, RakWString.getCPtr(right));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void Clear() {
    SLikeNetPINVOKE.RakWString_Clear(swigCPtr);
  }

  public void Printf() {
    SLikeNetPINVOKE.RakWString_Printf(swigCPtr);
  }

  public void FPrintf(SWIGTYPE_p_FILE fp) {
    SLikeNetPINVOKE.RakWString_FPrintf(swigCPtr, SWIGTYPE_p_FILE.getCPtr(fp));
  }

  public void Serialize(BitStream bs) {
    SLikeNetPINVOKE.RakWString_Serialize__SWIG_0(swigCPtr, BitStream.getCPtr(bs));
  }

  public static void Serialize(SWIGTYPE_p_wchar_t str, BitStream bs) {
    SLikeNetPINVOKE.RakWString_Serialize__SWIG_1(SWIGTYPE_p_wchar_t.getCPtr(str), BitStream.getCPtr(bs));
  }

  public bool Deserialize(BitStream bs) {
    bool ret = SLikeNetPINVOKE.RakWString_Deserialize__SWIG_0(swigCPtr, BitStream.getCPtr(bs));
    return ret;
  }

  public static bool Deserialize(SWIGTYPE_p_wchar_t str, BitStream bs) {
    bool ret = SLikeNetPINVOKE.RakWString_Deserialize__SWIG_1(SWIGTYPE_p_wchar_t.getCPtr(str), BitStream.getCPtr(bs));
    return ret;
  }

  public static bool Deserialize(SWIGTYPE_p_wchar_t str, uint strLength, BitStream bs) {
    bool ret = SLikeNetPINVOKE.RakWString_Deserialize__SWIG_2(SWIGTYPE_p_wchar_t.getCPtr(str), strLength, BitStream.getCPtr(bs));
    return ret;
  }

}

}
