1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package org.sbml.libsbml;
10 
11 public class XMLOwningOutputStringStream {
12    private long swigCPtr;
13    protected boolean swigCMemOwn;
14 
XMLOwningOutputStringStream(long cPtr, boolean cMemoryOwn)15    protected XMLOwningOutputStringStream(long cPtr, boolean cMemoryOwn)
16    {
17      swigCMemOwn = cMemoryOwn;
18      swigCPtr    = cPtr;
19    }
20 
getCPtr(XMLOwningOutputStringStream obj)21    protected static long getCPtr(XMLOwningOutputStringStream obj)
22    {
23      return (obj == null) ? 0 : obj.swigCPtr;
24    }
25 
getCPtrAndDisown(XMLOwningOutputStringStream obj)26    protected static long getCPtrAndDisown (XMLOwningOutputStringStream obj)
27    {
28      long ptr = 0;
29 
30      if (obj != null)
31      {
32        ptr             = obj.swigCPtr;
33        obj.swigCMemOwn = false;
34      }
35 
36      return ptr;
37    }
38 
39   @SuppressWarnings("deprecation")
finalize()40   protected void finalize() {
41     delete();
42   }
43 
delete()44   public synchronized void delete() {
45     if (swigCPtr != 0) {
46       if (swigCMemOwn) {
47         swigCMemOwn = false;
48         libsbmlJNI.delete_XMLOwningOutputStringStream(swigCPtr);
49       }
50       swigCPtr = 0;
51     }
52   }
53 
54 
55 /** * @internal */ public
XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName, String programVersion)56  XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName, String programVersion) {
57     this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_0(encoding, writeXMLDecl, programName, programVersion), true);
58   }
59 
60 
61 /** * @internal */ public
XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName)62  XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl, String programName) {
63     this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_1(encoding, writeXMLDecl, programName), true);
64   }
65 
66 
67 /** * @internal */ public
XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl)68  XMLOwningOutputStringStream(String encoding, boolean writeXMLDecl) {
69     this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_2(encoding, writeXMLDecl), true);
70   }
71 
72 
73 /** * @internal */ public
XMLOwningOutputStringStream(String encoding)74  XMLOwningOutputStringStream(String encoding) {
75     this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_3(encoding), true);
76   }
77 
78 
79 /** * @internal */ public
XMLOwningOutputStringStream()80  XMLOwningOutputStringStream() {
81     this(libsbmlJNI.new_XMLOwningOutputStringStream__SWIG_4(), true);
82   }
83 
84 }
85