Generated on Fri Oct 6 16:26:44 2006 for Gecode/J by doxygen 1.4.7

JavaPropagator.java

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.29
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package org.gecode;
00010 
00018 public class JavaPropagator {
00019   private long swigCPtr;
00020   protected boolean swigCMemOwn;
00021 
00022   protected JavaPropagator(long cPtr, boolean cMemoryOwn) {
00023     swigCMemOwn = cMemoryOwn;
00024     swigCPtr = cPtr;
00025   }
00026 
00027   protected static long getCPtr(JavaPropagator obj) {
00028     return (obj == null) ? 0 : obj.swigCPtr;
00029   }
00030 
00031   protected void finalize() {
00032     delete();
00033   }
00034 
00035   public void delete() {
00036     if(swigCPtr != 0 && swigCMemOwn) {
00037       swigCMemOwn = false;
00038       GecodeJNI.delete_JavaPropagator(swigCPtr);
00039     }
00040     swigCPtr = 0;
00041   }
00042 
00043   protected void swigDirectorDisconnect() {
00044     swigCMemOwn = false;
00045     delete();
00046   }
00047 
00048   public void swigReleaseOwnership() {
00049     swigCMemOwn = false;
00050     GecodeJNI.JavaPropagator_change_ownership(this, swigCPtr, false);
00051   }
00052 
00053   public void swigTakeOwnership() {
00054     swigCMemOwn = true;
00055     GecodeJNI.JavaPropagator_change_ownership(this, swigCPtr, true);
00056   }
00057 
00058    public JavaPropagator() {
00061     this(GecodeJNI.new_JavaPropagator(), true);
00062     GecodeJNI.JavaPropagator_director_connect(this, swigCPtr, swigCMemOwn, true);
00063   }
00064 
00065    public void dispose_internal(JavaSpace home) {
00068     GecodeJNI.JavaPropagator_dispose_internal(swigCPtr, JavaSpace.getCPtr(home));
00069   }
00070 
00071    public JavaPropagator copy_internal(JavaSpace home, boolean share) {
00074     long cPtr = GecodeJNI.JavaPropagator_copy_internal(swigCPtr, JavaSpace.getCPtr(home), share);
00075     return (cPtr == 0) ? null : new JavaPropagator(cPtr, false);
00076   }
00077 
00078    public ExecStatus propagate_internal(JavaSpace home) {
00081     return ExecStatus.swigToEnum(GecodeJNI.JavaPropagator_propagate_internal(swigCPtr, JavaSpace.getCPtr(home)));
00082   }
00083 
00084    public PropCost cost_internal() {
00087     return PropCost.swigToEnum(GecodeJNI.JavaPropagator_cost_internal(swigCPtr));
00088   }
00089 
00090    public ExecStatus setup_internal(JavaSpace home) {
00093     return ExecStatus.swigToEnum(GecodeJNI.JavaPropagator_setup_internal(swigCPtr, JavaSpace.getCPtr(home)));
00094   }
00095 
00096 }