/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.31 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package hep.aida.swig; import hep.aida.jni.AIDAJNIUtil; public class IFunctionFactory implements hep.aida.IFunctionFactory { private long swigCPtr; protected boolean swigCMemOwn; public IFunctionFactory(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IFunctionFactory obj) { if (obj instanceof IFunctionFactory) { return (obj == null) ? 0 : ((IFunctionFactory)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IFunctionFactory(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IFunctionFactory_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IFunctionFactory(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IFunctionFactory_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IFunctionFactory_change_ownership(this, swigCPtr, true); } public hep.aida.IFunction createFunctionByName(String path, String model) { long cPtr = AIDAJNI.IFunctionFactory_createFunctionByName(swigCPtr, this, path, model); return (cPtr == 0) ? null : new IFunction(cPtr, false); } public hep.aida.IFunction createFunctionFromScript(String name, int dim, String valexpr, String parameters, String description, String gradexpr) { long cPtr = AIDAJNI.IFunctionFactory_createFunctionFromScript__SWIG_0(swigCPtr, this, name, dim, valexpr, parameters, description, gradexpr); return (cPtr == 0) ? null : new IFunction(cPtr, false); } public hep.aida.IFunction createFunctionFromScript(String name, int dim, String valexpr, String parameters, String description) { long cPtr = AIDAJNI.IFunctionFactory_createFunctionFromScript__SWIG_1(swigCPtr, this, name, dim, valexpr, parameters, description); return (cPtr == 0) ? null : new IFunction(cPtr, false); } public hep.aida.IFunction cloneFunction(String path, hep.aida.IFunction f) { long cPtr = AIDAJNI.IFunctionFactory_cloneFunction(swigCPtr, this, path, IFunction.getCPtr(f), (hep.aida.IFunction)f); return (cPtr == 0) ? null : new IFunction(cPtr, false); } public hep.aida.IFunctionCatalog catalog() { long cPtr = AIDAJNI.IFunctionFactory_catalog(swigCPtr, this); return (cPtr == 0) ? null : new IFunctionCatalog(cPtr, false); } public IFunctionFactory() { this(AIDAJNI.new_IFunctionFactory(), true); AIDAJNI.IFunctionFactory_director_connect(this, swigCPtr, swigCMemOwn, true); } }