22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
Decision 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(
Decision 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 Decision() : this(operations_research_constraint_solverPINVOKE.new_Decision(), true) {
56 SwigDirectorConnect();
76 private void SwigDirectorConnect() {
77 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
79 if (SwigDerivedClassHasMethod(
"ApplyWrapper", swigMethodTypes1))
81 if (SwigDerivedClassHasMethod(
"RefuteWrapper", swigMethodTypes2))
83 if (SwigDerivedClassHasMethod(
"Accept", swigMethodTypes3))
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(
Decision))) &&
114 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
122 private string SwigDirectorMethodToString() {
126 private void SwigDirectorMethodApplyWrapper(global::System.IntPtr s) {
127 ApplyWrapper((s == global::System.IntPtr.Zero) ?
null :
new Solver(s,
false));
130 private void SwigDirectorMethodRefuteWrapper(global::System.IntPtr s) {
131 RefuteWrapper((s == global::System.IntPtr.Zero) ?
null :
new Solver(s,
false));
134 private void SwigDirectorMethodAccept(global::System.IntPtr visitor) {
135 Accept((visitor == global::System.IntPtr.Zero) ?
null :
new DecisionVisitor(visitor,
false));
148 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
149 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Solver) };
150 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { typeof(Solver) };
151 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { typeof(DecisionVisitor) };