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 011/** 012 * <span class="pkg-marker pkg-color-comp"><a href="group__comp.html">comp</a></span> 013 A convenience subclass of “comp” package 014 * {@link SBase}-derived classes 015 <p> 016 * The {@link CompBase} class derives from {@link SBase}, and defines a few functions 017 * and features common to all {@link SBase}-derived classes in the SBML Level 3 018 * 'Hierarchical Model Composition' package 019 * (“comp”). 020 */ 021 022public class CompBase extends SBase { 023 private long swigCPtr; 024 025 protected CompBase(long cPtr, boolean cMemoryOwn) 026 { 027 super(libsbmlJNI.CompBase_SWIGUpcast(cPtr), cMemoryOwn); 028 swigCPtr = cPtr; 029 } 030 031 protected static long getCPtr(CompBase obj) 032 { 033 return (obj == null) ? 0 : obj.swigCPtr; 034 } 035 036 protected static long getCPtrAndDisown (CompBase obj) 037 { 038 long ptr = 0; 039 040 if (obj != null) 041 { 042 ptr = obj.swigCPtr; 043 obj.swigCMemOwn = false; 044 } 045 046 return ptr; 047 } 048 049 protected void finalize() { 050 delete(); 051 } 052 053 public synchronized void delete() { 054 if (swigCPtr != 0) { 055 if (swigCMemOwn) { 056 swigCMemOwn = false; 057 libsbmlJNI.delete_CompBase(swigCPtr); 058 } 059 swigCPtr = 0; 060 } 061 super.delete(); 062 } 063 064 065/** 066 * Returns the XML namespace (URI) of the package extension 067 * of this object. 068 <p> 069 * @return the URI of the package extension of this plugin object. 070 */ public 071 String getPackageURI() { 072 return libsbmlJNI.CompBase_getPackageURI(swigCPtr, this); 073 } 074 075 076/** 077 * Returns the package name of this plugin object. 078 <p> 079 * @return the package name of this plugin object. 080 */ public 081 String getPackageName() { 082 return libsbmlJNI.CompBase_getPackageName(swigCPtr, this); 083 } 084 085 086/** 087 * Returns the package version of the package extension of 088 * this plugin object. 089 <p> 090 * @return the package version of the package extension of 091 * this plugin object. 092 */ public 093 long getPackageVersion() { 094 return libsbmlJNI.CompBase_getPackageVersion(swigCPtr, this); 095 } 096 097 098/** 099 * Returns the {@link Model} object to which the referenced child object belongs. 100 */ public 101 static Model getParentModel(SBase child) { 102 long cPtr = libsbmlJNI.CompBase_getParentModel(SBase.getCPtr(child), child); 103 return (cPtr == 0) ? null : new Model(cPtr, false); 104 } 105 106}