/* ----------------------------------------------------------------------------
* 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 ITree implements hep.aida.ITree {
private long swigCPtr;
protected boolean swigCMemOwn;
public ITree(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(hep.aida.ITree obj) {
if (obj instanceof ITree) {
return (obj == null) ? 0 : ((ITree)obj).swigCPtr;
} else {
long cPtr = AIDAJNI.new_ITree();
// FIXME, memory leak if Java class gets finalized, since C++ director is not freed.
AIDAJNI.ITree_director_connect(obj, cPtr, true, true);
return cPtr;
}
}
public void ls() throws IllegalArgumentException {
throw new RuntimeException("ITree.ls() not implemented in C++");
}
public void ls(String arg0) throws IllegalArgumentException {
throw new RuntimeException("ITree.ls(String) not implemented in C++");
}
public void ls(String arg0, boolean arg1) throws IllegalArgumentException {
throw new RuntimeException("ITree.ls(String, boolean) not implemented in C++");
}
public void ls(String arg0, boolean arg1, java.io.OutputStream arg2)
throws IllegalArgumentException {
throw new RuntimeException("ITree.ls(String, boolean, OutputStream) not implemented in C++");
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
AIDAJNI.delete_ITree(swigCPtr);
}
swigCPtr = 0;
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
AIDAJNI.ITree_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
AIDAJNI.ITree_change_ownership(this, swigCPtr, true);
}
public String storeName() {
return AIDAJNI.ITree_storeName(swigCPtr, this);
}
public hep.aida.IManagedObject find(String path) {
long cPtr = AIDAJNI.ITree_find(swigCPtr, this, path);
return (cPtr == 0) ? null : new IManagedObject(cPtr, false);
}
public hep.aida.ITree findTree(String path) {
long cPtr = AIDAJNI.ITree_findTree(swigCPtr, this, path);
return (cPtr == 0) ? null : new ITree(cPtr, false);
}
public void cd(String path) {
AIDAJNI.ITree_cd(swigCPtr, this, path);
}
public String pwd() {
return AIDAJNI.ITree_pwd(swigCPtr, this);
}
public String[] listObjectNames(String path, boolean recursive) {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectNames__SWIG_0(swigCPtr, this, path, recursive));
}
public String[] listObjectNames(String path) {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectNames__SWIG_1(swigCPtr, this, path));
}
public String[] listObjectNames() {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectNames__SWIG_2(swigCPtr, this));
}
public String[] listObjectTypes(String path, boolean recursive) {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectTypes__SWIG_0(swigCPtr, this, path, recursive));
}
public String[] listObjectTypes(String path) {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectTypes__SWIG_1(swigCPtr, this, path));
}
public String[] listObjectTypes() {
return AIDAJNIUtil.toStringArray(AIDAJNI.ITree_listObjectTypes__SWIG_2(swigCPtr, this));
}
public void mkdir(String path) {
AIDAJNI.ITree_mkdir(swigCPtr, this, path);
}
public void mkdirs(String path) {
AIDAJNI.ITree_mkdirs(swigCPtr, this, path);
}
public void rmdir(String path) {
AIDAJNI.ITree_rmdir(swigCPtr, this, path);
}
public void rm(String path) {
AIDAJNI.ITree_rm(swigCPtr, this, path);
}
public String findPath(hep.aida.IManagedObject object) {
return AIDAJNI.ITree_findPath(swigCPtr, this, IManagedObject.getCPtr(object), (hep.aida.IManagedObject)object);
}
public void mv(String oldPath, String newPath) {
AIDAJNI.ITree_mv(swigCPtr, this, oldPath, newPath);
}
public void commit() {
AIDAJNI.ITree_commit(swigCPtr, this);
}
public void setOverwrite(boolean overwrite) {
AIDAJNI.ITree_setOverwrite__SWIG_0(swigCPtr, this, overwrite);
}
public void setOverwrite() {
AIDAJNI.ITree_setOverwrite__SWIG_1(swigCPtr, this);
}
public void cp(String oldPath, String newPath, boolean recursive) {
AIDAJNI.ITree_cp__SWIG_0(swigCPtr, this, oldPath, newPath, recursive);
}
public void cp(String oldPath, String newPath) {
AIDAJNI.ITree_cp__SWIG_1(swigCPtr, this, oldPath, newPath);
}
public void symlink(String path, String alias) {
AIDAJNI.ITree_symlink(swigCPtr, this, path, alias);
}
public void mount(String path, hep.aida.ITree tree, String treePath) {
AIDAJNI.ITree_mount(swigCPtr, this, path, ITree.getCPtr(tree), (hep.aida.ITree)tree, treePath);
}
public void unmount(String path) {
AIDAJNI.ITree_unmount(swigCPtr, this, path);
}
public void close() {
AIDAJNI.ITree_close(swigCPtr, this);
}
public ITree() {
this(AIDAJNI.new_ITree(), true);
AIDAJNI.ITree_director_connect(this, swigCPtr, swigCMemOwn, true);
}
}