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

package org.sbml.libsbml;

/** 
 * @deprecated libSBML internal 
 */

public class XMLOutputStream {
   private long swigCPtr;
   protected boolean swigCMemOwn;

   protected XMLOutputStream(long cPtr, boolean cMemoryOwn)
   {
     swigCMemOwn = cMemoryOwn;
     swigCPtr    = cPtr;
   }

   protected static long getCPtr(XMLOutputStream obj)
   {
     return (obj == null) ? 0 : obj.swigCPtr;
   }

   protected static long getCPtrAndDisown (XMLOutputStream obj)
   {
     long ptr = 0;

     if (obj != null)
     {
       ptr             = obj.swigCPtr;
       obj.swigCMemOwn = false;
     }

     return ptr;
   }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      libsbmlJNI.delete_XMLOutputStream(swigCPtr);
    }
    swigCPtr = 0;
  }

  /**
   * Equality comparison method for XMLOutputStream.
   * <p>
   * Because the Java methods for libSBML are actually wrappers around code
   * implemented in C++ and C, certain operations will not behave as
   * expected.  Equality comparison is one such case.  An instance of a
   * libSBML object class is actually a <em>proxy object</em>
   * wrapping the real underlying C/C++ object.  The normal <code>==</code>
   * equality operator in Java will <em>only compare the Java proxy objects</em>,
   * not the underlying native object.  The result is almost never what you
   * want in practical situations.  Unfortunately, Java does not provide a
   * way to override <code>==</code>.
   *  <p>
   * The alternative that must be followed is to use the
   * <code>equals()</code> method.  The <code>equals</code> method on this
   * class overrides the default java.lang.Object one, and performs an
   * intelligent comparison of instances of objects of this class.  The
   * result is an assessment of whether two libSBML Java objects are truly 
   * the same underlying native-code objects.
   *  <p>
   * The use of this method in practice is the same as the use of any other
   * Java <code>equals</code> method.  For example,
   * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns
   * <code>true</code> if <em>a</em> and <em>b</em> are references to the
   * same underlying object.
   *
   * @param sb a reference to an object to which the current object
   * instance will be compared
   *
   * @return <code>true</code> if <code>sb</code> refers to the same underlying 
   * native object as this one, <code>false</code> otherwise
   */
  public boolean equals(Object sb)
  {
    if ( this == sb ) 
    {
      return true;
    }
    return swigCPtr == getCPtr((XMLOutputStream)(sb));
  }

  /**
   * Returns a hashcode for this XMLOutputStream object.
   *
   * @return a hash code usable by Java methods that need them.
   */
  public int hashCode()
  {
    return (int)(swigCPtr^(swigCPtr>>>32));
  }

  
  /**
   * Creates a new XMLOutputStream that wraps stream.
   * <p>
   * @docnote The native C++ implementation of this method defines a
   * default argument value.  In the documentation generated for different
   * libSBML language bindings, you may or may not see corresponding
   * arguments in the method declarations.  For example, in Java, a default
   * argument is handled by declaring two separate methods, with one of
   * them having the argument and the other one lacking the argument.
   * However, the libSBML documentation will be <em>identical</em> for both
   * methods.  Consequently, if you are reading this and do not see an
   * argument even though one is described, please look for descriptions of
   * other variants of this method near where this one appears in the
   * documentation.
   */
 public XMLOutputStream(OStream stream, String encoding, boolean writeXMLDecl, String programName, String programVersion) {
    this(libsbmlJNI.new_XMLOutputStream__SWIG_0(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), stream, encoding, writeXMLDecl, programName, programVersion), true);
  }

  
  /**
   * Creates a new XMLOutputStream that wraps stream.
   * <p>
   * @docnote The native C++ implementation of this method defines a
   * default argument value.  In the documentation generated for different
   * libSBML language bindings, you may or may not see corresponding
   * arguments in the method declarations.  For example, in Java, a default
   * argument is handled by declaring two separate methods, with one of
   * them having the argument and the other one lacking the argument.
   * However, the libSBML documentation will be <em>identical</em> for both
   * methods.  Consequently, if you are reading this and do not see an
   * argument even though one is described, please look for descriptions of
   * other variants of this method near where this one appears in the
   * documentation.
   */
 public XMLOutputStream(OStream stream, String encoding, boolean writeXMLDecl, String programName) {
    this(libsbmlJNI.new_XMLOutputStream__SWIG_1(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), stream, encoding, writeXMLDecl, programName), true);
  }

  
  /**
   * Creates a new XMLOutputStream that wraps stream.
   * <p>
   * @docnote The native C++ implementation of this method defines a
   * default argument value.  In the documentation generated for different
   * libSBML language bindings, you may or may not see corresponding
   * arguments in the method declarations.  For example, in Java, a default
   * argument is handled by declaring two separate methods, with one of
   * them having the argument and the other one lacking the argument.
   * However, the libSBML documentation will be <em>identical</em> for both
   * methods.  Consequently, if you are reading this and do not see an
   * argument even though one is described, please look for descriptions of
   * other variants of this method near where this one appears in the
   * documentation.
   */
 public XMLOutputStream(OStream stream, String encoding, boolean writeXMLDecl) {
    this(libsbmlJNI.new_XMLOutputStream__SWIG_2(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), stream, encoding, writeXMLDecl), true);
  }

  
  /**
   * Creates a new XMLOutputStream that wraps stream.
   * <p>
   * @docnote The native C++ implementation of this method defines a
   * default argument value.  In the documentation generated for different
   * libSBML language bindings, you may or may not see corresponding
   * arguments in the method declarations.  For example, in Java, a default
   * argument is handled by declaring two separate methods, with one of
   * them having the argument and the other one lacking the argument.
   * However, the libSBML documentation will be <em>identical</em> for both
   * methods.  Consequently, if you are reading this and do not see an
   * argument even though one is described, please look for descriptions of
   * other variants of this method near where this one appears in the
   * documentation.
   */
 public XMLOutputStream(OStream stream, String encoding) {
    this(libsbmlJNI.new_XMLOutputStream__SWIG_3(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), stream, encoding), true);
  }

  
  /**
   * Creates a new XMLOutputStream that wraps stream.
   * <p>
   * @docnote The native C++ implementation of this method defines a
   * default argument value.  In the documentation generated for different
   * libSBML language bindings, you may or may not see corresponding
   * arguments in the method declarations.  For example, in Java, a default
   * argument is handled by declaring two separate methods, with one of
   * them having the argument and the other one lacking the argument.
   * However, the libSBML documentation will be <em>identical</em> for both
   * methods.  Consequently, if you are reading this and do not see an
   * argument even though one is described, please look for descriptions of
   * other variants of this method near where this one appears in the
   * documentation.
   */
 public XMLOutputStream(OStream stream) {
    this(libsbmlJNI.new_XMLOutputStream__SWIG_4(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), stream), true);
  }

  
  /**
   * Writes the given XML end element name to this XMLOutputStream.
   */
 public void endElement(String name) {
    libsbmlJNI.XMLOutputStream_endElement__SWIG_0(swigCPtr, this, name);
  }

  
  /**
   * Writes the given XML end element 'prefix:name' to this
   * XMLOutputStream.
   */
 public void endElement(XMLTriple triple) {
    libsbmlJNI.XMLOutputStream_endElement__SWIG_1(swigCPtr, this, XMLTriple.getCPtr(triple), triple);
  }

  
  /**
   * Turns automatic indentation on or off for this XMLOutputStream.
   */
 public void setAutoIndent(boolean indent) {
    libsbmlJNI.XMLOutputStream_setAutoIndent(swigCPtr, this, indent);
  }

  
  /**
   * Writes the given XML start element name to this XMLOutputStream.
   */
 public void startElement(String name) {
    libsbmlJNI.XMLOutputStream_startElement__SWIG_0(swigCPtr, this, name);
  }

  
  /**
   * Writes the given XML start element 'prefix:name' to this
   * XMLOutputStream.
   */
 public void startElement(XMLTriple triple) {
    libsbmlJNI.XMLOutputStream_startElement__SWIG_1(swigCPtr, this, XMLTriple.getCPtr(triple), triple);
  }

  
  /**
   * Writes the given XML start and end element name to this XMLOutputStream.
   */
 public void startEndElement(String name) {
    libsbmlJNI.XMLOutputStream_startEndElement__SWIG_0(swigCPtr, this, name);
  }

  
  /**
   * Writes the given XML start and end element 'prefix:name' to this
   * XMLOutputStream.
   */
 public void startEndElement(XMLTriple triple) {
    libsbmlJNI.XMLOutputStream_startEndElement__SWIG_1(swigCPtr, this, XMLTriple.getCPtr(triple), triple);
  }

  
  /**
   * Writes the given attribute, name='value' to this XMLOutputStream.
   */
 public void writeAttribute(String name, String value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_0(swigCPtr, this, name, value);
  }

  
  /**
   * Writes the given attribute, prefix:name='value' to this
   * XMLOutputStream.
   */
 public void writeAttribute(XMLTriple triple, String value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_1(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value);
  }

  
  /**
   * Writes the given attribute, name='true' or name='false' to this
   * XMLOutputStream.
   */
 public void writeAttribute(String name, boolean value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_2(swigCPtr, this, name, value);
  }

  
  /**
   * Writes the given attribute, prefix:name='true' or prefix:name='false'
   * to this XMLOutputStream.
   */
 public void writeAttribute(XMLTriple triple, boolean value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value);
  }

  
  /**
   * Writes the given attribute, name='value' to this XMLOutputStream.
   */
 public void writeAttribute(String name, double value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_4(swigCPtr, this, name, value);
  }

  
  /**
   * Writes the given attribute, prefix:name='value' to this
   * XMLOutputStream.
   */
 public void writeAttribute(XMLTriple triple, double value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_5(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value);
  }

  
  /**
   * Writes the given attribute, name='value' to this XMLOutputStream.
   */
 public void writeAttribute(String name, int value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_6(swigCPtr, this, name, value);
  }

  
  /**
   * Writes the given attribute, prefix:name='value' to this
   * XMLOutputStream.
   */
 public void writeAttribute(XMLTriple triple, int value) {
    libsbmlJNI.XMLOutputStream_writeAttribute__SWIG_7(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value);
  }

  
  /**
   * Writes the XML declaration:
   * <?xml version='1.0' encoding='...'?>
   */
 public void writeXMLDecl() {
    libsbmlJNI.XMLOutputStream_writeXMLDecl(swigCPtr, this);
  }

  
  /**
   * Writes an XML comment:
   * <?xml version='1.0' encoding='...'?>
   */
 public void writeComment(String programName, String programVersion) {
    libsbmlJNI.XMLOutputStream_writeComment(swigCPtr, this, programName, programVersion);
  }

  
  /**
   * Decreases the indentation level for this XMLOutputStream.
   */
 public void downIndent() {
    libsbmlJNI.XMLOutputStream_downIndent(swigCPtr, this);
  }

  
  /**
   * Increases the indentation level for this XMLOutputStream.
   */
 public void upIndent() {
    libsbmlJNI.XMLOutputStream_upIndent(swigCPtr, this);
  }

  
  /**
   * Increases the indentation level for this XMLOutputStream.
   <p>
 * @deprecated libSBML internal
 */
 public boolean getStringStream() {
    return libsbmlJNI.XMLOutputStream_getStringStream(swigCPtr, this);
  }

}
