/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.39 * * 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 XMLNamespaces : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal XMLNamespaces(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(XMLNamespaces obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } internal static HandleRef getCPtrAndDisown (XMLNamespaces obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return ptr; } ~XMLNamespaces() { Dispose(); } public virtual void Dispose() { lock(this) { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; libsbmlPINVOKE.delete_XMLNamespaces(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } public static bool operator==(XMLNamespaces lhs, XMLNamespaces 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!=(XMLNamespaces lhs, XMLNamespaces rhs) { return !(lhs == rhs); } public override bool Equals(Object sb) { if ( ! (sb is XMLNamespaces) ) { return false; } return this == (XMLNamespaces)sb; } public override int GetHashCode() { return swigCPtr.Handle.ToInt32(); } public XMLNamespaces() : this(libsbmlPINVOKE.new_XMLNamespaces__SWIG_0(), true) { } public XMLNamespaces(XMLNamespaces orig) : this(libsbmlPINVOKE.new_XMLNamespaces__SWIG_1(XMLNamespaces.getCPtr(orig)), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public XMLNamespaces clone() { IntPtr cPtr = libsbmlPINVOKE.XMLNamespaces_clone(swigCPtr); XMLNamespaces ret = (cPtr == IntPtr.Zero) ? null : new XMLNamespaces(cPtr, true); return ret; } public void add(string uri, string prefix) { libsbmlPINVOKE.XMLNamespaces_add__SWIG_0(swigCPtr, uri, prefix); } public void add(string uri) { libsbmlPINVOKE.XMLNamespaces_add__SWIG_1(swigCPtr, uri); } public void remove(int index) { libsbmlPINVOKE.XMLNamespaces_remove__SWIG_0(swigCPtr, index); } public void remove(string prefix) { libsbmlPINVOKE.XMLNamespaces_remove__SWIG_1(swigCPtr, prefix); } public void clear() { libsbmlPINVOKE.XMLNamespaces_clear(swigCPtr); } public int getIndex(string uri) { int ret = libsbmlPINVOKE.XMLNamespaces_getIndex(swigCPtr, uri); return ret; } public int getIndexByPrefix(string prefix) { int ret = libsbmlPINVOKE.XMLNamespaces_getIndexByPrefix(swigCPtr, prefix); return ret; } public int getLength() { int ret = libsbmlPINVOKE.XMLNamespaces_getLength(swigCPtr); return ret; } public string getPrefix(int index) { string ret = libsbmlPINVOKE.XMLNamespaces_getPrefix__SWIG_0(swigCPtr, index); return ret; } public string getPrefix(string uri) { string ret = libsbmlPINVOKE.XMLNamespaces_getPrefix__SWIG_1(swigCPtr, uri); return ret; } public string getURI(int index) { string ret = libsbmlPINVOKE.XMLNamespaces_getURI__SWIG_0(swigCPtr, index); return ret; } public string getURI(string prefix) { string ret = libsbmlPINVOKE.XMLNamespaces_getURI__SWIG_1(swigCPtr, prefix); return ret; } public string getURI() { string ret = libsbmlPINVOKE.XMLNamespaces_getURI__SWIG_2(swigCPtr); return ret; } public bool isEmpty() { bool ret = libsbmlPINVOKE.XMLNamespaces_isEmpty(swigCPtr); return ret; } public bool hasURI(string uri) { bool ret = libsbmlPINVOKE.XMLNamespaces_hasURI(swigCPtr, uri); return ret; } public bool hasPrefix(string prefix) { bool ret = libsbmlPINVOKE.XMLNamespaces_hasPrefix(swigCPtr, prefix); return ret; } public bool hasNS(string uri, string prefix) { bool ret = libsbmlPINVOKE.XMLNamespaces_hasNS(swigCPtr, uri, prefix); return ret; } } }