22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
Demon 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(
Demon 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 Demon() : this(operations_research_constraint_solverPINVOKE.new_Demon(), true) {
56 SwigDirectorConnect();
81 private void SwigDirectorConnect() {
82 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
84 if (SwigDerivedClassHasMethod(
"RunWrapper", swigMethodTypes1))
86 if (SwigDerivedClassHasMethod(
"Priority", swigMethodTypes2))
91 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
92 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
93 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
94 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
95 if (methodInfo.DeclaringType ==
null)
98 if (methodInfo.Name != methodName)
101 var parameters = methodInfo.GetParameters();
102 if (parameters.Length != methodTypes.Length)
105 bool parametersMatch =
true;
106 for (var i = 0; i < parameters.Length; i++) {
107 if (parameters[i].ParameterType != methodTypes[i]) {
108 parametersMatch =
false;
113 if (!parametersMatch)
116 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(
Demon))) &&
117 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
125 private string SwigDirectorMethodToString() {
129 private void SwigDirectorMethodRunWrapper(global::System.IntPtr s) {
130 RunWrapper((s == global::System.IntPtr.Zero) ?
null :
new Solver(s,
false));
133 private int SwigDirectorMethodPriority() {
145 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
146 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Solver) };
147 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { };