/* ----------------------------------------------------------------------------
 * 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 OStream {
   private long swigCPtr;
   protected boolean swigCMemOwn;

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

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

   protected static long getCPtrAndDisown (OStream 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_OStream(swigCPtr);
    }
    swigCPtr = 0;
  }

  public OStream(int sot) {
    this(libsbmlJNI.new_OStream__SWIG_0(sot), true);
  }

  public OStream() {
    this(libsbmlJNI.new_OStream__SWIG_1(), true);
  }

  public SWIGTYPE_p_std__ostream get_ostream() {
    long cPtr = libsbmlJNI.OStream_get_ostream(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__ostream(cPtr, false);
  }

  public void endl() {
    libsbmlJNI.OStream_endl(swigCPtr, this);
  }

  // StdOSType 
  public final static int COUT = 0;
  public final static int CERR = COUT + 1;
  public final static int CLOG = CERR + 1;

}
