1 //------------------------------------------------------------------------------ 2 // <auto-generated /> 3 // 4 // This file was automatically generated by SWIG (http://www.swig.org). 5 // Version 4.0.2 6 // 7 // Do not make changes to this file unless you know what you are doing--modify 8 // the SWIG interface file instead. 9 //------------------------------------------------------------------------------ 10 11 namespace libsbml { 12 13 using System; 14 using System.Runtime.InteropServices; 15 16 /** 17 * @sbmlpackage{core} 18 * 19 @htmlinclude pkg-marker-core.html Base class for extensions that plug into AST classes. 20 * 21 * @htmlinclude not-sbml-warning.html 22 * @internal 23 */ 24 25 public class ASTBasePlugin : global::System.IDisposable { 26 private HandleRef swigCPtr; 27 protected bool swigCMemOwn; 28 ASTBasePlugin(IntPtr cPtr, bool cMemoryOwn)29 internal ASTBasePlugin(IntPtr cPtr, bool cMemoryOwn) 30 { 31 swigCMemOwn = cMemoryOwn; 32 swigCPtr = new HandleRef(this, cPtr); 33 } 34 getCPtr(ASTBasePlugin obj)35 internal static HandleRef getCPtr(ASTBasePlugin obj) 36 { 37 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; 38 } 39 getCPtrAndDisown(ASTBasePlugin obj)40 internal static HandleRef getCPtrAndDisown (ASTBasePlugin obj) 41 { 42 HandleRef ptr = new HandleRef(null, IntPtr.Zero); 43 44 if (obj != null) 45 { 46 ptr = obj.swigCPtr; 47 obj.swigCMemOwn = false; 48 } 49 50 return ptr; 51 } 52 ~ASTBasePlugin()53 ~ASTBasePlugin() { 54 Dispose(false); 55 } 56 Dispose()57 public void Dispose() { 58 Dispose(true); 59 global::System.GC.SuppressFinalize(this); 60 } 61 Dispose(bool disposing)62 protected virtual void Dispose(bool disposing) { 63 lock(this) { 64 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 65 if (swigCMemOwn) { 66 swigCMemOwn = false; 67 libsbmlPINVOKE.delete_ASTBasePlugin(swigCPtr); 68 } 69 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 70 } 71 } 72 } 73 getStringFor(int type)74 public virtual string getStringFor(int type) { 75 string ret = libsbmlPINVOKE.ASTBasePlugin_getStringFor(swigCPtr, type); 76 return ret; 77 } 78 getConstCharFor(int type)79 public virtual string getConstCharFor(int type) { 80 string ret = libsbmlPINVOKE.ASTBasePlugin_getConstCharFor(swigCPtr, type); 81 return ret; 82 } 83 getConstCharCsymbolURLFor(int type)84 public virtual string getConstCharCsymbolURLFor(int type) { 85 string ret = libsbmlPINVOKE.ASTBasePlugin_getConstCharCsymbolURLFor(swigCPtr, type); 86 return ret; 87 } 88 getASTNodeTypeFor(string symbol)89 public virtual int getASTNodeTypeFor(string symbol) { 90 int ret = libsbmlPINVOKE.ASTBasePlugin_getASTNodeTypeFor(swigCPtr, symbol); 91 return ret; 92 } 93 getASTNodeTypeForCSymbolURL(string url)94 public virtual int getASTNodeTypeForCSymbolURL(string url) { 95 int ret = libsbmlPINVOKE.ASTBasePlugin_getASTNodeTypeForCSymbolURL(swigCPtr, url); 96 return ret; 97 } 98 hasCorrectNamespace(SBMLNamespaces namespaces)99 public virtual bool hasCorrectNamespace(SBMLNamespaces namespaces) { 100 bool ret = libsbmlPINVOKE.ASTBasePlugin_hasCorrectNamespace(swigCPtr, SBMLNamespaces.getCPtr(namespaces)); 101 return ret; 102 } 103 defines(int type)104 public virtual bool defines(int type) { 105 bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_0(swigCPtr, type); 106 return ret; 107 } 108 defines(string name, bool strCmpIsCaseSensitive)109 public virtual bool defines(string name, bool strCmpIsCaseSensitive) { 110 bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name, strCmpIsCaseSensitive); 111 return ret; 112 } 113 defines(string name)114 public virtual bool defines(string name) { 115 bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_2(swigCPtr, name); 116 return ret; 117 } 118 isFunction(int type)119 public virtual bool isFunction(int type) { 120 bool ret = libsbmlPINVOKE.ASTBasePlugin_isFunction(swigCPtr, type); 121 return ret; 122 } 123 getNumAllowedChildren(int type)124 public virtual SWIGTYPE_p_std__vectorT_unsigned_int_t getNumAllowedChildren(int type) { 125 SWIGTYPE_p_std__vectorT_unsigned_int_t ret = new SWIGTYPE_p_std__vectorT_unsigned_int_t(libsbmlPINVOKE.ASTBasePlugin_getNumAllowedChildren(swigCPtr, type), true); 126 return ret; 127 } 128 isLogical(int type)129 public virtual bool isLogical(int type) { 130 bool ret = libsbmlPINVOKE.ASTBasePlugin_isLogical(swigCPtr, type); 131 return ret; 132 } 133 isMathMLNodeTag(string node)134 public virtual bool isMathMLNodeTag(string node) { 135 bool ret = libsbmlPINVOKE.ASTBasePlugin_isMathMLNodeTag__SWIG_0(swigCPtr, node); 136 return ret; 137 } 138 isMathMLNodeTag(int type)139 public virtual bool isMathMLNodeTag(int type) { 140 bool ret = libsbmlPINVOKE.ASTBasePlugin_isMathMLNodeTag__SWIG_1(swigCPtr, type); 141 return ret; 142 } 143 getExtendedMathType()144 public virtual int getExtendedMathType() { 145 int ret = libsbmlPINVOKE.ASTBasePlugin_getExtendedMathType(swigCPtr); 146 return ret; 147 } 148 evaluateASTNode(ASTNode node, Model m)149 public virtual double evaluateASTNode(ASTNode node, Model m) { 150 double ret = libsbmlPINVOKE.ASTBasePlugin_evaluateASTNode__SWIG_0(swigCPtr, ASTNode.getCPtr(node), Model.getCPtr(m)); 151 return ret; 152 } 153 evaluateASTNode(ASTNode node)154 public virtual double evaluateASTNode(ASTNode node) { 155 double ret = libsbmlPINVOKE.ASTBasePlugin_evaluateASTNode__SWIG_1(swigCPtr, ASTNode.getCPtr(node)); 156 return ret; 157 } 158 getUnitDefinitionFromPackage(SWIGTYPE_p_UnitFormulaFormatter uff, ASTNode node, bool inKL, int reactNo)159 public virtual UnitDefinition getUnitDefinitionFromPackage(SWIGTYPE_p_UnitFormulaFormatter uff, ASTNode node, bool inKL, int reactNo) { 160 global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getUnitDefinitionFromPackage(swigCPtr, SWIGTYPE_p_UnitFormulaFormatter.getCPtr(uff), ASTNode.getCPtr(node), inKL, reactNo); 161 UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false); 162 return ret; 163 } 164 getASTNodeValue(long n)165 public ASTNodeValues_t getASTNodeValue(long n) { 166 global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getASTNodeValue(swigCPtr, n); 167 ASTNodeValues_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNodeValues_t(cPtr, false); 168 return ret; 169 } 170 171 172 /** */ /* libsbml-internal */ public new allowedInFunctionDefinition(int type)173 int allowedInFunctionDefinition(int type) { 174 int ret = libsbmlPINVOKE.ASTBasePlugin_allowedInFunctionDefinition(swigCPtr, type); 175 return ret; 176 } 177 178 179 /** */ /* libsbml-internal */ public new clone()180 ASTBasePlugin clone() { 181 ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTBasePlugin_clone(swigCPtr), true); 182 return ret; 183 } 184 185 186 /** */ /* libsbml-internal */ public getElementNamespace()187 string getElementNamespace() { 188 string ret = libsbmlPINVOKE.ASTBasePlugin_getElementNamespace(swigCPtr); 189 return ret; 190 } 191 192 193 /** */ /* libsbml-internal */ public new getPrefix()194 string getPrefix() { 195 string ret = libsbmlPINVOKE.ASTBasePlugin_getPrefix(swigCPtr); 196 return ret; 197 } 198 199 200 /** */ /* libsbml-internal */ public new getPackageName()201 string getPackageName() { 202 string ret = libsbmlPINVOKE.ASTBasePlugin_getPackageName(swigCPtr); 203 return ret; 204 } 205 206 207 /** */ /* libsbml-internal */ public new setSBMLExtension(SBMLExtension ext)208 int setSBMLExtension(SBMLExtension ext) { 209 int ret = libsbmlPINVOKE.ASTBasePlugin_setSBMLExtension(swigCPtr, SBMLExtension.getCPtr(ext)); 210 return ret; 211 } 212 213 214 /** */ /* libsbml-internal */ public new setPrefix(string prefix)215 int setPrefix(string prefix) { 216 int ret = libsbmlPINVOKE.ASTBasePlugin_setPrefix(swigCPtr, prefix); 217 return ret; 218 } 219 220 221 /** */ /* libsbml-internal */ public new connectToParent(ASTNode astbase)222 void connectToParent(ASTNode astbase) { 223 libsbmlPINVOKE.ASTBasePlugin_connectToParent(swigCPtr, ASTNode.getCPtr(astbase)); 224 } 225 226 227 /** */ /* libsbml-internal */ public new enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)228 void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) { 229 libsbmlPINVOKE.ASTBasePlugin_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag); 230 } 231 232 233 /** */ /* libsbml-internal */ public new stripPackage(string pkgPrefix, bool flag)234 bool stripPackage(string pkgPrefix, bool flag) { 235 bool ret = libsbmlPINVOKE.ASTBasePlugin_stripPackage(swigCPtr, pkgPrefix, flag); 236 return ret; 237 } 238 239 240 /** */ /* libsbml-internal */ public getURI()241 string getURI() { 242 string ret = libsbmlPINVOKE.ASTBasePlugin_getURI(swigCPtr); 243 return ret; 244 } 245 246 247 /** */ /* libsbml-internal */ public getParentASTObject()248 ASTNode getParentASTObject() { 249 global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getParentASTObject__SWIG_0(swigCPtr); 250 ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false); 251 return ret; 252 } 253 254 255 /** */ /* libsbml-internal */ public setElementNamespace(string uri)256 int setElementNamespace(string uri) { 257 int ret = libsbmlPINVOKE.ASTBasePlugin_setElementNamespace(swigCPtr, uri); 258 return ret; 259 } 260 261 262 /** */ /* libsbml-internal */ public getLevel()263 long getLevel() { return (long)libsbmlPINVOKE.ASTBasePlugin_getLevel(swigCPtr); } 264 265 266 /** */ /* libsbml-internal */ public getVersion()267 long getVersion() { return (long)libsbmlPINVOKE.ASTBasePlugin_getVersion(swigCPtr); } 268 269 270 /** */ /* libsbml-internal */ public getPackageVersion()271 long getPackageVersion() { return (long)libsbmlPINVOKE.ASTBasePlugin_getPackageVersion(swigCPtr); } 272 273 274 /** */ /* libsbml-internal */ public new getSBMLNamespaces()275 SBMLNamespaces getSBMLNamespaces() { 276 SBMLNamespaces ret 277 = (SBMLNamespaces) libsbml.DowncastSBMLNamespaces(libsbmlPINVOKE.ASTBasePlugin_getSBMLNamespaces(swigCPtr), false); 278 return ret; 279 } 280 281 282 /** */ /* libsbml-internal */ public new renameSIdRefs(string oldid, string newid)283 void renameSIdRefs(string oldid, string newid) { 284 libsbmlPINVOKE.ASTBasePlugin_renameSIdRefs(swigCPtr, oldid, newid); 285 } 286 287 288 /** */ /* libsbml-internal */ public new renameUnitSIdRefs(string oldid, string newid)289 void renameUnitSIdRefs(string oldid, string newid) { 290 libsbmlPINVOKE.ASTBasePlugin_renameUnitSIdRefs(swigCPtr, oldid, newid); 291 } 292 293 294 /** */ /* libsbml-internal */ public new replaceIDWithFunction(string id, ASTNode function)295 void replaceIDWithFunction(string id, ASTNode function) { 296 libsbmlPINVOKE.ASTBasePlugin_replaceIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function)); 297 } 298 299 300 /** */ /* libsbml-internal */ public new checkNumArguments(ASTNode function, SWIGTYPE_p_std__stringstream error)301 int checkNumArguments(ASTNode function, SWIGTYPE_p_std__stringstream error) { 302 int ret = libsbmlPINVOKE.ASTBasePlugin_checkNumArguments(swigCPtr, ASTNode.getCPtr(function), SWIGTYPE_p_std__stringstream.getCPtr(error)); 303 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 304 return ret; 305 } 306 307 308 /** */ /* libsbml-internal */ public new getL3PackageInfixPrecedence()309 int getL3PackageInfixPrecedence() { 310 int ret = libsbmlPINVOKE.ASTBasePlugin_getL3PackageInfixPrecedence(swigCPtr); 311 return ret; 312 } 313 314 315 /** */ /* libsbml-internal */ public new hasCorrectNumArguments(ASTNode function)316 bool hasCorrectNumArguments(ASTNode function) { 317 bool ret = libsbmlPINVOKE.ASTBasePlugin_hasCorrectNumArguments(swigCPtr, ASTNode.getCPtr(function)); 318 return ret; 319 } 320 321 322 /** */ /* libsbml-internal */ public new hasPackageOnlyInfixSyntax()323 bool hasPackageOnlyInfixSyntax() { 324 bool ret = libsbmlPINVOKE.ASTBasePlugin_hasPackageOnlyInfixSyntax(swigCPtr); 325 return ret; 326 } 327 328 329 /** */ /* libsbml-internal */ public new hasUnambiguousPackageInfixGrammar(ASTNode child)330 bool hasUnambiguousPackageInfixGrammar(ASTNode child) { 331 bool ret = libsbmlPINVOKE.ASTBasePlugin_hasUnambiguousPackageInfixGrammar(swigCPtr, ASTNode.getCPtr(child)); 332 return ret; 333 } 334 335 336 /** */ /* libsbml-internal */ public new isPackageInfixFunction()337 bool isPackageInfixFunction() { 338 bool ret = libsbmlPINVOKE.ASTBasePlugin_isPackageInfixFunction(swigCPtr); 339 return ret; 340 } 341 342 } 343 344 } 345