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
011/** 
012 * container class that stores {@link LocalRenderInformation} objects.
013 <p>
014 * Layouts can contain {@link ListOfLocalRenderInformation} which holds all
015 * {@link LocalRenderInformation} objects for a certain layout.
016 */
017
018public class ListOfLocalRenderInformation extends ListOf {
019   private long swigCPtr;
020
021   protected ListOfLocalRenderInformation(long cPtr, boolean cMemoryOwn)
022   {
023     super(libsbmlJNI.ListOfLocalRenderInformation_SWIGUpcast(cPtr), cMemoryOwn);
024     swigCPtr = cPtr;
025   }
026
027   protected static long getCPtr(ListOfLocalRenderInformation obj)
028   {
029     return (obj == null) ? 0 : obj.swigCPtr;
030   }
031
032   protected static long getCPtrAndDisown (ListOfLocalRenderInformation obj)
033   {
034     long ptr = 0;
035
036     if (obj != null)
037     {
038       ptr             = obj.swigCPtr;
039       obj.swigCMemOwn = false;
040     }
041
042     return ptr;
043   }
044
045  protected void finalize() {
046    delete();
047  }
048
049  public synchronized void delete() {
050    if (swigCPtr != 0) {
051      if (swigCMemOwn) {
052        swigCMemOwn = false;
053        libsbmlJNI.delete_ListOfLocalRenderInformation(swigCPtr);
054      }
055      swigCPtr = 0;
056    }
057    super.delete();
058  }
059
060  
061/**
062   * Creates and returns a deep copy of the {@link ListOfLocalRenderInformation} object.
063   <p>
064   * @return a (deep) copy of this {@link ListOfLocalRenderInformation}
065   */ public
066 ListOfLocalRenderInformation cloneObject() {
067    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_cloneObject(swigCPtr, this);
068    return (cPtr == 0) ? null : new ListOfLocalRenderInformation(cPtr, true);
069  }
070
071  
072/**
073   * Constructor which instantiates an empty {@link ListOfLocalRenderInformation} object.
074   */ public
075 ListOfLocalRenderInformation(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
076    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_0(level, version, pkgVersion), true);
077  }
078
079  
080/**
081   * Constructor which instantiates an empty {@link ListOfLocalRenderInformation} object.
082   */ public
083 ListOfLocalRenderInformation(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
084    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_1(level, version), true);
085  }
086
087  
088/**
089   * Constructor which instantiates an empty {@link ListOfLocalRenderInformation} object.
090   */ public
091 ListOfLocalRenderInformation(long level) throws org.sbml.libsbml.SBMLConstructorException {
092    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_2(level), true);
093  }
094
095  
096/**
097   * Constructor which instantiates an empty {@link ListOfLocalRenderInformation} object.
098   */ public
099 ListOfLocalRenderInformation() throws org.sbml.libsbml.SBMLConstructorException {
100    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_3(), true);
101  }
102
103  
104/**
105   * Ctor.
106   */ public
107 ListOfLocalRenderInformation(RenderPkgNamespaces renderns) throws org.sbml.libsbml.SBMLConstructorException {
108    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_4(RenderPkgNamespaces.getCPtr(renderns), renderns), true);
109  }
110
111  
112/**
113   * Copy constructor for {@link ListOfLocalRenderInformation} objects.
114   */ public
115 ListOfLocalRenderInformation(ListOfLocalRenderInformation source) throws org.sbml.libsbml.SBMLConstructorException {
116    this(libsbmlJNI.new_ListOfLocalRenderInformation__SWIG_5(ListOfLocalRenderInformation.getCPtr(source), source), true);
117  }
118
119  
120/**
121   * Returns the XML element name of this object, which for
122   * {@link ListOfLocalRenderInformation}, is always <code>'listOfRenderInformation'.</code>
123   <p>
124   * @return the name of this element, i.e., <code>'listOfRenderInformation'.</code>
125   */ public
126 String getElementName() {
127    return libsbmlJNI.ListOfLocalRenderInformation_getElementName(swigCPtr, this);
128  }
129
130  
131/**
132   * Creates an {@link XMLNode} object from this {@link ListOfGradientDefinitions} object.
133   <p>
134   * @return the {@link XMLNode} with the XML representation for the 
135   * {@link ListOfGradientDefinitions} object.
136   */ public
137 XMLNode toXML() {
138    return new XMLNode(libsbmlJNI.ListOfLocalRenderInformation_toXML(swigCPtr, this), true);
139  }
140
141  
142/**
143   * Sets the version of the render information list.
144   * The version consists of a major and a minor version number.
145   <p>
146   * @param major major version number
147   * @param minor minor version number
148   */ public
149 void setVersion(long major, long minor) {
150    libsbmlJNI.ListOfLocalRenderInformation_setVersion(swigCPtr, this, major, minor);
151  }
152
153  
154/**
155   * Returns the major version of the render information list.
156   <p>
157   * @return the major version number of the local render information list
158   */ public
159 long getMajorVersion() {
160    return libsbmlJNI.ListOfLocalRenderInformation_getMajorVersion(swigCPtr, this);
161  }
162
163  
164/**
165   * Returns the minor version of the render information list.
166   <p>
167   * @return the minor version number of the local render information list
168   */ public
169 long getMinorVersion() {
170    return libsbmlJNI.ListOfLocalRenderInformation_getMinorVersion(swigCPtr, this);
171  }
172
173  
174/**
175  * Predicate returning <code>true</code> if this {@link ListOfLocalRenderInformation}'s
176  * 'versionMajor' attribute is set.
177  <p>
178  * @return <code>true</code> if this {@link ListOfLocalRenderInformation}'s 'versionMajor'
179  * attribute has been set, otherwise <code>false</code> is returned.
180  */ public
181 boolean isSetVersionMajor() {
182    return libsbmlJNI.ListOfLocalRenderInformation_isSetVersionMajor(swigCPtr, this);
183  }
184
185  
186/**
187  * Predicate returning <code>true</code> if this {@link ListOfLocalRenderInformation}'s
188  * 'versionMinor' attribute is set.
189  <p>
190  * @return <code>true</code> if this {@link ListOfLocalRenderInformation}'s 'versionMinor'
191  * attribute has been set, otherwise <code>false</code> is returned.
192  */ public
193 boolean isSetVersionMinor() {
194    return libsbmlJNI.ListOfLocalRenderInformation_isSetVersionMinor(swigCPtr, this);
195  }
196
197  
198/**
199  * Sets the value of the 'versionMajor' attribute of this
200  * {@link ListOfLocalRenderInformation}.
201  <p>
202  * @param versionMajor long value of the 'versionMajor' attribute to
203  * be set.
204  <p>
205  * <p>
206 * @return integer value indicating success/failure of the
207 * function.   The possible values
208 * returned by this function are:
209  * <ul>
210  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
211  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
212  * </ul>
213  */ public
214 int setVersionMajor(long versionMajor) {
215    return libsbmlJNI.ListOfLocalRenderInformation_setVersionMajor(swigCPtr, this, versionMajor);
216  }
217
218  
219/**
220  * Sets the value of the 'versionMinor' attribute of this
221  * {@link ListOfLocalRenderInformation}.
222  <p>
223  * @param versionMinor long value of the 'versionMinor' attribute to
224  * be set.
225  <p>
226  * <p>
227 * @return integer value indicating success/failure of the
228 * function.   The possible values
229 * returned by this function are:
230  * <ul>
231  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
232  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
233  * </ul>
234  */ public
235 int setVersionMinor(long versionMinor) {
236    return libsbmlJNI.ListOfLocalRenderInformation_setVersionMinor(swigCPtr, this, versionMinor);
237  }
238
239  
240/**
241  * Unsets the value of the 'versionMajor' attribute of this
242  * {@link ListOfLocalRenderInformation}.
243  <p>
244  * <p>
245 * @return integer value indicating success/failure of the
246 * function.   The possible values
247 * returned by this function are:
248  * <ul>
249  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
250  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
251  * </ul>
252  */ public
253 int unsetVersionMajor() {
254    return libsbmlJNI.ListOfLocalRenderInformation_unsetVersionMajor(swigCPtr, this);
255  }
256
257  
258/**
259  * Unsets the value of the 'versionMinor' attribute of this
260  * {@link ListOfLocalRenderInformation}.
261  <p>
262  * <p>
263 * @return integer value indicating success/failure of the
264 * function.   The possible values
265 * returned by this function are:
266  * <ul>
267  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
268  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
269  * </ul>
270  */ public
271 int unsetVersionMinor() {
272    return libsbmlJNI.ListOfLocalRenderInformation_unsetVersionMinor(swigCPtr, this);
273  }
274
275  
276/**
277   * Returns the version as a string.
278   <p>
279   * @return the version of the {@link LocalRenderInformation} object
280   * as a string
281   */ public
282 String getVersionString() {
283    return libsbmlJNI.ListOfLocalRenderInformation_getVersionString(swigCPtr, this);
284  }
285
286  
287/**
288   * Returns a pointer to the {@link LocalRenderInformation} with the given index or null if
289   * the index is invalid.
290   <p>
291   * @param i index of the {@link LocalRenderInformation} object to be returned
292   <p>
293   * @return pointer to the {@link LocalRenderInformation} at the given index or null.
294   */ public
295 SBase get(long i) {
296    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_get__SWIG_0(swigCPtr, this, i);
297    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
298  }
299
300  
301/**
302   * Returns a pointer to the {@link LocalRenderInformation} with the given <code>id</code> or <code>null</code> if
303   * the id is invalid.
304   <p>
305   * @param id id of the {@link LocalRenderInformation} object to be returned
306   <p>
307   * @return pointer to the {@link LocalRenderInformation} at the given <code>id</code> or <code>null.</code>
308   */ public
309 LocalRenderInformation get(String id) {
310    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_get__SWIG_2(swigCPtr, this, id);
311    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, false);
312  }
313
314  
315/**
316   * Removes the nth item from this {@link ListOfLocalRenderInformation} items and returns a pointer to
317   * it.
318   <p>
319   * The caller owns the returned item and is responsible for deleting it.
320   <p>
321   * @param n the index of the item to remove
322   <p>
323   * @see #size()
324   */ public
325 SBase remove(long n) {
326    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_remove__SWIG_0(swigCPtr, this, n);
327    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, true);
328  }
329
330  
331/**
332   * Removes item in this {@link ListOfLocalRenderInformation} items with the given identifier.
333   <p>
334   * The caller owns the returned item and is responsible for deleting it.
335   * If none of the items in this list have the identifier <code>sid</code>, then @c
336   * null is returned.
337   <p>
338   * @param sid the identifier of the item to remove
339   <p>
340   * @return the item removed.  As mentioned above, the caller owns the
341   * returned item.
342   */ public
343 LocalRenderInformation remove(String sid) {
344    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_remove__SWIG_1(swigCPtr, this, sid);
345    return (cPtr == 0) ? null : new LocalRenderInformation(cPtr, true);
346  }
347
348  
349/**
350   * Get the type code of the objects contained in this {@link ListOf}.
351   <p>
352   * LibSBML attaches an identifying code to every
353   * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
354   * other languages, the set of type codes is stored in an enumeration; in
355   * the Java language interface for libSBML, the type codes are defined as
356   * static integer constants in the interface class {@link
357   * libsbmlConstants}.  The names of the type codes all begin with the
358   * characters <code>SBML_.</code> 
359   <p>
360   * @return the SBML type code for the objects contained in this {@link ListOf}
361   * instance, or {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default).
362   */ public
363 int getItemTypeCode() {
364    return libsbmlJNI.ListOfLocalRenderInformation_getItemTypeCode(swigCPtr, this);
365  }
366
367  
368/** */ public
369 boolean isValidTypeForList(SBase item) {
370    return libsbmlJNI.ListOfLocalRenderInformation_isValidTypeForList(swigCPtr, this, SBase.getCPtrAndDisown(item), item);
371  }
372
373  
374/**
375  * Returns the value of the 'defaultValues' element of this
376  * {@link ListOfLocalRenderInformation}.
377  <p>
378  * @return the value of the 'defaultValues' element of this
379  * {@link ListOfLocalRenderInformation} as a {@link DefaultValues}.
380  */ public
381 DefaultValues getDefaultValues() {
382    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_getDefaultValues__SWIG_0(swigCPtr, this);
383    return (cPtr == 0) ? null : new DefaultValues(cPtr, false);
384  }
385
386  
387/**
388  * Predicate returning <code>true</code> if this {@link ListOfLocalRenderInformation}'s
389  * 'defaultValues' element is set.
390  <p>
391  * @return <code>true</code> if this {@link ListOfLocalRenderInformation}'s 'defaultValues'
392  * element has been set, otherwise <code>false</code> is returned.
393  */ public
394 boolean isSetDefaultValues() {
395    return libsbmlJNI.ListOfLocalRenderInformation_isSetDefaultValues(swigCPtr, this);
396  }
397
398  
399/**
400  * Sets the value of the 'defaultValues' element of this
401  * {@link ListOfLocalRenderInformation}.
402  <p>
403  * @param defaultValues {@link DefaultValues} value of the 'defaultValues' element
404  * to be set.
405  <p>
406  * <p>
407 * @return integer value indicating success/failure of the
408 * function.   The possible values
409 * returned by this function are:
410  * <ul>
411  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
412  * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
413  * </ul>
414  */ public
415 int setDefaultValues(DefaultValues defaultValues) {
416    return libsbmlJNI.ListOfLocalRenderInformation_setDefaultValues(swigCPtr, this, DefaultValues.getCPtr(defaultValues), defaultValues);
417  }
418
419  
420/**
421  * Creates a new {@link DefaultValues} object, adds it to this
422  * {@link ListOfLocalRenderInformation} object and returns the {@link DefaultValues} object
423  * created.
424  <p>
425  * @return a new {@link DefaultValues} object instance.
426  */ public
427 DefaultValues createDefaultValues() {
428    long cPtr = libsbmlJNI.ListOfLocalRenderInformation_createDefaultValues(swigCPtr, this);
429    return (cPtr == 0) ? null : new DefaultValues(cPtr, false);
430  }
431
432  
433/**
434  * Unsets the value of the 'defaultValues' element of this
435  * {@link ListOfLocalRenderInformation}.
436  <p>
437  * <p>
438 * @return integer value indicating success/failure of the
439 * function.   The possible values
440 * returned by this function are:
441  * <ul>
442  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
443  * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
444  * </ul>
445  */ public
446 int unsetDefaultValues() {
447    return libsbmlJNI.ListOfLocalRenderInformation_unsetDefaultValues(swigCPtr, this);
448  }
449
450  
451/** * @internal */ public
452 void connectToChild() {
453    libsbmlJNI.ListOfLocalRenderInformation_connectToChild(swigCPtr, this);
454  }
455
456}