/* ---------------------------------------------------------------------------- * 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 IBaseHistogram implements hep.aida.IBaseHistogram { private long swigCPtr; protected boolean swigCMemOwn; public IBaseHistogram(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IBaseHistogram obj) { if (obj instanceof IBaseHistogram) { return (obj == null) ? 0 : ((IBaseHistogram)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IBaseHistogram(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IBaseHistogram_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IBaseHistogram(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IBaseHistogram_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IBaseHistogram_change_ownership(this, swigCPtr, true); } public String title() { return AIDAJNI.IBaseHistogram_title(swigCPtr, this); } public void setTitle(String title) { AIDAJNI.IBaseHistogram_setTitle(swigCPtr, this, title); } public hep.aida.IAnnotation annotation() { return new IAnnotation(AIDAJNI.IBaseHistogram_annotation(swigCPtr, this), false); } public int dimension() { return AIDAJNI.IBaseHistogram_dimension(swigCPtr, this); } public void reset() { AIDAJNI.IBaseHistogram_reset(swigCPtr, this); } public int entries() { return AIDAJNI.IBaseHistogram_entries(swigCPtr, this); } public IBaseHistogram() { this(AIDAJNI.new_IBaseHistogram(), true); AIDAJNI.IBaseHistogram_director_connect(this, swigCPtr, swigCMemOwn, true); } }