001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.12
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011public class OStream {
012   private long swigCPtr;
013   protected boolean swigCMemOwn;
014
015   protected OStream(long cPtr, boolean cMemoryOwn)
016   {
017     swigCMemOwn = cMemoryOwn;
018     swigCPtr    = cPtr;
019   }
020
021   protected static long getCPtr(OStream obj)
022   {
023     return (obj == null) ? 0 : obj.swigCPtr;
024   }
025
026   protected static long getCPtrAndDisown (OStream obj)
027   {
028     long ptr = 0;
029
030     if (obj != null)
031     {
032       ptr             = obj.swigCPtr;
033       obj.swigCMemOwn = false;
034     }
035
036     return ptr;
037   }
038
039  protected void finalize() {
040    delete();
041  }
042
043  public synchronized void delete() {
044    if (swigCPtr != 0) {
045      if (swigCMemOwn) {
046        swigCMemOwn = false;
047        libsbmlJNI.delete_OStream(swigCPtr);
048      }
049      swigCPtr = 0;
050    }
051  }
052
053  public OStream(int sot) {
054    this(libsbmlJNI.new_OStream__SWIG_0(sot), true);
055  }
056
057  public OStream() {
058    this(libsbmlJNI.new_OStream__SWIG_1(), true);
059  }
060
061  public SWIGTYPE_p_std__ostream get_ostream() {
062    long cPtr = libsbmlJNI.OStream_get_ostream(swigCPtr, this);
063    return (cPtr == 0) ? null : new SWIGTYPE_p_std__ostream(cPtr, false);
064  }
065
066  public void endl() {
067    libsbmlJNI.OStream_endl(swigCPtr, this);
068  }
069
070  // StdOSType 
071  public final static int COUT = 0;
072  public final static int CERR = COUT + 1;
073  public final static int CLOG = CERR + 1;
074
075}