001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.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 RenderListOfLayoutsPlugin extends SBasePlugin {
012   private long swigCPtr;
013
014   protected RenderListOfLayoutsPlugin(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.RenderListOfLayoutsPlugin_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(RenderListOfLayoutsPlugin obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (RenderListOfLayoutsPlugin 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_RenderListOfLayoutsPlugin(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   * Constructor
056   */ public
057 RenderListOfLayoutsPlugin(String uri, String prefix, RenderPkgNamespaces groupsns) {
058    this(libsbmlJNI.new_RenderListOfLayoutsPlugin__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 RenderListOfLayoutsPlugin(RenderListOfLayoutsPlugin orig) {
066    this(libsbmlJNI.new_RenderListOfLayoutsPlugin__SWIG_1(RenderListOfLayoutsPlugin.getCPtr(orig), orig), true);
067  }
068
069  
070/**
071   * Creates and returns a deep copy of this RenderListOfLayoutsPlugin  object.
072   <p>
073   * @return a (deep) copy of this RenderListOfLayoutsPlugin object
074   */ public
075 SBasePlugin cloneObject() {
076    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_cloneObject(swigCPtr, this);
077    return (cPtr == 0) ? null : new RenderListOfLayoutsPlugin(cPtr, true);
078  }
079
080  
081/**
082   * Checks if this plugin object has all the required elements.
083   <p>
084   * Subclasses should override this function if they have their specific
085   * elements.
086   <p>
087   * @return true if this pugin object has all the required elements,
088   * otherwise false will be returned.
089   * @internal
090   */ public
091 boolean hasRequiredElements() {
092    return libsbmlJNI.RenderListOfLayoutsPlugin_hasRequiredElements(swigCPtr, this);
093  }
094
095  
096/** * @internal */ public
097 int appendFrom(Model model) {
098    return libsbmlJNI.RenderListOfLayoutsPlugin_appendFrom(swigCPtr, this, Model.getCPtr(model), model);
099  }
100
101  
102/**
103   * Returns a pointer to the list object that contains local render information.
104   */ public
105 ListOfGlobalRenderInformation getListOfGlobalRenderInformation() {
106    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getListOfGlobalRenderInformation__SWIG_0(swigCPtr, this);
107    return (cPtr == 0) ? null : new ListOfGlobalRenderInformation(cPtr, false);
108  }
109
110  
111/**
112   * Returns the number of local render information objects.
113   */ public
114 long getNumGlobalRenderInformationObjects() {
115    return libsbmlJNI.RenderListOfLayoutsPlugin_getNumGlobalRenderInformationObjects(swigCPtr, this);
116  }
117
118  
119/**
120   * Returns a pointer to the local render information object with the given
121   * index.
122   * If the index is invalid, <code>null</code> is returned.
123   */ public
124 GlobalRenderInformation getRenderInformation(long index) {
125    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getRenderInformation__SWIG_0(swigCPtr, this, index);
126    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
127  }
128
129  
130/**
131   * Returns a pointer to the local render information object with the given
132   * id.
133   * If no object with the given <code>id</code> exists, <code>null</code> is returned.
134   */ public
135 GlobalRenderInformation getRenderInformation(String id) {
136    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getRenderInformation__SWIG_2(swigCPtr, this, id);
137    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
138  }
139
140  
141/**
142   * Adds a copy of the given local render information object to the list of
143   * local render information objects.
144   * If an object with the same id exists, it is replaced.
145   */ public
146 void addGlobalRenderInformation(GlobalRenderInformation pLRI) {
147    libsbmlJNI.RenderListOfLayoutsPlugin_addGlobalRenderInformation(swigCPtr, this, GlobalRenderInformation.getCPtr(pLRI), pLRI);
148  }
149
150  
151/**
152   * Creates a new local render information object and adds it to the list.
153   * The created object does not have a id and it is the responsibility of
154   * the calling code to ensure that it gets one.
155   * For constraints on the id, please consult the render information document.
156   */ public
157 GlobalRenderInformation createGlobalRenderInformation() {
158    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_createGlobalRenderInformation(swigCPtr, this);
159    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
160  }
161
162  
163/**
164   * Removed the render information with the given index from the list.
165   * The removed object is returned. It is the responsibility of the calling
166   * code to delete the object.
167   * If the index is not valid, <code>null</code> is returned.
168   */ public
169 GlobalRenderInformation removeGlobalRenderInformation(long index) {
170    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_removeGlobalRenderInformation__SWIG_0(swigCPtr, this, index);
171    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
172  }
173
174  
175/**
176   * Removed the render information with the given <code>id</code> from the list.
177   * The removed object is returned. It is the responsibility of the calling
178   * code to delete the object.
179   * If an object with the given <code>id</code> does not exist, <code>null</code> is returned.
180   */ public
181 GlobalRenderInformation removeGlobalRenderInformation(String id) {
182    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_removeGlobalRenderInformation__SWIG_1(swigCPtr, this, id);
183    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
184  }
185
186  
187/**
188   * Sets the parent SBML object of this plugin object to
189   * this object and child elements (if any).
190   * (Creates a child-parent relationship by this plugin object)
191   <p>
192   * This function is called when this object is created by
193   * the parent element.
194   * Subclasses must override this this function if they have one
195   * or more child elements.Also, {@link SBasePlugin#connectToParent()}
196   * must be called in the overridden function.
197   <p>
198   * @param sbase the {@link SBase} object to use
199   <p>
200   * @see setSBMLDocument
201   * @see enablePackageInternal
202   * @internal
203   */ public
204 void connectToParent(SBase sbase) {
205    libsbmlJNI.RenderListOfLayoutsPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase);
206  }
207
208  
209/**
210   * Enables/Disables the given package with child elements in this plugin
211   * object (if any).
212   * (This is an internal implementation invoked from
213   *  {@link SBase#enablePakcageInternal()} function)
214   <p>
215   * @note Subclasses in which one or more {@link SBase} derived elements are
216   * defined must override this function.
217   <p>
218   * @see setSBMLDocument
219   * @see connectToParent
220   * @internal
221   */ public
222 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
223    libsbmlJNI.RenderListOfLayoutsPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
224  }
225
226  
227/** */ public
228 void parseAnnotation() {
229    libsbmlJNI.RenderListOfLayoutsPlugin_parseAnnotation(swigCPtr, this);
230  }
231
232}