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

public class OStringStream extends OStream {
   private long swigCPtr;

   protected OStringStream(long cPtr, boolean cMemoryOwn)
   {
     super(libsbmlJNI.SWIGOStringStreamUpcast(cPtr), cMemoryOwn);
     swigCPtr = cPtr;
   }

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

   protected static long getCPtrAndDisown (OStringStream 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_OStringStream(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  public OStringStream() {
    this(libsbmlJNI.new_OStringStream(), true);
  }

  public String str() {
    return libsbmlJNI.OStringStream_str__SWIG_0(swigCPtr, this);
  }

  public void str(String s) {
    libsbmlJNI.OStringStream_str__SWIG_1(swigCPtr, this, s);
  }

}
