Stop.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 package org.gecode;
00010
00025 public class Stop {
00026 private long swigCPtr;
00027 protected boolean swigCMemOwn;
00028
00029 protected Stop(long cPtr, boolean cMemoryOwn) {
00030 swigCMemOwn = cMemoryOwn;
00031 swigCPtr = cPtr;
00032 }
00033
00034 protected static long getCPtr(Stop obj) {
00035 return (obj == null) ? 0 : obj.swigCPtr;
00036 }
00037
00038 protected void finalize() {
00039 delete();
00040 }
00041
00042 public void delete() {
00043 if(swigCPtr != 0 && swigCMemOwn) {
00044 swigCMemOwn = false;
00045 GecodeJNI.delete_Stop(swigCPtr);
00046 }
00047 swigCPtr = 0;
00048 }
00049
00050 protected void swigDirectorDisconnect() {
00051 swigCMemOwn = false;
00052 delete();
00053 }
00054
00055 public void swigReleaseOwnership() {
00056 swigCMemOwn = false;
00057 GecodeJNI.Stop_change_ownership(this, swigCPtr, false);
00058 }
00059
00060 public void swigTakeOwnership() {
00061 swigCMemOwn = true;
00062 GecodeJNI.Stop_change_ownership(this, swigCPtr, true);
00063 }
00064 public Stop() {
00066 this(GecodeJNI.new_Stop(), true);
00067 GecodeJNI.Stop_director_connect(this, swigCPtr, swigCMemOwn, true);
00068 }
00069 public boolean stop(Statistics s) {
00071 return GecodeJNI.Stop_stop(swigCPtr, Statistics.getCPtr(s));
00072 }
00073
00074 }