1 /* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 2.0.5 4 * 5 * Do not make changes to this file unless you know what you are doing--modify 6 * the SWIG interface file instead. 7 * ----------------------------------------------------------------------------- */ 8 9 package org.xapian; 10 11 public class Chert { 12 private long swigCPtr; 13 protected boolean swigCMemOwn; 14 Chert(long cPtr, boolean cMemoryOwn)15 public Chert(long cPtr, boolean cMemoryOwn) { 16 swigCMemOwn = cMemoryOwn; 17 swigCPtr = cPtr; 18 } 19 getCPtr(Chert obj)20 public static long getCPtr(Chert obj) { 21 return (obj == null) ? 0 : obj.swigCPtr; 22 } 23 delete()24 public synchronized void delete() { 25 if (swigCPtr != 0) { 26 if (swigCMemOwn) { 27 swigCMemOwn = false; 28 throw new UnsupportedOperationException("C++ destructor does not have public access"); 29 } 30 swigCPtr = 0; 31 } 32 } 33 open(String dir)34 public static Database open(String dir) { 35 return new Database(XapianJNI.Chert_open__SWIG_0(dir), true); 36 } 37 open(String dir, int action, int block_size)38 public static WritableDatabase open(String dir, int action, int block_size) { 39 return new WritableDatabase(XapianJNI.Chert_open__SWIG_1(dir, action, block_size), true); 40 } 41 open(String dir, int action)42 public static WritableDatabase open(String dir, int action) { 43 return new WritableDatabase(XapianJNI.Chert_open__SWIG_2(dir, action), true); 44 } 45 46 } 47