DotNet Reference

.Net Reference

IntVar.cs
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 4.0.2
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
12 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
18 public partial class IntVar : IntExpr {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal IntVar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.IntVar_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IntVar obj) {
26  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27  }
28 
29  protected override void Dispose(bool disposing) {
30  lock(this) {
31  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32  if (swigCMemOwn) {
33  swigCMemOwn = false;
35  }
36  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37  }
38  base.Dispose(disposing);
39  }
40  }
41 
42  // Keep reference to delegate to avoid GC to collect them early
43  private List<VoidToVoid> closureCallbacks;
44  private VoidToVoid StoreVoidToVoid(VoidToVoid closure) {
45  if (closureCallbacks == null)
46  closureCallbacks = new List<VoidToVoid>();
47  closureCallbacks.Add(closure);
48  return closure;
49  }
50 
51  public override bool IsVar() {
53  return ret;
54  }
55 
56  public override IntVar Var() {
58  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
59  return ret;
60  }
61 
62  public virtual long Value() {
64  return ret;
65  }
66 
67  public virtual void RemoveValue(long v) {
70  }
71 
72  public virtual void RemoveInterval(long l, long u) {
74  }
75 
76  public virtual void RemoveValues( long[] values) {
77  operations_research_constraint_solverPINVOKE.IntVar_RemoveValues(swigCPtr, values.Length, values );
79  }
80 
81  public virtual void SetValues( long[] values) {
82  operations_research_constraint_solverPINVOKE.IntVar_SetValues(swigCPtr, values.Length, values );
83  }
84 
85  public virtual void WhenBound(Demon d) {
87  }
88 
89  public void WhenBound( VoidToVoid closure) {
91  }
92 
93  public virtual void WhenDomain(Demon d) {
95  }
96 
97  public void WhenDomain( VoidToVoid closure) {
99  }
100 
101  public virtual ulong Size() {
103  return ret;
104  }
105 
106  public virtual bool Contains(long v) {
108  return ret;
109  }
110 
111  public virtual long OldMin() {
113  return ret;
114  }
115 
116  public virtual long OldMax() {
118  return ret;
119  }
120 
121  public virtual int VarType() {
123  return ret;
124  }
125 
126  public override void Accept(ModelVisitor visitor) {
128  }
129 
130  public virtual new IntVar IsEqual(long constant) {
132  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
133  return ret;
134  }
135 
136  public virtual new IntVar IsDifferent(long constant) {
138  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
139  return ret;
140  }
141 
142  public virtual new IntVar IsGreaterOrEqual(long constant) {
144  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
145  return ret;
146  }
147 
148  public virtual new IntVar IsLessOrEqual(long constant) {
150  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
151  return ret;
152  }
153 
154  public int Index() {
156  return ret;
157  }
158 
161  IntVarIterator ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVarIterator(cPtr, false);
162  return ret;
163  }
164 
167  IntVarIterator ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVarIterator(cPtr, false);
168  return ret;
169  }
170 
171 }
172 
173 }
static global::System.IntPtr IntVar_IsLessOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntVar_GetHoles(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void SetValues(long[] values)
Definition: IntVar.cs:81
override void Dispose(bool disposing)
Definition: IntVar.cs:29
Definition: IntVar.cs:18
virtual new IntVar IsDifferent(long constant)
Definition: IntVar.cs:136
virtual new IntVar IsEqual(long constant)
Definition: IntVar.cs:130
void WhenDomain(VoidToVoid closure)
Definition: IntVar.cs:97
static void IntVar_WhenBound__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntVar_RemoveInterval(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
virtual void RemoveValues(long[] values)
Definition: IntVar.cs:76
virtual long Value()
Definition: IntVar.cs:62
virtual long OldMax()
Definition: IntVar.cs:116
void WhenBound(VoidToVoid closure)
Definition: IntVar.cs:89
static void IntVar_SetValues(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
Definition: Demon.cs:18
static global::System.IntPtr IntVar_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
delegate void VoidToVoid()
virtual void WhenBound(Demon d)
Definition: IntVar.cs:85
static bool Pending
virtual int VarType()
Definition: IntVar.cs:121
static void IntVar_RemoveValues(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
override void Accept(ModelVisitor visitor)
Definition: IntVar.cs:126
static void IntVar_RemoveValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_IntVar(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: ModelVisitor.cs:18
static void IntVar_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
using System
Definition: Program.cs:14
static global::System.IntPtr IntVar_IsGreaterOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool IntVar_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual long OldMin()
Definition: IntVar.cs:111
override IntVar Var()
Definition: IntVar.cs:56
static long IntVar_Value(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVar_IsDifferent(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntVar_SWIGUpcast(global::System.IntPtr jarg1)
virtual bool Contains(long v)
Definition: IntVar.cs:106
static global::System.IntPtr IntVar_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
bool swigCMemOwn
Definition: BaseObject.cs:20
virtual void RemoveInterval(long l, long u)
Definition: IntVar.cs:72
virtual void RemoveValue(long v)
Definition: IntVar.cs:67
virtual new IntVar IsLessOrEqual(long constant)
Definition: IntVar.cs:148
IntVarIterator GetHoles()
Definition: IntVar.cs:165
static void IntVar_WhenBound__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static int IntVar_VarType(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntVar_OldMin(global::System.Runtime.InteropServices.HandleRef jarg1)
override bool IsVar()
Definition: IntVar.cs:51
IntVarIterator GetDomain()
Definition: IntVar.cs:159
virtual void WhenDomain(Demon d)
Definition: IntVar.cs:93
static void IntVar_WhenDomain__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int IntVar_Index(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.Exception Retrieve()
virtual new IntVar IsGreaterOrEqual(long constant)
Definition: IntVar.cs:142
static ulong IntVar_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
int Index()
Definition: IntVar.cs:154
static void IntVar_WhenDomain__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static long IntVar_OldMax(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual ulong Size()
Definition: IntVar.cs:101
static bool IntVar_IsVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVar_GetDomain(global::System.Runtime.InteropServices.HandleRef jarg1)