001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.8
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/** * @internal */ public
082 boolean hasRequiredElements() {
083    return libsbmlJNI.RenderListOfLayoutsPlugin_hasRequiredElements(swigCPtr, this);
084  }
085
086  
087/** * @internal */ public
088 int appendFrom(Model model) {
089    return libsbmlJNI.RenderListOfLayoutsPlugin_appendFrom(swigCPtr, this, Model.getCPtr(model), model);
090  }
091
092  
093/**
094   * Returns a pointer to the list object that contains local render information.
095   */ public
096 ListOfGlobalRenderInformation getListOfGlobalRenderInformation() {
097    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getListOfGlobalRenderInformation__SWIG_0(swigCPtr, this);
098    return (cPtr == 0) ? null : new ListOfGlobalRenderInformation(cPtr, false);
099  }
100
101  
102/**
103   * Returns the number of local render information objects.
104   */ public
105 long getNumGlobalRenderInformationObjects() {
106    return libsbmlJNI.RenderListOfLayoutsPlugin_getNumGlobalRenderInformationObjects(swigCPtr, this);
107  }
108
109  
110/**
111   * Returns a pointer to the local render information object with the given
112   * index.
113   * If the index is invalid, <code>null</code> is returned.
114   */ public
115 GlobalRenderInformation getRenderInformation(long index) {
116    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getRenderInformation__SWIG_0(swigCPtr, this, index);
117    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
118  }
119
120  
121/**
122   * Returns a pointer to the local render information object with the given
123   * id.
124   * If no object with the given <code>id</code> exists, <code>null</code> is returned.
125   */ public
126 GlobalRenderInformation getRenderInformation(String id) {
127    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_getRenderInformation__SWIG_2(swigCPtr, this, id);
128    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
129  }
130
131  
132/**
133   * Adds a copy of the given local render information object to the list of
134   * local render information objects.
135   * If an object with the same id exists, it is replaced.
136   */ public
137 void addGlobalRenderInformation(GlobalRenderInformation pLRI) {
138    libsbmlJNI.RenderListOfLayoutsPlugin_addGlobalRenderInformation(swigCPtr, this, GlobalRenderInformation.getCPtr(pLRI), pLRI);
139  }
140
141  
142/**
143   * Creates a new local render information object and adds it to the list.
144   * The created object does not have a id and it is the responsibility of
145   * the calling code to ensure that it gets one.
146   * For constraints on the id, please consult the render information document.
147   */ public
148 GlobalRenderInformation createGlobalRenderInformation() {
149    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_createGlobalRenderInformation(swigCPtr, this);
150    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
151  }
152
153  
154/**
155   * Removed the render information with the given index from the list.
156   * The removed object is returned. It is the responsibility of the calling
157   * code to delete the object.
158   * If the index is not valid, <code>null</code> is returned.
159   */ public
160 GlobalRenderInformation removeGlobalRenderInformation(long index) {
161    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_removeGlobalRenderInformation__SWIG_0(swigCPtr, this, index);
162    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
163  }
164
165  
166/**
167   * Removed the render information with the given <code>id</code> from the list.
168   * The removed object is returned. It is the responsibility of the calling
169   * code to delete the object.
170   * If an object with the given <code>id</code> does not exist, <code>null</code> is returned.
171   */ public
172 GlobalRenderInformation removeGlobalRenderInformation(String id) {
173    long cPtr = libsbmlJNI.RenderListOfLayoutsPlugin_removeGlobalRenderInformation__SWIG_1(swigCPtr, this, id);
174    return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false);
175  }
176
177  
178/** * @internal */ public
179 void connectToParent(SBase sbase) {
180    libsbmlJNI.RenderListOfLayoutsPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase);
181  }
182
183  
184/** * @internal */ public
185 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
186    libsbmlJNI.RenderListOfLayoutsPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
187  }
188
189  
190/** */ public
191 void parseAnnotation() {
192    libsbmlJNI.RenderListOfLayoutsPlugin_parseAnnotation(swigCPtr, this);
193  }
194
195}