/* ---------------------------------------------------------------------------- * 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 IAnalysisFactory extends hep.aida.IAnalysisFactory { private long swigCPtr; protected boolean swigCMemOwn; public IAnalysisFactory(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IAnalysisFactory obj) { if (obj instanceof IAnalysisFactory) { return (obj == null) ? 0 : ((IAnalysisFactory)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IAnalysisFactory(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IAnalysisFactory_director_connect(obj, cPtr, true, true); return cPtr; } } public hep.aida.IPlotterFactory createPlotterFactory() { throw new RuntimeException("IAnalysisFactory.createPlotterFactory() not implemented in C++"); } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IAnalysisFactory(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IAnalysisFactory_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IAnalysisFactory_change_ownership(this, swigCPtr, true); } public hep.aida.ITreeFactory createTreeFactory() { long cPtr = AIDAJNI.IAnalysisFactory_createTreeFactory(swigCPtr, this); return (cPtr == 0) ? null : new ITreeFactory(cPtr, false); } public hep.aida.IHistogramFactory createHistogramFactory(hep.aida.ITree tree) { long cPtr = AIDAJNI.IAnalysisFactory_createHistogramFactory(swigCPtr, this, ITree.getCPtr(tree), (hep.aida.ITree)tree); return (cPtr == 0) ? null : new IHistogramFactory(cPtr, false); } public hep.aida.IDataPointSetFactory createDataPointSetFactory(hep.aida.ITree tree) { long cPtr = AIDAJNI.IAnalysisFactory_createDataPointSetFactory(swigCPtr, this, ITree.getCPtr(tree), (hep.aida.ITree)tree); return (cPtr == 0) ? null : new IDataPointSetFactory(cPtr, false); } public hep.aida.ITupleFactory createTupleFactory(hep.aida.ITree tree) { long cPtr = AIDAJNI.IAnalysisFactory_createTupleFactory(swigCPtr, this, ITree.getCPtr(tree), (hep.aida.ITree)tree); return (cPtr == 0) ? null : new ITupleFactory(cPtr, false); } public hep.aida.IFunctionFactory createFunctionFactory(hep.aida.ITree tree) { long cPtr = AIDAJNI.IAnalysisFactory_createFunctionFactory(swigCPtr, this, ITree.getCPtr(tree), (hep.aida.ITree)tree); return (cPtr == 0) ? null : new IFunctionFactory(cPtr, false); } public hep.aida.IFitFactory createFitFactory() { long cPtr = AIDAJNI.IAnalysisFactory_createFitFactory(swigCPtr, this); return (cPtr == 0) ? null : new IFitFactory(cPtr, false); } public IAnalysisFactory() { this(AIDAJNI.new_IAnalysisFactory(), true); AIDAJNI.IAnalysisFactory_director_connect(this, swigCPtr, swigCMemOwn, true); } }