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 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
41 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
43 global::System.GC.SuppressFinalize(
this);
48 byte[] tmp =
new byte[4];
50 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
51 int size = System.BitConverter.ToInt32(tmp, 0);
52 byte[] buf =
new byte[size + 4];
53 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
56 Google.Protobuf.CodedInputStream input =
57 new Google.Protobuf.CodedInputStream(buf, 4, size);
61 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
62 throw new System.Exception(
63 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
68 byte[] tmp =
new byte[4];
70 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
71 int size = System.BitConverter.ToInt32(tmp, 0);
72 byte[] buf =
new byte[size + 4];
73 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
76 Google.Protobuf.CodedInputStream input =
77 new Google.Protobuf.CodedInputStream(buf, 4, size);
81 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
82 throw new System.Exception(
83 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
88 byte[] tmp =
new byte[4];
90 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
91 int size = System.BitConverter.ToInt32(tmp, 0);
92 byte[] buf =
new byte[size + 4];
93 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
96 Google.Protobuf.CodedInputStream input =
97 new Google.Protobuf.CodedInputStream(buf, 4, size);
101 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
102 throw new System.Exception(
103 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");