/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.38
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace libsbml {

using System;
using System.Runtime.InteropServices;

public class XMLToken : IDisposable {
	private HandleRef swigCPtr;
	protected bool swigCMemOwn;
	
	internal XMLToken(IntPtr cPtr, bool cMemoryOwn)
	{
		swigCMemOwn = cMemoryOwn;
		swigCPtr    = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(XMLToken obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (XMLToken obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~XMLToken() {
    Dispose();
  }

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

  public static bool operator==(XMLToken lhs, XMLToken rhs)
  {
    if((Object)lhs == (Object)rhs)
    {
      return true;
    }

    if( ((Object)lhs == null) || ((Object)rhs == null) )
    {
      return false;
    }

    return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
  }

  public static bool operator!=(XMLToken lhs, XMLToken rhs)
  {
    return !(lhs == rhs);
  }

  public override bool Equals(Object sb)
  {
    if ( ! (sb is XMLToken) )
    {
      return false;
    }

    return this == (XMLToken)sb;
  }

  public override int GetHashCode()
  {
    return swigCPtr.Handle.ToInt32();
  }

  public XMLToken() : this(libsbmlPINVOKE.new_XMLToken__SWIG_0(), true) {
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_1(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces), line, column), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_2(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces), line), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces) : this(libsbmlPINVOKE.new_XMLToken__SWIG_3(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_4(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), line, column), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_5(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), line), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, XMLAttributes attributes) : this(libsbmlPINVOKE.new_XMLToken__SWIG_6(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_7(XMLTriple.getCPtr(triple), line, column), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_8(XMLTriple.getCPtr(triple), line), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(XMLTriple triple) : this(libsbmlPINVOKE.new_XMLToken__SWIG_9(XMLTriple.getCPtr(triple)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken(string chars, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_10(chars, line, column), true) {
  }

  public XMLToken(string chars, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_11(chars, line), true) {
  }

  public XMLToken(string chars) : this(libsbmlPINVOKE.new_XMLToken__SWIG_12(chars), true) {
  }

  public XMLToken(XMLToken orig) : this(libsbmlPINVOKE.new_XMLToken__SWIG_13(XMLToken.getCPtr(orig)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public XMLToken clone() {
    IntPtr cPtr = libsbmlPINVOKE.XMLToken_clone(swigCPtr);
    XMLToken ret = (cPtr == IntPtr.Zero) ? null : new XMLToken(cPtr, true);
    return ret;
  }

  public XMLAttributes getAttributes() {
    XMLAttributes ret = new XMLAttributes(libsbmlPINVOKE.XMLToken_getAttributes(swigCPtr), false);
    return ret;
  }

  public void setAttributes(XMLAttributes attributes) {
    libsbmlPINVOKE.XMLToken_setAttributes(swigCPtr, XMLAttributes.getCPtr(attributes));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void addAttr(string name, string value, string namespaceURI, string prefix) {
    libsbmlPINVOKE.XMLToken_addAttr__SWIG_0(swigCPtr, name, value, namespaceURI, prefix);
  }

  public void addAttr(string name, string value, string namespaceURI) {
    libsbmlPINVOKE.XMLToken_addAttr__SWIG_1(swigCPtr, name, value, namespaceURI);
  }

  public void addAttr(string name, string value) {
    libsbmlPINVOKE.XMLToken_addAttr__SWIG_2(swigCPtr, name, value);
  }

  public void addAttr(XMLTriple triple, string value) {
    libsbmlPINVOKE.XMLToken_addAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple), value);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void removeAttr(int n) {
    libsbmlPINVOKE.XMLToken_removeAttr__SWIG_0(swigCPtr, n);
  }

  public void removeAttr(string name, string uri) {
    libsbmlPINVOKE.XMLToken_removeAttr__SWIG_1(swigCPtr, name, uri);
  }

  public void removeAttr(string name) {
    libsbmlPINVOKE.XMLToken_removeAttr__SWIG_2(swigCPtr, name);
  }

  public void removeAttr(XMLTriple triple) {
    libsbmlPINVOKE.XMLToken_removeAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void clearAttributes() {
    libsbmlPINVOKE.XMLToken_clearAttributes(swigCPtr);
  }

  public int getAttrIndex(string name, string uri) {
    int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_0(swigCPtr, name, uri);
    return ret;
  }

  public int getAttrIndex(string name) {
    int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_1(swigCPtr, name);
    return ret;
  }

  public int getAttrIndex(XMLTriple triple) {
    int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int getAttributesLength() {
    int ret = libsbmlPINVOKE.XMLToken_getAttributesLength(swigCPtr);
    return ret;
  }

  public string getAttrName(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrName(swigCPtr, index);
    return ret;
  }

  public string getAttrPrefix(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrPrefix(swigCPtr, index);
    return ret;
  }

  public string getAttrPrefixedName(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrPrefixedName(swigCPtr, index);
    return ret;
  }

  public string getAttrURI(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrURI(swigCPtr, index);
    return ret;
  }

  public string getAttrValue(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_0(swigCPtr, index);
    return ret;
  }

  public string getAttrValue(string name, string uri) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_1(swigCPtr, name, uri);
    return ret;
  }

  public string getAttrValue(string name) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_2(swigCPtr, name);
    return ret;
  }

  public string getAttrValue(XMLTriple triple) {
    string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool hasAttr(int index) {
    bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_0(swigCPtr, index);
    return ret;
  }

  public bool hasAttr(string name, string uri) {
    bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_1(swigCPtr, name, uri);
    return ret;
  }

  public bool hasAttr(string name) {
    bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_2(swigCPtr, name);
    return ret;
  }

  public bool hasAttr(XMLTriple triple) {
    bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool isAttributesEmpty() {
    bool ret = libsbmlPINVOKE.XMLToken_isAttributesEmpty(swigCPtr);
    return ret;
  }

  public XMLNamespaces getNamespaces() {
    XMLNamespaces ret = new XMLNamespaces(libsbmlPINVOKE.XMLToken_getNamespaces(swigCPtr), false);
    return ret;
  }

  public void setNamespaces(XMLNamespaces namespaces) {
    libsbmlPINVOKE.XMLToken_setNamespaces(swigCPtr, XMLNamespaces.getCPtr(namespaces));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void addNamespace(string uri, string prefix) {
    libsbmlPINVOKE.XMLToken_addNamespace__SWIG_0(swigCPtr, uri, prefix);
  }

  public void addNamespace(string uri) {
    libsbmlPINVOKE.XMLToken_addNamespace__SWIG_1(swigCPtr, uri);
  }

  public void removeNamespace(int index) {
    libsbmlPINVOKE.XMLToken_removeNamespace__SWIG_0(swigCPtr, index);
  }

  public void removeNamespace(string prefix) {
    libsbmlPINVOKE.XMLToken_removeNamespace__SWIG_1(swigCPtr, prefix);
  }

  public void clearNamespaces() {
    libsbmlPINVOKE.XMLToken_clearNamespaces(swigCPtr);
  }

  public int getNamespaceIndex(string uri) {
    int ret = libsbmlPINVOKE.XMLToken_getNamespaceIndex(swigCPtr, uri);
    return ret;
  }

  public int getNamespaceIndexByPrefix(string prefix) {
    int ret = libsbmlPINVOKE.XMLToken_getNamespaceIndexByPrefix(swigCPtr, prefix);
    return ret;
  }

  public int getNamespacesLength() {
    int ret = libsbmlPINVOKE.XMLToken_getNamespacesLength(swigCPtr);
    return ret;
  }

  public string getNamespacePrefix(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getNamespacePrefix__SWIG_0(swigCPtr, index);
    return ret;
  }

  public string getNamespacePrefix(string uri) {
    string ret = libsbmlPINVOKE.XMLToken_getNamespacePrefix__SWIG_1(swigCPtr, uri);
    return ret;
  }

  public string getNamespaceURI(int index) {
    string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_0(swigCPtr, index);
    return ret;
  }

  public string getNamespaceURI(string prefix) {
    string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_1(swigCPtr, prefix);
    return ret;
  }

  public string getNamespaceURI() {
    string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_2(swigCPtr);
    return ret;
  }

  public bool isNamespacesEmpty() {
    bool ret = libsbmlPINVOKE.XMLToken_isNamespacesEmpty(swigCPtr);
    return ret;
  }

  public bool hasNamespaceURI(string uri) {
    bool ret = libsbmlPINVOKE.XMLToken_hasNamespaceURI(swigCPtr, uri);
    return ret;
  }

  public bool hasNamespacePrefix(string prefix) {
    bool ret = libsbmlPINVOKE.XMLToken_hasNamespacePrefix(swigCPtr, prefix);
    return ret;
  }

  public bool hasNamespaceNS(string uri, string prefix) {
    bool ret = libsbmlPINVOKE.XMLToken_hasNamespaceNS(swigCPtr, uri, prefix);
    return ret;
  }

  public void setTriple(XMLTriple triple) {
    libsbmlPINVOKE.XMLToken_setTriple(swigCPtr, XMLTriple.getCPtr(triple));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public string getName() {
    string ret = libsbmlPINVOKE.XMLToken_getName(swigCPtr);
    return ret;
  }

  public string getPrefix() {
    string ret = libsbmlPINVOKE.XMLToken_getPrefix(swigCPtr);
    return ret;
  }

  public string getURI() {
    string ret = libsbmlPINVOKE.XMLToken_getURI(swigCPtr);
    return ret;
  }

  public string getCharacters() {
    string ret = libsbmlPINVOKE.XMLToken_getCharacters(swigCPtr);
    return ret;
  }

  public void append(string chars) {
    libsbmlPINVOKE.XMLToken_append(swigCPtr, chars);
  }

  public long getColumn() { return (long)libsbmlPINVOKE.XMLToken_getColumn(swigCPtr); }

  public long getLine() { return (long)libsbmlPINVOKE.XMLToken_getLine(swigCPtr); }

  public bool isElement() {
    bool ret = libsbmlPINVOKE.XMLToken_isElement(swigCPtr);
    return ret;
  }

  public bool isEnd() {
    bool ret = libsbmlPINVOKE.XMLToken_isEnd(swigCPtr);
    return ret;
  }

  public bool isEndFor(XMLToken element) {
    bool ret = libsbmlPINVOKE.XMLToken_isEndFor(swigCPtr, XMLToken.getCPtr(element));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool isEOF() {
    bool ret = libsbmlPINVOKE.XMLToken_isEOF(swigCPtr);
    return ret;
  }

  public bool isStart() {
    bool ret = libsbmlPINVOKE.XMLToken_isStart(swigCPtr);
    return ret;
  }

  public bool isText() {
    bool ret = libsbmlPINVOKE.XMLToken_isText(swigCPtr);
    return ret;
  }

  public void setEnd() {
    libsbmlPINVOKE.XMLToken_setEnd(swigCPtr);
  }

  public void setEOF() {
    libsbmlPINVOKE.XMLToken_setEOF(swigCPtr);
  }

  public void unsetEnd() {
    libsbmlPINVOKE.XMLToken_unsetEnd(swigCPtr);
  }

  public void write(XMLOutputStream stream) {
    libsbmlPINVOKE.XMLToken_write(swigCPtr, XMLOutputStream.getCPtr(stream));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public string toString() {
    string ret = libsbmlPINVOKE.XMLToken_toString(swigCPtr);
    return ret;
  }

}

}
