19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal SolveWrapper(global::System.IntPtr cPtr,
bool cMemoryOwn) {
24 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SolveWrapper obj) {
28 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(
SolveWrapper obj) {
34 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
35 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
36 obj.swigCMemOwn =
false;
40 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
50 global::System.GC.SuppressFinalize(
this);
53 protected virtual void Dispose(
bool disposing) {
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
60 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
66 operations_research_satPINVOKE.SolveWrapper_SetStringParameters(swigCPtr, string_parameters);
92 int size = System.Runtime.InteropServices.Marshal.ReadInt32(dataPointer);
95 var data =
new System.ReadOnlySpan<
byte>((dataPointer +
sizeof(int)).ToPointer(), size);
98 }
catch (
Google.Protobuf.InvalidProtocolBufferException )
100 throw new System.Exception(
"Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
109 operations_research_satPINVOKE.SolveWrapper_StopSearch(swigCPtr);