Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
IntVarElement.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (https://www.swig.org).
5// Version 4.2.1
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
13using System;
14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
17
18public partial class IntVarElement : AssignmentElement {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal IntVarElement(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.IntVarElement_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IntVarElement obj) {
26 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 }
28
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(IntVarElement obj) {
30 if (obj != null) {
31 if (!obj.swigCMemOwn)
32 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn = false;
35 obj.Dispose();
36 return ptr;
37 } else {
38 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
39 }
40 }
41
42 protected override void Dispose(bool disposing) {
43 lock(this) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
45 if (swigCMemOwn) {
46 swigCMemOwn = false;
48 }
49 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
50 }
51 base.Dispose(disposing);
52 }
53 }
54
55 public IntVarElement() : this(operations_research_constraint_solverPINVOKE.new_IntVarElement__SWIG_0(), true) {
56 }
58 public IntVarElement(IntVar var) : this(operations_research_constraint_solverPINVOKE.new_IntVarElement__SWIG_1(IntVar.getCPtr(var)), true) {
59 }
61 public void Reset(IntVar var) {
63 }
64
65 public IntVarElement Clone() {
66 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVarElement_Clone(swigCPtr);
67 IntVarElement ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVarElement(cPtr, false);
68 return ret;
69 }
70
71 public void Copy(IntVarElement element) {
77 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVarElement_Var(swigCPtr);
78 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
79 return ret;
80 }
81
82 public void Store() {
84 }
85
86 public void Restore() {
88 }
89
90 public long Min() {
92 return ret;
93 }
94
95 public void SetMin(long m) {
97 }
98
99 public long Max() {
101 return ret;
102 }
103
104 public void SetMax(long m) {
107
108 public long Value() {
110 return ret;
111 }
112
113 public bool Bound() {
115 return ret;
116 }
117
118 public void SetRange(long l, long u) {
121
122 public void SetValue(long v) {
125
126 public string ToString() {
128 return ret;
129 }
130
131}
132
133}
static void IntVarElement_SetMin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntVarElement_Restore(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntVarElement_Max(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVarElement_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool IntVarElement_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVarElement_SetValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long IntVarElement_Min(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVarElement_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static void IntVarElement_SetMax(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntVarElement_Store(global::System.Runtime.InteropServices.HandleRef jarg1)
static string IntVarElement_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVarElement_Clone(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVarElement_Reset(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long IntVarElement_Value(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_IntVarElement(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVarElement_Copy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)