REG.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 package org.gecode;
00010
00018 public class REG {
00019 private long swigCPtr;
00020 protected boolean swigCMemOwn;
00021
00022 protected REG(long cPtr, boolean cMemoryOwn) {
00023 swigCMemOwn = cMemoryOwn;
00024 swigCPtr = cPtr;
00025 }
00026
00027 protected static long getCPtr(REG 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_REG(swigCPtr);
00039 }
00040 swigCPtr = 0;
00041 }
00042 public REG(REG r) {
00044 this(GecodeJNI.new_REG__SWIG_0(REG.getCPtr(r)), true);
00045 }
00046 public REG() {
00048 this(GecodeJNI.new_REG__SWIG_1(), true);
00049 }
00050 public REG(int arg0) {
00052 this(GecodeJNI.new_REG__SWIG_2(arg0), true);
00053 }
00054 public REG repeat(long n, long m) {
00056 return new REG(GecodeJNI.REG_repeat__SWIG_0(swigCPtr, n, m), true);
00057 }
00058 public REG repeat(long n) {
00060 return new REG(GecodeJNI.REG_repeat__SWIG_1(swigCPtr, n), true);
00061 }
00062 public REG alt(REG r) {
00064 return new REG(GecodeJNI.REG_alt(swigCPtr, REG.getCPtr(r)), true);
00065 }
00066 public REG conc(REG r) {
00068 return new REG(GecodeJNI.REG_conc(swigCPtr, REG.getCPtr(r)), true);
00069 }
00070 public REG repeat() {
00072 return new REG(GecodeJNI.REG_repeat__SWIG_2(swigCPtr), true);
00073 }
00074
00075 }