/* ---------------------------------------------------------------------------- * 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 IDataPointSet implements hep.aida.IDataPointSet { private long swigCPtr; protected boolean swigCMemOwn; public IDataPointSet(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IDataPointSet obj) { if (obj instanceof IDataPointSet) { return (obj == null) ? 0 : ((IDataPointSet)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IDataPointSet(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IDataPointSet_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IDataPointSet(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IDataPointSet_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IDataPointSet_change_ownership(this, swigCPtr, true); } public hep.aida.IAnnotation annotation() { return new IAnnotation(AIDAJNI.IDataPointSet_annotation(swigCPtr, this), false); } public String title() { return AIDAJNI.IDataPointSet_title(swigCPtr, this); } public void setTitle(String title) { AIDAJNI.IDataPointSet_setTitle(swigCPtr, this, title); } public int dimension() { return AIDAJNI.IDataPointSet_dimension(swigCPtr, this); } public void clear() { AIDAJNI.IDataPointSet_clear(swigCPtr, this); } public int size() { return AIDAJNI.IDataPointSet_size(swigCPtr, this); } public void setCoordinate(int coord, double[] val, double[] err) { AIDAJNI.IDataPointSet_setCoordinate__SWIG_0(swigCPtr, this, coord, val, err); } public void setCoordinate(int coord, double[] val, double[] errp, double[] errm) { AIDAJNI.IDataPointSet_setCoordinate__SWIG_1(swigCPtr, this, coord, val, errp, errm); } public hep.aida.IDataPoint point(int index) { long cPtr = AIDAJNI.IDataPointSet_point(swigCPtr, this, index); return (cPtr == 0) ? null : new IDataPoint(cPtr, false); } public hep.aida.IDataPoint addPoint() { long cPtr = AIDAJNI.IDataPointSet_addPoint__SWIG_0(swigCPtr, this); return (cPtr == 0) ? null : new IDataPoint(cPtr, false); } public void addPoint(hep.aida.IDataPoint point) { AIDAJNI.IDataPointSet_addPoint__SWIG_1(swigCPtr, this, IDataPoint.getCPtr(point), (hep.aida.IDataPoint)point); } public void removePoint(int index) { AIDAJNI.IDataPointSet_removePoint(swigCPtr, this, index); } public double lowerExtent(int coord) { return AIDAJNI.IDataPointSet_lowerExtent(swigCPtr, this, coord); } public double upperExtent(int coord) { return AIDAJNI.IDataPointSet_upperExtent(swigCPtr, this, coord); } public void scale(double scaleFactor) { AIDAJNI.IDataPointSet_scale(swigCPtr, this, scaleFactor); } public void scaleValues(double scaleFactor) { AIDAJNI.IDataPointSet_scaleValues(swigCPtr, this, scaleFactor); } public void scaleErrors(double scaleFactor) { AIDAJNI.IDataPointSet_scaleErrors(swigCPtr, this, scaleFactor); } public IDataPointSet() { this(AIDAJNI.new_IDataPointSet(), true); AIDAJNI.IDataPointSet_director_connect(this, swigCPtr, swigCMemOwn, true); } }