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 3.0.12
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 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
18 public 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  ~Demon() {
30  Dispose();
31  }
32 
33  public override void Dispose() {
34  lock(this) {
35  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
36  if (swigCMemOwn) {
37  swigCMemOwn = false;
39  }
40  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41  }
42  global::System.GC.SuppressFinalize(this);
43  base.Dispose();
44  }
45  }
46 
47  public Demon() : this(operations_research_constraint_solverPINVOKE.new_Demon(), true) {
48  SwigDirectorConnect();
49  }
50 
51  public virtual void RunWrapper(Solver s) {
53  }
54 
55  public virtual int Priority() {
56  int ret = (SwigDerivedClassHasMethod("Priority", swigMethodTypes2) ? operations_research_constraint_solverPINVOKE.Demon_PrioritySwigExplicitDemon(swigCPtr) : operations_research_constraint_solverPINVOKE.Demon_Priority(swigCPtr));
57  return ret;
58  }
59 
60  public override string ToString() {
61  string ret = (SwigDerivedClassHasMethod("ToString", swigMethodTypes0) ? operations_research_constraint_solverPINVOKE.Demon_ToStringSwigExplicitDemon(swigCPtr) : operations_research_constraint_solverPINVOKE.Demon_ToString(swigCPtr));
62  return ret;
63  }
64 
65  public void Inhibit(Solver s) {
67  }
68 
69  public void Desinhibit(Solver s) {
71  }
72 
73  private void SwigDirectorConnect() {
74  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
75  swigDelegate0 = new SwigDelegateDemon_0(SwigDirectorToString);
76  if (SwigDerivedClassHasMethod("RunWrapper", swigMethodTypes1))
77  swigDelegate1 = new SwigDelegateDemon_1(SwigDirectorRunWrapper);
78  if (SwigDerivedClassHasMethod("Priority", swigMethodTypes2))
79  swigDelegate2 = new SwigDelegateDemon_2(SwigDirectorPriority);
80  operations_research_constraint_solverPINVOKE.Demon_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
81  }
82 
83  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
84  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);
85  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(Demon));
86  return hasDerivedMethod;
87  }
88 
89  private string SwigDirectorToString() {
90  return ToString();
91  }
92 
93  private void SwigDirectorRunWrapper(global::System.IntPtr s) {
94  RunWrapper((s == global::System.IntPtr.Zero) ? null : new Solver(s, false));
95  }
96 
97  private int SwigDirectorPriority() {
98  return Priority();
99  }
100 
101  public delegate string SwigDelegateDemon_0();
102  public delegate void SwigDelegateDemon_1(global::System.IntPtr s);
103  public delegate int SwigDelegateDemon_2();
104 
105  private SwigDelegateDemon_0 swigDelegate0;
106  private SwigDelegateDemon_1 swigDelegate1;
107  private SwigDelegateDemon_2 swigDelegate2;
108 
109  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
110  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(Solver) };
111  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
112 }
113 
114 }
virtual void RunWrapper(Solver s)
Definition: Demon.cs:51
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)
override string ToString()
Definition: Demon.cs:60
static void Demon_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, Demon.SwigDelegateDemon_0 delegate0, Demon.SwigDelegateDemon_1 delegate1, Demon.SwigDelegateDemon_2 delegate2)
static int Demon_Priority(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_Demon(global::System.Runtime.InteropServices.HandleRef jarg1)
static string Demon_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static int Demon_PrioritySwigExplicitDemon(global::System.Runtime.InteropServices.HandleRef jarg1)
static string Demon_ToStringSwigExplicitDemon(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Demon_Inhibit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void Demon_RunWrapper(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
delegate void SwigDelegateDemon_1(global::System.IntPtr s)