Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
TypeRequirementChecker.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 TypeRequirementChecker : TypeRegulationsChecker {
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 internal TypeRequirementChecker(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.TypeRequirementChecker_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22 }
23
24 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRequirementChecker obj) {
25 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
26 }
27
28 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(TypeRequirementChecker obj) {
29 if (obj != null) {
30 if (!obj.swigCMemOwn)
31 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
32 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
33 obj.swigCMemOwn = false;
34 obj.Dispose();
35 return ptr;
36 } else {
37 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38 }
39 }
40
41 protected override void Dispose(bool disposing) {
42 lock(this) {
43 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44 if (swigCMemOwn) {
45 swigCMemOwn = false;
47 }
48 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
49 }
50 base.Dispose(disposing);
51 }
52 }
53
54 public TypeRequirementChecker(RoutingModel model) : this(operations_research_constraint_solverPINVOKE.new_TypeRequirementChecker(RoutingModel.getCPtr(model)), true) {
55 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
56 }
57
58}
59
60}
static void delete_TypeRequirementChecker(global::System.Runtime.InteropServices.HandleRef jarg1)