/* ----------------------------------------------------------------------------
 * 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.
 * ----------------------------------------------------------------------------- */

package org.sbml.libsbml;

/** 
 *  Methods for transform elements of SBML
 <p>
 * @internal
 */

public class SBMLTransforms {
   private long swigCPtr;
   protected boolean swigCMemOwn;

   protected SBMLTransforms(long cPtr, boolean cMemoryOwn)
   {
     swigCMemOwn = cMemoryOwn;
     swigCPtr    = cPtr;
   }

   protected static long getCPtr(SBMLTransforms obj)
   {
     return (obj == null) ? 0 : obj.swigCPtr;
   }

   protected static long getCPtrAndDisown (SBMLTransforms obj)
   {
     long ptr = 0;

     if (obj != null)
     {
       ptr             = obj.swigCPtr;
       obj.swigCMemOwn = false;
     }

     return ptr;
   }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libsbmlJNI.delete_SBMLTransforms(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  
/** * @internal */ public
 static void replaceFD(ASTNode math, FunctionDefinition fd, IdList idsToExclude) {
    libsbmlJNI.SBMLTransforms_replaceFD__SWIG_0(ASTNode.getCPtr(math), math, FunctionDefinition.getCPtr(fd), fd, IdList.getCPtr(idsToExclude), idsToExclude);
  }

  
/** * @internal */ public
 static void replaceFD(ASTNode math, FunctionDefinition fd) {
    libsbmlJNI.SBMLTransforms_replaceFD__SWIG_1(ASTNode.getCPtr(math), math, FunctionDefinition.getCPtr(fd), fd);
  }

  
/** * @internal */ public
 static void replaceFD(ASTNode math, ListOfFunctionDefinitions lofd, IdList idsToExclude) {
    libsbmlJNI.SBMLTransforms_replaceFD__SWIG_2(ASTNode.getCPtr(math), math, ListOfFunctionDefinitions.getCPtr(lofd), lofd, IdList.getCPtr(idsToExclude), idsToExclude);
  }

  
/** * @internal */ public
 static void replaceFD(ASTNode math, ListOfFunctionDefinitions lofd) {
    libsbmlJNI.SBMLTransforms_replaceFD__SWIG_3(ASTNode.getCPtr(math), math, ListOfFunctionDefinitions.getCPtr(lofd), lofd);
  }

  
/** * @internal */ public
 static boolean expandInitialAssignments(Model m) {
    return libsbmlJNI.SBMLTransforms_expandInitialAssignments(Model.getCPtr(m), m);
  }

  
/** * @internal */ public
 static double evaluateASTNode(ASTNode node, Model m) {
    return libsbmlJNI.SBMLTransforms_evaluateASTNode__SWIG_0(ASTNode.getCPtr(node), node, Model.getCPtr(m), m);
  }

  
/** * @internal */ public
 static double evaluateASTNode(ASTNode node) {
    return libsbmlJNI.SBMLTransforms_evaluateASTNode__SWIG_1(ASTNode.getCPtr(node), node);
  }

  
/** * @internal */ public
 static boolean expandL3V2InitialAssignments(Model m) {
    return libsbmlJNI.SBMLTransforms_expandL3V2InitialAssignments(Model.getCPtr(m), m);
  }

  public static IdList mapComponentValues(Model m) {
    return new IdList(libsbmlJNI.SBMLTransforms_mapComponentValues(Model.getCPtr(m), m), true);
  }

  public static void clearComponentValues() {
    libsbmlJNI.SBMLTransforms_clearComponentValues();
  }

  public static boolean nodeContainsId(ASTNode node, IdList ids) {
    return libsbmlJNI.SBMLTransforms_nodeContainsId(ASTNode.getCPtr(node), node, IdList.getCPtr(ids), ids);
  }

  public SBMLTransforms() {
    this(libsbmlJNI.new_SBMLTransforms(), true);
  }

}
