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 FbcSpeciesPlugin extends SBasePlugin { 012 private long swigCPtr; 013 014 protected FbcSpeciesPlugin(long cPtr, boolean cMemoryOwn) 015 { 016 super(libsbmlJNI.FbcSpeciesPlugin_SWIGUpcast(cPtr), cMemoryOwn); 017 swigCPtr = cPtr; 018 } 019 020 protected static long getCPtr(FbcSpeciesPlugin obj) 021 { 022 return (obj == null) ? 0 : obj.swigCPtr; 023 } 024 025 protected static long getCPtrAndDisown (FbcSpeciesPlugin 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_FbcSpeciesPlugin(swigCPtr); 047 } 048 swigCPtr = 0; 049 } 050 super.delete(); 051 } 052 053 public FbcSpeciesPlugin(String uri, String prefix, FbcPkgNamespaces fbcns) { 054 this(libsbmlJNI.new_FbcSpeciesPlugin__SWIG_0(uri, prefix, FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 055 } 056 057 public FbcSpeciesPlugin(FbcSpeciesPlugin orig) { 058 this(libsbmlJNI.new_FbcSpeciesPlugin__SWIG_1(FbcSpeciesPlugin.getCPtr(orig), orig), true); 059 } 060 061 062/** 063 * Creates and returns a deep copy of this {@link SBasePlugin} object. 064 * <p> 065 * @return a (deep) copy of this {@link SBase} object 066 */ public 067 SBasePlugin cloneObject() { 068 long cPtr = libsbmlJNI.FbcSpeciesPlugin_cloneObject(swigCPtr, this); 069 return (cPtr == 0) ? null : new FbcSpeciesPlugin(cPtr, true); 070 } 071 072 public boolean isSetCharge() { 073 return libsbmlJNI.FbcSpeciesPlugin_isSetCharge(swigCPtr, this); 074 } 075 076 public int setCharge(int charge) { 077 return libsbmlJNI.FbcSpeciesPlugin_setCharge(swigCPtr, this, charge); 078 } 079 080 public int getCharge() { 081 return libsbmlJNI.FbcSpeciesPlugin_getCharge(swigCPtr, this); 082 } 083 084 public int unsetCharge() { 085 return libsbmlJNI.FbcSpeciesPlugin_unsetCharge(swigCPtr, this); 086 } 087 088 public boolean isSetChemicalFormula() { 089 return libsbmlJNI.FbcSpeciesPlugin_isSetChemicalFormula(swigCPtr, this); 090 } 091 092 public int setChemicalFormula(String chemicalFormula) { 093 return libsbmlJNI.FbcSpeciesPlugin_setChemicalFormula(swigCPtr, this, chemicalFormula); 094 } 095 096 public String getChemicalFormula() { 097 return libsbmlJNI.FbcSpeciesPlugin_getChemicalFormula(swigCPtr, this); 098 } 099 100 public int unsetChemicalFormula() { 101 return libsbmlJNI.FbcSpeciesPlugin_unsetChemicalFormula(swigCPtr, this); 102 } 103 104 105/** 106 * Sets the parent SBML object of this plugin object to 107 * this object and child elements (if any). 108 * (Creates a child-parent relationship by this plugin object) 109 * <p> 110 * This function is called when this object is created by 111 * the parent element. 112 * Subclasses must override this this function if they have one 113 * or more child elements. Also, {@link SBasePlugin#connectToParent(SBase sbase)} 114 * must be called in the overridden function. 115 * <p> 116 * @param sbase the {@link SBase} object to use 117 * <p> 118 * @see setSBMLDocument 119 * @see enablePackageInternal 120 * @internal 121 */ public 122 void connectToParent(SBase sbase) { 123 libsbmlJNI.FbcSpeciesPlugin_connectToParent(swigCPtr, this, SBase.getCPtr(sbase), sbase); 124 } 125 126 127/** 128 * Enables/Disables the given package with child elements in this plugin 129 * object (if any). 130 * (This is an internal implementation invoked from 131 * {@link SBase#enablePackageInternal()} function) 132 * <p> 133 * Subclasses which contain one or more {@link SBase} derived elements should 134 * override this function if elements defined in them can be extended by 135 * some other package extension. 136 * <p> 137 * @see setSBMLDocument 138 * @see connectToParent 139 * @internal 140 */ public 141 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 142 libsbmlJNI.FbcSpeciesPlugin_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 143 } 144 145}