/* ---------------------------------------------------------------------------- * 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 IFunctionCatalog implements hep.aida.IFunctionCatalog { private long swigCPtr; protected boolean swigCMemOwn; public IFunctionCatalog(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IFunctionCatalog obj) { if (obj instanceof IFunctionCatalog) { return (obj == null) ? 0 : ((IFunctionCatalog)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IFunctionCatalog(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IFunctionCatalog_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IFunctionCatalog(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IFunctionCatalog_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IFunctionCatalog_change_ownership(this, swigCPtr, true); } public boolean add(String nameId, hep.aida.IFunction f) { return AIDAJNI.IFunctionCatalog_add__SWIG_0(swigCPtr, this, nameId, IFunction.getCPtr(f), (hep.aida.IFunction)f); } public boolean add(String nameId, String codelet) { return AIDAJNI.IFunctionCatalog_add__SWIG_1(swigCPtr, this, nameId, codelet); } public String[] list() { return AIDAJNIUtil.toStringArray(AIDAJNI.IFunctionCatalog_list(swigCPtr, this)); } public void remove(String nameId) { AIDAJNI.IFunctionCatalog_remove(swigCPtr, this, nameId); } public void storeAll(String nameOnDisk) { AIDAJNI.IFunctionCatalog_storeAll(swigCPtr, this, nameOnDisk); } public void loadAll(String nameOnDisk) { AIDAJNI.IFunctionCatalog_loadAll(swigCPtr, this, nameOnDisk); } public IFunctionCatalog() { this(AIDAJNI.new_IFunctionCatalog(), true); AIDAJNI.IFunctionCatalog_director_connect(this, swigCPtr, swigCMemOwn, true); } }