using System;
using System.Runtime.InteropServices;
 
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.2
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------

namespace libsbmlcs {

 using System;
 using System.Runtime.InteropServices;

/** 
 * @sbmlpackage{core}
 *
@htmlinclude pkg-marker-core.html Base class for extensions that plug into AST classes.
 *
 * @htmlinclude not-sbml-warning.html
 * @internal
 */

public class ASTBasePlugin : global::System.IDisposable {
	private HandleRef swigCPtr;
	protected bool swigCMemOwn;
	
	internal ASTBasePlugin(IntPtr cPtr, bool cMemoryOwn)
	{
		swigCMemOwn = cMemoryOwn;
		swigCPtr    = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(ASTBasePlugin obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (ASTBasePlugin obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~ASTBasePlugin() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          libsbmlPINVOKE.delete_ASTBasePlugin(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public virtual string getStringFor(int type) {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getStringFor(swigCPtr, type);
    return ret;
  }

  public virtual string getConstCharFor(int type) {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getConstCharFor(swigCPtr, type);
    return ret;
  }

  public virtual string getConstCharCsymbolURLFor(int type) {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getConstCharCsymbolURLFor(swigCPtr, type);
    return ret;
  }

  public virtual int getASTNodeTypeFor(string symbol) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_getASTNodeTypeFor(swigCPtr, symbol);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual int getASTNodeTypeForCSymbolURL(string url) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_getASTNodeTypeForCSymbolURL(swigCPtr, url);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool hasCorrectNamespace(SBMLNamespaces namespaces) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_hasCorrectNamespace(swigCPtr, SBMLNamespaces.getCPtr(namespaces));
    return ret;
  }

  public virtual bool defines(int type) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_0(swigCPtr, type);
    return ret;
  }

  public virtual bool defines(string name, bool strCmpIsCaseSensitive) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_1(swigCPtr, name, strCmpIsCaseSensitive);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool defines(string name) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_defines__SWIG_2(swigCPtr, name);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool isFunction(int type) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_isFunction(swigCPtr, type);
    return ret;
  }

  public virtual SWIGTYPE_p_std__vectorT_unsigned_int_t getNumAllowedChildren(int type) {
    SWIGTYPE_p_std__vectorT_unsigned_int_t ret = new SWIGTYPE_p_std__vectorT_unsigned_int_t(libsbmlPINVOKE.ASTBasePlugin_getNumAllowedChildren(swigCPtr, type), true);
    return ret;
  }

  public virtual bool isLogical(int type) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_isLogical(swigCPtr, type);
    return ret;
  }

  public virtual bool isMathMLNodeTag(string node) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_isMathMLNodeTag__SWIG_0(swigCPtr, node);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool isMathMLNodeTag(int type) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_isMathMLNodeTag__SWIG_1(swigCPtr, type);
    return ret;
  }

  public virtual int getExtendedMathType() {
    int ret = libsbmlPINVOKE.ASTBasePlugin_getExtendedMathType(swigCPtr);
    return ret;
  }

  public virtual double evaluateASTNode(ASTNode node, Model m) {
    double ret = libsbmlPINVOKE.ASTBasePlugin_evaluateASTNode__SWIG_0(swigCPtr, ASTNode.getCPtr(node), Model.getCPtr(m));
    return ret;
  }

  public virtual double evaluateASTNode(ASTNode node) {
    double ret = libsbmlPINVOKE.ASTBasePlugin_evaluateASTNode__SWIG_1(swigCPtr, ASTNode.getCPtr(node));
    return ret;
  }

  public virtual UnitDefinition getUnitDefinitionFromPackage(SWIGTYPE_p_UnitFormulaFormatter uff, ASTNode node, bool inKL, int reactNo) {
    global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getUnitDefinitionFromPackage(swigCPtr, SWIGTYPE_p_UnitFormulaFormatter.getCPtr(uff), ASTNode.getCPtr(node), inKL, reactNo);
    UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
    return ret;
  }

