DotNet Reference

.Net Reference

Demon.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
12
13using System;
14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
17
18public partial class Demon : BaseObject {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20
21 internal Demon(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.Demon_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
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;
27 }
28
29 protected override void Dispose(bool disposing) {
30 lock(this) {
31 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32 if (swigCMemOwn) {
33 swigCMemOwn = false;
35 }
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37 }
38 base.Dispose(disposing);
39 }
40 }
41
42 public Demon() : this(operations_research_constraint_solverPINVOKE.new_Demon(), true) {
43 SwigDirectorConnect();
44 }
45
46 public virtual void RunWrapper(Solver s) {
48 }
49
50 public virtual int Priority() {
51 int ret = (SwigDerivedClassHasMethod("Priority", swigMethodTypes2) ? operations_research_constraint_solverPINVOKE.Demon_PrioritySwigExplicitDemon(swigCPtr) : operations_research_constraint_solverPINVOKE.Demon_Priority(swigCPtr));
52 return ret;
53 }
54
55 public override string ToString() {
56 string ret = (SwigDerivedClassHasMethod("ToString", swigMethodTypes0) ? operations_research_constraint_solverPINVOKE.Demon_ToStringSwigExplicitDemon(swigCPtr) : operations_research_constraint_solverPINVOKE.Demon_ToString(swigCPtr));
57 return ret;
58 }
59
60 public void Inhibit(Solver s) {
62 }
63
64 public void Desinhibit(Solver s) {
66 }
67
68 private void SwigDirectorConnect() {
69 if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
70 swigDelegate0 = new SwigDelegateDemon_0(SwigDirectorMethodToString);
71 if (SwigDerivedClassHasMethod("RunWrapper", swigMethodTypes1))
72 swigDelegate1 = new SwigDelegateDemon_1(SwigDirectorMethodRunWrapper);
73 if (SwigDerivedClassHasMethod("Priority", swigMethodTypes2))
74 swigDelegate2 = new SwigDelegateDemon_2(SwigDirectorMethodPriority);
75 operations_research_constraint_solverPINVOKE.Demon_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
76 }
77
78 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
79 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
80 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(Demon));
81 return hasDerivedMethod;
82 }
83
84 private string SwigDirectorMethodToString() {
85 return ToString();
86 }
87
88 private void SwigDirectorMethodRunWrapper(global::System.IntPtr s) {
89 RunWrapper((s == global::System.IntPtr.Zero) ? null : new Solver(s, false));
90 }
91
92 private int SwigDirectorMethodPriority() {
93 return Priority();
94 }
95
96 public delegate string SwigDelegateDemon_0();
97 public delegate void SwigDelegateDemon_1(global::System.IntPtr s);
98 public delegate int SwigDelegateDemon_2();
99
100 private SwigDelegateDemon_0 swigDelegate0;
101 private SwigDelegateDemon_1 swigDelegate1;
102 private SwigDelegateDemon_2 swigDelegate2;
103
104 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
105 private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(Solver) };
106 private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
107}
108
109}
delegate void SwigDelegateDemon_1(global::System.IntPtr s)
override void Dispose(bool disposing)
Definition: Demon.cs:29
override string ToString()
Definition: Demon.cs:55
virtual void RunWrapper(Solver s)
Definition: Demon.cs:46
static int Demon_PrioritySwigExplicitDemon(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Demon_RunWrapper(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int Demon_Priority(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Demon_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, Demon.SwigDelegateDemon_0 delegate0, Demon.SwigDelegateDemon_1 delegate1, Demon.SwigDelegateDemon_2 delegate2)
static void delete_Demon(global::System.Runtime.InteropServices.HandleRef jarg1)
static string Demon_ToStringSwigExplicitDemon(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr Demon_SWIGUpcast(global::System.IntPtr jarg1)
static void Demon_Desinhibit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void Demon_Inhibit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static string Demon_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)