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