001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.11
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 CompartmentGlyph extends GraphicalObject {
012   private long swigCPtr;
013
014   protected CompartmentGlyph(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.CompartmentGlyph_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(CompartmentGlyph obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (CompartmentGlyph obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_CompartmentGlyph(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public CompartmentGlyph(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_CompartmentGlyph__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public CompartmentGlyph(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_CompartmentGlyph__SWIG_1(level, version), true);
059  }
060
061  public CompartmentGlyph(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_CompartmentGlyph__SWIG_2(level), true);
063  }
064
065  public CompartmentGlyph() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_CompartmentGlyph__SWIG_3(), true);
067  }
068
069  public CompartmentGlyph(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_CompartmentGlyph__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
071  }
072
073  public CompartmentGlyph(LayoutPkgNamespaces layoutns, String id) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_CompartmentGlyph__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id), true);
075  }
076
077  public CompartmentGlyph(LayoutPkgNamespaces layoutns, String id, String compartmentId) throws org.sbml.libsbml.SBMLConstructorException {
078    this(libsbmlJNI.new_CompartmentGlyph__SWIG_6(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, compartmentId), true);
079  }
080
081  public CompartmentGlyph(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
082    this(libsbmlJNI.new_CompartmentGlyph__SWIG_7(XMLNode.getCPtr(node), node, l2version), true);
083  }
084
085  public CompartmentGlyph(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
086    this(libsbmlJNI.new_CompartmentGlyph__SWIG_8(XMLNode.getCPtr(node), node), true);
087  }
088
089  public CompartmentGlyph(CompartmentGlyph source) throws org.sbml.libsbml.SBMLConstructorException {
090    this(libsbmlJNI.new_CompartmentGlyph__SWIG_9(CompartmentGlyph.getCPtr(source), source), true);
091  }
092
093  public String getCompartmentId() {
094    return libsbmlJNI.CompartmentGlyph_getCompartmentId(swigCPtr, this);
095  }
096
097  public int setCompartmentId(String id) {
098    return libsbmlJNI.CompartmentGlyph_setCompartmentId(swigCPtr, this, id);
099  }
100
101  public boolean isSetCompartmentId() {
102    return libsbmlJNI.CompartmentGlyph_isSetCompartmentId(swigCPtr, this);
103  }
104
105  public void initDefaults() {
106    libsbmlJNI.CompartmentGlyph_initDefaults(swigCPtr, this);
107  }
108
109  
110/**
111   * Returns the XML element name of this object.
112   * <p>
113   * This is overridden by subclasses to return a string appropriate to the
114   * SBML component.  For example, {@link Model} defines it as returning 
115   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
116   * and so on.
117   */ public
118 String getElementName() {
119    return libsbmlJNI.CompartmentGlyph_getElementName(swigCPtr, this);
120  }
121
122  
123/**
124   * Creates and returns a deep copy of this {@link SBase} object.
125   * <p>
126   * @return a (deep) copy of this {@link SBase} object.
127   */ public
128 CompartmentGlyph cloneObject() {
129    long cPtr = libsbmlJNI.CompartmentGlyph_cloneObject(swigCPtr, this);
130    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
131  }
132
133  
134/**
135   * Returns the libSBML type code for this object.
136   * <p>
137   * This method may return the type code of this SBML object, or it may
138   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
139   * is because subclasses of {@link SBase} are not required to implement this
140   * method to return a type code.  This method is meant primarily for the
141   * LibSBML C interface, in which class and subclass information is not
142   * readily available.
143   * <p>
144   * @return the SBML object type code
145   * of this SBML object or
146   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
147   * <p>
148   * @see #getElementName()
149   * @see #getPackageName()
150   */ public
151 int getTypeCode() {
152    return libsbmlJNI.CompartmentGlyph_getTypeCode(swigCPtr, this);
153  }
154
155  public XMLNode toXML() {
156    return new XMLNode(libsbmlJNI.CompartmentGlyph_toXML(swigCPtr, this), true);
157  }
158
159}