  public ASTNodeValues_t getASTNodeValue(long n) {
    global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getASTNodeValue(swigCPtr, n);
    ASTNodeValues_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNodeValues_t(cPtr, false);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 int allowedInFunctionDefinition(int type) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_allowedInFunctionDefinition(swigCPtr, type);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 ASTBasePlugin clone() {
        ASTBasePlugin ret = (ASTBasePlugin) libsbml.DowncastASTBasePlugin(libsbmlPINVOKE.ASTBasePlugin_clone(swigCPtr), true);
        return ret;
}

  
/** */ /* libsbml-internal */ public
 string getElementNamespace() {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getElementNamespace(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 string getPrefix() {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getPrefix(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 string getPackageName() {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getPackageName(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 int setSBMLExtension(SBMLExtension ext) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_setSBMLExtension(swigCPtr, SBMLExtension.getCPtr(ext));
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 int setPrefix(string prefix) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_setPrefix(swigCPtr, prefix);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 void connectToParent(ASTNode astbase) {
    libsbmlPINVOKE.ASTBasePlugin_connectToParent(swigCPtr, ASTNode.getCPtr(astbase));
  }

  
/** */ /* libsbml-internal */ public new
 void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) {
    libsbmlPINVOKE.ASTBasePlugin_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  
/** */ /* libsbml-internal */ public new
 bool stripPackage(string pkgPrefix, bool flag) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_stripPackage(swigCPtr, pkgPrefix, flag);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  
/** */ /* libsbml-internal */ public
 string getURI() {
    string ret = libsbmlPINVOKE.ASTBasePlugin_getURI(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public
 ASTNode getParentASTObject() {
    global::System.IntPtr cPtr = libsbmlPINVOKE.ASTBasePlugin_getParentASTObject__SWIG_0(swigCPtr);
    ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false);
    return ret;
  }

  
/** */ /* libsbml-internal */ public
 int setElementNamespace(string uri) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_setElementNamespace(swigCPtr, uri);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  
/** */ /* libsbml-internal */ public
 long getLevel() { return (long)libsbmlPINVOKE.ASTBasePlugin_getLevel(swigCPtr); }

  
/** */ /* libsbml-internal */ public
 long getVersion() { return (long)libsbmlPINVOKE.ASTBasePlugin_getVersion(swigCPtr); }

  
/** */ /* libsbml-internal */ public
 long getPackageVersion() { return (long)libsbmlPINVOKE.ASTBasePlugin_getPackageVersion(swigCPtr); }

  
/** */ /* libsbml-internal */ public new
 SBMLNamespaces getSBMLNamespaces() {
	SBMLNamespaces ret
	    = (SBMLNamespaces) libsbml.DowncastSBMLNamespaces(libsbmlPINVOKE.ASTBasePlugin_getSBMLNamespaces(swigCPtr), false);
	return ret;
}

  
/** */ /* libsbml-internal */ public new
 void renameSIdRefs(string oldid, string newid) {
    libsbmlPINVOKE.ASTBasePlugin_renameSIdRefs(swigCPtr, oldid, newid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  
/** */ /* libsbml-internal */ public new
 void renameUnitSIdRefs(string oldid, string newid) {
    libsbmlPINVOKE.ASTBasePlugin_renameUnitSIdRefs(swigCPtr, oldid, newid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  
/** */ /* libsbml-internal */ public new
 void replaceIDWithFunction(string id, ASTNode function) {
    libsbmlPINVOKE.ASTBasePlugin_replaceIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  
/** */ /* libsbml-internal */ public new
 int checkNumArguments(ASTNode function, SWIGTYPE_p_std__stringstream error) {
    int ret = libsbmlPINVOKE.ASTBasePlugin_checkNumArguments(swigCPtr, ASTNode.getCPtr(function), SWIGTYPE_p_std__stringstream.getCPtr(error));
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 int getL3PackageInfixPrecedence() {
    int ret = libsbmlPINVOKE.ASTBasePlugin_getL3PackageInfixPrecedence(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 bool hasCorrectNumArguments(ASTNode function) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_hasCorrectNumArguments(swigCPtr, ASTNode.getCPtr(function));
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 bool hasPackageOnlyInfixSyntax() {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_hasPackageOnlyInfixSyntax(swigCPtr);
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 bool hasUnambiguousPackageInfixGrammar(ASTNode child) {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_hasUnambiguousPackageInfixGrammar(swigCPtr, ASTNode.getCPtr(child));
    return ret;
  }

  
/** */ /* libsbml-internal */ public new
 bool isPackageInfixFunction() {
    bool ret = libsbmlPINVOKE.ASTBasePlugin_isPackageInfixFunction(swigCPtr);
    return ret;
  }

}

}
