/* ---------------------------------------------------------------------------- * 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 XMLOutputStream : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal XMLOutputStream(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(XMLOutputStream obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } internal static HandleRef getCPtrAndDisown (XMLOutputStream obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return ptr; } ~XMLOutputStream() { Dispose(); } public virtual void Dispose() { lock(this) { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; libsbmlPINVOKE.delete_XMLOutputStream(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } public static bool operator==(XMLOutputStream lhs, XMLOutputStream 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!=(XMLOutputStream lhs, XMLOutputStream rhs) { return !(lhs == rhs); } public override bool Equals(Object sb) { if ( ! (sb is XMLOutputStream) ) { return false; } return this == (XMLOutputStream)sb; } public override int GetHashCode() { return swigCPtr.Handle.ToInt32(); } public XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName, string programVersion) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_0(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl, programName, programVersion), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_1(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl, programName), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_2(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public XMLOutputStream(OStream stream, string encoding) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_3(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public XMLOutputStream(OStream stream) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_4(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream())), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void endElement(string name) { libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_0(swigCPtr, name); } public void endElement(XMLTriple triple) { libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_1(swigCPtr, XMLTriple.getCPtr(triple)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void setAutoIndent(bool indent) { libsbmlPINVOKE.XMLOutputStream_setAutoIndent(swigCPtr, indent); } public void startElement(string name) { libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_0(swigCPtr, name); } public void startElement(XMLTriple triple) { libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_1(swigCPtr, XMLTriple.getCPtr(triple)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void startEndElement(string name) { libsbmlPINVOKE.XMLOutputStream_startEndElement__SWIG_0(swigCPtr, name); } public void startEndElement(XMLTriple triple) { libsbmlPINVOKE.XMLOutputStream_startEndElement__SWIG_1(swigCPtr, XMLTriple.getCPtr(triple)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void writeAttribute(string name, string value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_0(swigCPtr, name, value); } public void writeAttribute(XMLTriple triple, string value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_1(swigCPtr, XMLTriple.getCPtr(triple), value); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void writeAttribute(string name, bool value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_2(swigCPtr, name, value); } public void writeAttribute(XMLTriple triple, bool value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple), value); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void writeAttribute(string name, double value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_4(swigCPtr, name, value); } public void writeAttribute(XMLTriple triple, double value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_5(swigCPtr, XMLTriple.getCPtr(triple), value); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void writeAttribute(string name, int value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_6(swigCPtr, name, value); } public void writeAttribute(XMLTriple triple, int value) { libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_7(swigCPtr, XMLTriple.getCPtr(triple), value); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public void writeXMLDecl() { libsbmlPINVOKE.XMLOutputStream_writeXMLDecl(swigCPtr); } public void writeComment(string programName, string programVersion) { libsbmlPINVOKE.XMLOutputStream_writeComment(swigCPtr, programName, programVersion); } public void downIndent() { libsbmlPINVOKE.XMLOutputStream_downIndent(swigCPtr); } public void upIndent() { libsbmlPINVOKE.XMLOutputStream_upIndent(swigCPtr); } public bool getStringStream() { bool ret = libsbmlPINVOKE.XMLOutputStream_getStringStream(swigCPtr); return ret; } } }