/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.9
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.opensim.modeling;

public class FunctionSet extends SetFunctions {
  private long swigCPtr;

  public FunctionSet(long cPtr, boolean cMemoryOwn) {
    super(opensimModelJNI.FunctionSet_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        opensimModelJNI.delete_FunctionSet(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void adoptAndAppend(Function aFunction) {
	aFunction.markAdopted();
    adoptAndAppendImpl(aFunction);
  }

  public static FunctionSet safeDownCast(OpenSimObject obj) {
    long cPtr = opensimModelJNI.FunctionSet_safeDownCast(OpenSimObject.getCPtr(obj), obj);
    return (cPtr == 0) ? null : new FunctionSet(cPtr, false);
  }

  public void assign(OpenSimObject aObject) {
    opensimModelJNI.FunctionSet_assign(swigCPtr, this, OpenSimObject.getCPtr(aObject), aObject);
  }

  public static String getClassName() {
    return opensimModelJNI.FunctionSet_getClassName();
  }

  public OpenSimObject clone() {
    long cPtr = opensimModelJNI.FunctionSet_clone(swigCPtr, this);
    return (cPtr == 0) ? null : new FunctionSet(cPtr, false);
  }

  public String getConcreteClassName() {
    return opensimModelJNI.FunctionSet_getConcreteClassName(swigCPtr, this);
  }

  public FunctionSet() {
    this(opensimModelJNI.new_FunctionSet__SWIG_0(), true);
  }

  public FunctionSet(String aFileName) {
    this(opensimModelJNI.new_FunctionSet__SWIG_1(aFileName), true);
  }

  public double evaluate(int aIndex, int aDerivOrder, double aX) {
    return opensimModelJNI.FunctionSet_evaluate__SWIG_0(swigCPtr, this, aIndex, aDerivOrder, aX);
  }

  public double evaluate(int aIndex, int aDerivOrder) {
    return opensimModelJNI.FunctionSet_evaluate__SWIG_1(swigCPtr, this, aIndex, aDerivOrder);
  }

  public void evaluate(ArrayDouble rValues, int aDerivOrder, double aX) {
    opensimModelJNI.FunctionSet_evaluate__SWIG_2(swigCPtr, this, ArrayDouble.getCPtr(rValues), rValues, aDerivOrder, aX);
  }

  public void evaluate(ArrayDouble rValues, int aDerivOrder) {
    opensimModelJNI.FunctionSet_evaluate__SWIG_3(swigCPtr, this, ArrayDouble.getCPtr(rValues), rValues, aDerivOrder);
  }

}

@@ -1042,20 +1042,23 @@
  public 
-void
+boolean
  adoptAn
@@ -1119,16 +1119,29 @@
 );%0D%0A    
+return super.
 adoptAnd
@@ -1150,12 +1150,8 @@
 pend
-Impl
 (aFu

fix GUI build problem for FunctionSet due to previous check-in