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 RenderLayoutPlugin extends SBasePlugin {
012   private long swigCPtr;
013
014   protected RenderLayoutPlugin(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.RenderLayoutPlugin_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(RenderLayoutPlugin obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (RenderLayoutPlugin 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_RenderLayoutPlugin(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   * Constructor
056   */ public
057 RenderLayoutPlugin(String uri, String prefix, RenderPkgNamespaces groupsns) {
058    this(libsbmlJNI.new_RenderLayoutPlugin__SWIG_0(uri, prefix, RenderPkgNamespaces.getCPtr(groupsns), groupsns), true);
059  }
060
061  
062/**
063   * Copy constructor. Creates a copy of this {@link SBase} object.
064   */ public
065 RenderLayoutPlugin(RenderLayoutPlugin orig) {
066    this(libsbmlJNI.new_RenderLayoutPlugin__SWIG_1(RenderLayoutPlugin.getCPtr(orig), orig), true);
067  }
068
069  
070/**
071   * Creates and returns a deep copy of this RenderLayoutPlugin  object.
072   <p>
073   * @return a (deep) copy of this RenderLayoutPlugin object
074   */ public
075 SBasePlugin cloneObject() {
076    long cPtr = libsbmlJNI.RenderLayoutPlugin_cloneObject(swigCPtr, this);
077    return (cPtr == 0) ? null : new RenderLayoutPlugin(cPtr, true);
078  }
079
080  
081/**
082   * Returns a pointer to the list object that contains local render information.
083   */ public
084 ListOfLocalRenderInformation getListOfLocalRenderInformation() {
085    long cPtr = libsbmlJNI.RenderLayoutPlugin_getListOfLocalRenderInformation__SWIG_0(swigCPtr, this);
086    return (cPtr == 0) ? null : new ListOfLocalRenderInformation(cPtr, false);
087  }
088
089  
090/**
091   * Returns the number of local render information objects.
092   */ public
093 long getNumLocalRenderInformationObjects() {
094    return libsbmlJNI.RenderLayoutPlugin_getNumLocalRenderInformationObjects(swigCPtr, this);
095  }
096
097  
098/**
099   * Returns a pointer to the local render information object with the given
100   * index.
101   * If the index is invalid, <code>null</code> is returned.
102   */ public
103 LocalRenderInformation getRenderInformation(long index) {
104    long cPtr = libsbmlJNI.RenderLayoutPlugin_getRenderInformation__SWIG_0(swigCPtr, this, index);
105    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
106  }
107
108  
109/**
110   * Returns a pointer to the local render information object with the given
111   * id.
112   * If no object with the given <code>id</code> exists, <code>null</code> is returned.
113   */ public
114 LocalRenderInformation getRenderInformation(String id) {
115    long cPtr = libsbmlJNI.RenderLayoutPlugin_getRenderInformation__SWIG_2(swigCPtr, this, id);
116    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
117  }
118
119  
120/**
121   * Adds a copy of the given local render information object to the list of
122   * local render information objects.
123   * If an object with the same id exists, it is replaced.
124   */ public
125 void addLocalRenderInformation(LocalRenderInformation pLRI) {
126    libsbmlJNI.RenderLayoutPlugin_addLocalRenderInformation(swigCPtr, this, LocalRenderInformation.getCPtr(pLRI), pLRI);
127  }
128
129  
130/**
131   * Creates a new local render information object and adds it to the list.
132   * The created object does not have a id and it is the responsibility of
133   * the calling code to ensure that it gets one.
134   * For constraints on the id, please consult the render information document.
135   */ public
136 LocalRenderInformation createLocalRenderInformation() {
137    long cPtr = libsbmlJNI.RenderLayoutPlugin_createLocalRenderInformation(swigCPtr, this);
138    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
139  }
140
141  
142/**
143   * Removed the render information with the given index from the list.
144   * The removed object is returned. It is the responsibility of the calling
145   * code to delete the object.
146   * If the index is not valid, <code>null</code> is returned.
147   */ public
148 LocalRenderInformation removeLocalRenderInformation(long index) {
149    long cPtr = libsbmlJNI.RenderLayoutPlugin_removeLocalRenderInformation__SWIG_0(swigCPtr, this, index);
150    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
151  }
152
153  
154/**
155   * Removed the render information with the given <code>id</code> from the list.
156   * The removed object is returned. It is the responsibility of the calling
157   * code to delete the object.
158   * If an object with the given <code>id</code> does not exist, <code>null</code> is returned.
159   */ public
160 LocalRenderInformation removeLocalRenderInformation(String id) {
161    long cPtr = libsbmlJNI.RenderLayoutPlugin_removeLocalRenderInformation__SWIG_1(swigCPtr, this, id);
162    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
163  }
164
165  
166/** * @internal */ public
167 SBase createObject(XMLInputStream stream) {
168  return libsbml.DowncastSBase(libsbmlJNI.RenderLayoutPlugin_createObject(swigCPtr, this, XMLInputStream.getCPtr(stream), stream), false);
169}
170
171  
172/** * @internal */ public
173 void writeAttributes(XMLOutputStream stream) {
174    libsbmlJNI.RenderLayoutPlugin_writeAttributes(swigCPtr, this, XMLOutputStream.getCPtr(stream), stream);
175  }
176
177  
178/** * @internal */ public
179 boolean hasRequiredElements() {
180    return libsbmlJNI.RenderLayoutPlugin_hasRequiredElements(swigCPtr, this);
181  }
182
183  
184/** * @internal */ public
185 void connectToParent(SBase sbase) {
186    libsbmlJNI.RenderLayoutPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase);
187  }
188
189  
190/** * @internal */ public
191 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
192    libsbmlJNI.RenderLayoutPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
193  }
194
195}