Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BoundCost.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;
16
17public partial class BoundCost : global::System.IDisposable {
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
19 protected bool swigCMemOwn;
20
21 internal BoundCost(global::System.IntPtr cPtr, bool cMemoryOwn) {
22 swigCMemOwn = cMemoryOwn;
23 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
24 }
25
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BoundCost obj) {
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(BoundCost obj) {
31 if (obj != null) {
32 if (!obj.swigCMemOwn)
33 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
34 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
35 obj.swigCMemOwn = false;
36 obj.Dispose();
37 return ptr;
38 } else {
39 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
40 }
41 }
42
43 ~BoundCost() {
44 Dispose(false);
45 }
46
47 public void Dispose() {
48 Dispose(true);
49 global::System.GC.SuppressFinalize(this);
50 }
51
52 protected virtual void Dispose(bool disposing) {
53 lock(this) {
54 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
55 if (swigCMemOwn) {
56 swigCMemOwn = false;
58 }
59 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60 }
61 }
62 }
63
64 public long bound {
65 set {
67 }
68 get {
70 return ret;
71 }
72 }
73
74 public long cost {
75 set {
77 }
78 get {
80 return ret;
81 }
82 }
83
84 public BoundCost() : this(operations_research_constraint_solverPINVOKE.new_BoundCost__SWIG_0(), true) {
85 }
87 public BoundCost(long bound, long cost) : this(operations_research_constraint_solverPINVOKE.new_BoundCost__SWIG_1(bound, cost), true) {
88 }
90}
91
92}
static long BoundCost_cost_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BoundCost_cost_set(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long BoundCost_bound_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BoundCost_bound_set(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_BoundCost(global::System.Runtime.InteropServices.HandleRef jarg1)