Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
PropagationBaseObject.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.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
9package com.google.ortools.constraintsolver;
10
17public class PropagationBaseObject extends BaseObject {
18 private transient long swigCPtr;
19
20 protected PropagationBaseObject(long cPtr, boolean cMemoryOwn) {
21 super(mainJNI.PropagationBaseObject_SWIGUpcast(cPtr), cMemoryOwn);
22 swigCPtr = cPtr;
23 }
24
25 protected static long getCPtr(PropagationBaseObject obj) {
26 return (obj == null) ? 0 : obj.swigCPtr;
27 }
28
29 protected static long swigRelease(PropagationBaseObject obj) {
30 long ptr = 0;
31 if (obj != null) {
32 if (!obj.swigCMemOwn)
33 throw new RuntimeException("Cannot release ownership as memory is not owned");
34 ptr = obj.swigCPtr;
35 obj.swigCMemOwn = false;
36 obj.delete();
37 }
38 return ptr;
39 }
40
41 @SuppressWarnings({"deprecation", "removal"})
42 protected void finalize() {
43 delete();
44 }
45
46 public synchronized void delete() {
47 if (swigCPtr != 0) {
48 if (swigCMemOwn) {
49 swigCMemOwn = false;
50 mainJNI.delete_PropagationBaseObject(swigCPtr);
51 }
52 swigCPtr = 0;
53 }
54 super.delete();
55 }
56
58 this(mainJNI.new_PropagationBaseObject(Solver.getCPtr(s), s), true);
59 }
60
61 public String toString() {
62 return mainJNI.PropagationBaseObject_toString(swigCPtr, this);
63 }
64
65 public Solver solver() {
66 long cPtr = mainJNI.PropagationBaseObject_solver(swigCPtr, this);
67 return (cPtr == 0) ? null : new Solver(cPtr, false);
68 }
69
74 public void freezeQueue() {
75 mainJNI.PropagationBaseObject_freezeQueue(swigCPtr, this);
76 }
77
82 public void unfreezeQueue() {
83 mainJNI.PropagationBaseObject_unfreezeQueue(swigCPtr, this);
84 }
85
91 public void enqueueDelayedDemon(Demon d) {
92 mainJNI.PropagationBaseObject_enqueueDelayedDemon(swigCPtr, this, Demon.getCPtr(d), d);
93 }
94
95 public void enqueueVar(Demon d) {
96 mainJNI.PropagationBaseObject_enqueueVar(swigCPtr, this, Demon.getCPtr(d), d);
97 }
98
102 public void reset_action_on_fail() {
103 mainJNI.PropagationBaseObject_reset_action_on_fail(swigCPtr, this);
104 }
105
110 mainJNI.PropagationBaseObject_set_variable_to_clean_on_fail(swigCPtr, this, IntVar.getCPtr(v), v);
111 }
112
116 public String name() {
117 return mainJNI.PropagationBaseObject_name(swigCPtr, this);
118 }
119
120 public void setName(String name) {
121 mainJNI.PropagationBaseObject_setName(swigCPtr, this, name);
122 }
123
127 public boolean hasName() {
128 return mainJNI.PropagationBaseObject_hasName(swigCPtr, this);
129 }
130
134 public String baseName() {
135 return mainJNI.PropagationBaseObject_baseName(swigCPtr, this);
136 }
137
138}