15 using System.Collections;
17 public class SatHelper : global::System.IDisposable {
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal SatHelper(global::System.IntPtr cPtr,
bool cMemoryOwn) {
23 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SatHelper obj) {
27 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 global::System.GC.SuppressFinalize(
this);
39 protected virtual void Dispose(
bool disposing) {
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
46 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
52 byte[] tmp =
new byte[4];
54 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
55 int size = System.BitConverter.ToInt32(tmp, 0);
56 byte[] buf =
new byte[size + 4];
57 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
60 Google.Protobuf.CodedInputStream input =
61 new Google.Protobuf.CodedInputStream(buf, 4, size);
65 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
66 throw new System.Exception(
67 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
72 byte[] tmp =
new byte[4];
74 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
75 int size = System.BitConverter.ToInt32(tmp, 0);
76 byte[] buf =
new byte[size + 4];
77 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
80 Google.Protobuf.CodedInputStream input =
81 new Google.Protobuf.CodedInputStream(buf, 4, size);
85 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
86 throw new System.Exception(
87 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
92 byte[] tmp =
new byte[4];
94 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
95 int size = System.BitConverter.ToInt32(tmp, 0);
96 byte[] buf =
new byte[size + 4];
97 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
100 Google.Protobuf.CodedInputStream input =
101 new Google.Protobuf.CodedInputStream(buf, 4, size);
105 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
106 throw new System.Exception(
107 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");