Java Reference

Java Reference

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.1
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 
14 public class PropagationBaseObject extends BaseObject {
15  private transient long swigCPtr;
16 
17  protected PropagationBaseObject(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.PropagationBaseObject_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(PropagationBaseObject obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  mainJNI.delete_PropagationBaseObject(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
43  this(mainJNI.new_PropagationBaseObject(Solver.getCPtr(s), s), true);
44  }
45 
46  public String toString() {
47  return mainJNI.PropagationBaseObject_toString(swigCPtr, this);
48  }
49 
50  public Solver solver() {
51  long cPtr = mainJNI.PropagationBaseObject_solver(swigCPtr, this);
52  return (cPtr == 0) ? null : new Solver(cPtr, false);
53  }
54 
58  public void freezeQueue() {
59  mainJNI.PropagationBaseObject_freezeQueue(swigCPtr, this);
60  }
61 
65  public void unfreezeQueue() {
66  mainJNI.PropagationBaseObject_unfreezeQueue(swigCPtr, this);
67  }
68 
72  public void enqueueDelayedDemon(Demon d) {
73  mainJNI.PropagationBaseObject_enqueueDelayedDemon(swigCPtr, this, Demon.getCPtr(d), d);
74  }
75 
76  public void enqueueVar(Demon d) {
77  mainJNI.PropagationBaseObject_enqueueVar(swigCPtr, this, Demon.getCPtr(d), d);
78  }
79 
83  public void reset_action_on_fail() {
84  mainJNI.PropagationBaseObject_reset_action_on_fail(swigCPtr, this);
85  }
86 
91  mainJNI.PropagationBaseObject_set_variable_to_clean_on_fail(swigCPtr, this, IntVar.getCPtr(v), v);
92  }
93 
97  public String name() {
98  return mainJNI.PropagationBaseObject_name(swigCPtr, this);
99  }
100 
101  public void setName(String name) {
102  mainJNI.PropagationBaseObject_setName(swigCPtr, this, name);
103  }
104 
108  public boolean hasName() {
109  return mainJNI.PropagationBaseObject_hasName(swigCPtr, this);
110  }
111 
115  public String baseName() {
116  return mainJNI.PropagationBaseObject_baseName(swigCPtr, this);
117  }
118 
119 }
PropagationBaseObject(Solver s)
void freezeQueue()
This method freezes the propagation queue.
Solver solver()
void reset_action_on_fail()
This method clears the failure callback.
boolean hasName()
Returns whether the object has been named or not.
The class IntVar is a subset of IntExpr.
String toString()
void unfreezeQueue()
This method unfreezes the propagation queue.
void enqueueVar(Demon d)
void set_variable_to_clean_on_fail(IntVar v)
Shortcut for variable cleaner.
String baseName()
Returns a base name for automatic naming.
void enqueueDelayedDemon(Demon d)
This method pushes the demon onto the propagation queue.
A Demon is the base element of a propagation queue.
Definition: Demon.java:14
NOLINT The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class.
String name()
Object naming.
A BaseObject is the root of all reversibly allocated objects.
Definition: BaseObject.java:14
void setName(String name)
PropagationBaseObject(long cPtr, boolean cMemoryOwn)
Solver Class A solver represents the main computation engine.
Definition: Solver.java:57