PropagationBaseObject.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
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 com.google.ortools.constraintsolver;
10 
11 public class PropagationBaseObject extends BaseObject {
12  private transient long swigCPtr;
13 
14  protected PropagationBaseObject(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.PropagationBaseObject_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(PropagationBaseObject obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  protected void finalize() {
24  delete();
25  }
26 
27  public synchronized void delete() {
28  if (swigCPtr != 0) {
29  if (swigCMemOwn) {
30  swigCMemOwn = false;
31  mainJNI.delete_PropagationBaseObject(swigCPtr);
32  }
33  swigCPtr = 0;
34  }
35  super.delete();
36  }
37 
39  this(mainJNI.new_PropagationBaseObject(Solver.getCPtr(s), s), true);
40  }
41 
42  public String toString() {
43  return mainJNI.PropagationBaseObject_toString(swigCPtr, this);
44  }
45 
46  public Solver solver() {
47  long cPtr = mainJNI.PropagationBaseObject_solver(swigCPtr, this);
48  return (cPtr == 0) ? null : new Solver(cPtr, false);
49  }
50 
51  public void freezeQueue() {
52  mainJNI.PropagationBaseObject_freezeQueue(swigCPtr, this);
53  }
54 
55  public void unfreezeQueue() {
56  mainJNI.PropagationBaseObject_unfreezeQueue(swigCPtr, this);
57  }
58 
59  public void enqueueDelayedDemon(Demon d) {
60  mainJNI.PropagationBaseObject_enqueueDelayedDemon(swigCPtr, this, Demon.getCPtr(d), d);
61  }
62 
63  public void enqueueVar(Demon d) {
64  mainJNI.PropagationBaseObject_enqueueVar(swigCPtr, this, Demon.getCPtr(d), d);
65  }
66 
67  public void reset_action_on_fail() {
68  mainJNI.PropagationBaseObject_reset_action_on_fail(swigCPtr, this);
69  }
70 
72  mainJNI.PropagationBaseObject_set_variable_to_clean_on_fail(swigCPtr, this, IntVar.getCPtr(v), v);
73  }
74 
75  public String name() {
76  return mainJNI.PropagationBaseObject_name(swigCPtr, this);
77  }
78 
79  public void setName(String name) {
80  mainJNI.PropagationBaseObject_setName(swigCPtr, this, name);
81  }
82 
83  public boolean hasName() {
84  return mainJNI.PropagationBaseObject_hasName(swigCPtr, this);
85  }
86 
87  public String baseName() {
88  return mainJNI.PropagationBaseObject_baseName(swigCPtr, this);
89  }
90 
91 }
static long getCPtr(Demon obj)
Definition: Demon.java:19
static long getCPtr(Solver obj)
Definition: Solver.java:63