22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
DecisionBuilder obj) {
26 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(
DecisionBuilder obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
42 protected override void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
51 base.Dispose(disposing);
55 public DecisionBuilder() : this(operations_research_constraint_solverPINVOKE.new_DecisionBuilder(), true) {
56 SwigDirectorConnect();
61 Decision ret = (cPtr == global::System.IntPtr.Zero) ?
null : new
Decision(cPtr, false);
70 public void SetName(
string name) {
80 private void SwigDirectorConnect() {
81 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
83 if (SwigDerivedClassHasMethod(
"NextWrapper", swigMethodTypes1))
88 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
89 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
90 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
91 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
92 if (methodInfo.DeclaringType ==
null)
95 if (methodInfo.Name != methodName)
98 var parameters = methodInfo.GetParameters();
99 if (parameters.Length != methodTypes.Length)
102 bool parametersMatch =
true;
103 for (var i = 0; i < parameters.Length; i++) {
104 if (parameters[i].ParameterType != methodTypes[i]) {
105 parametersMatch =
false;
110 if (!parametersMatch)
113 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(
DecisionBuilder))) &&
114 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
122 private string SwigDirectorMethodToString() {
126 private global::System.IntPtr SwigDirectorMethodNextWrapper(global::System.IntPtr s) {
127 return Decision.getCPtr(
NextWrapper((s == global::System.IntPtr.Zero) ?
null :
new Solver(s,
false))).Handle;
136 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
137 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Solver) };