DotNet Reference

DotNet Reference

PathOperator.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.1
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 PathOperator : IntVarLocalSearchOperator {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal PathOperator(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.PathOperator_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathOperator 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  // Keep reference to delegate to avoid GC to collect them early
43  private List<LongToInt> startEmptyPathCallbacks;
44  private LongToInt StoreLongToInt(LongToInt path) {
45  if (startEmptyPathCallbacks == null)
46  startEmptyPathCallbacks = new List<LongToInt>();
47  startEmptyPathCallbacks.Add(path);
48  return path;
49  }
50 
51  public virtual bool MakeNeighbor() {
53  return ret;
54  }
55 
56  public override void Reset() {
58  }
59 
60  protected virtual new bool MakeOneNeighbor() {
62  return ret;
63  }
64 
65  protected virtual bool RestartAtPathStartOnSynchronize() {
67  return ret;
68  }
69 
70  protected virtual bool OnSamePathAsPreviousBase(long base_index) {
71  bool ret = (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes9) ? operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBase(swigCPtr, base_index));
72  return ret;
73  }
74 
75  protected virtual long GetBaseNodeRestartPosition(int base_index) {
76  long ret = (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes10) ? operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPosition(swigCPtr, base_index));
77  return ret;
78  }
79 
80  protected virtual void SetNextBaseToIncrement(long base_index) {
81  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes11)) operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, base_index); else operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrement(swigCPtr, base_index);
82  }
83 
84  protected virtual bool InitPosition() {
85  bool ret = (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes12) ? operations_research_constraint_solverPINVOKE.PathOperator_InitPositionSwigExplicitPathOperator(swigCPtr) : operations_research_constraint_solverPINVOKE.PathOperator_InitPosition(swigCPtr));
86  return ret;
87  }
88 
89  private void SwigDirectorConnect() {
90  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
91  swigDelegate0 = new SwigDelegatePathOperator_0(SwigDirectorMethodToString);
92  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
93  swigDelegate1 = new SwigDelegatePathOperator_1(SwigDirectorMethodReset);
94  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
95  swigDelegate2 = new SwigDelegatePathOperator_2(SwigDirectorMethodHasFragments);
96  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
97  swigDelegate3 = new SwigDelegatePathOperator_3(SwigDirectorMethodHoldsDelta);
98  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
99  swigDelegate4 = new SwigDelegatePathOperator_4(SwigDirectorMethodIsIncremental);
100  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes5))
101  swigDelegate5 = new SwigDelegatePathOperator_5(SwigDirectorMethodOnStart);
102  if (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6))
103  swigDelegate6 = new SwigDelegatePathOperator_6(SwigDirectorMethodMakeOneNeighbor);
104  if (SwigDerivedClassHasMethod("MakeNeighbor", swigMethodTypes7))
105  swigDelegate7 = new SwigDelegatePathOperator_7(SwigDirectorMethodMakeNeighbor);
106  if (SwigDerivedClassHasMethod("RestartAtPathStartOnSynchronize", swigMethodTypes8))
107  swigDelegate8 = new SwigDelegatePathOperator_8(SwigDirectorMethodRestartAtPathStartOnSynchronize);
108  if (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes9))
109  swigDelegate9 = new SwigDelegatePathOperator_9(SwigDirectorMethodOnSamePathAsPreviousBase);
110  if (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes10))
111  swigDelegate10 = new SwigDelegatePathOperator_10(SwigDirectorMethodGetBaseNodeRestartPosition);
112  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes11))
113  swigDelegate11 = new SwigDelegatePathOperator_11(SwigDirectorMethodSetNextBaseToIncrement);
114  if (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes12))
115  swigDelegate12 = new SwigDelegatePathOperator_12(SwigDirectorMethodInitPosition);
116  operations_research_constraint_solverPINVOKE.PathOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12);
117  }
118 
119  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
120  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);
121  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(PathOperator));
122  return hasDerivedMethod;
123  }
124 
125  private string SwigDirectorMethodToString() {
126  return ToString();
127  }
128 
129  private void SwigDirectorMethodReset() {
130  Reset();
131  }
132 
133  private bool SwigDirectorMethodHasFragments() {
134  return HasFragments();
135  }
136 
137  private bool SwigDirectorMethodHoldsDelta() {
138  return HoldsDelta();
139  }
140 
141  private bool SwigDirectorMethodIsIncremental() {
142  return IsIncremental();
143  }
144 
145  private void SwigDirectorMethodOnStart() {
146  OnStart();
147  }
148 
149  private bool SwigDirectorMethodMakeOneNeighbor() {
150  return MakeOneNeighbor();
151  }
152 
153  private bool SwigDirectorMethodMakeNeighbor() {
154  return MakeNeighbor();
155  }
156 
157  private bool SwigDirectorMethodRestartAtPathStartOnSynchronize() {
159  }
160 
161  private bool SwigDirectorMethodOnSamePathAsPreviousBase(long base_index) {
162  return OnSamePathAsPreviousBase(base_index);
163  }
164 
165  private long SwigDirectorMethodGetBaseNodeRestartPosition(int base_index) {
166  return GetBaseNodeRestartPosition(base_index);
167  }
168 
169  private void SwigDirectorMethodSetNextBaseToIncrement(long base_index) {
170  SetNextBaseToIncrement(base_index);
171  }
172 
173  private bool SwigDirectorMethodInitPosition() {
174  return InitPosition();
175  }
176 
177  public delegate string SwigDelegatePathOperator_0();
178  public delegate void SwigDelegatePathOperator_1();
179  public delegate bool SwigDelegatePathOperator_2();
180  public delegate bool SwigDelegatePathOperator_3();
181  public delegate bool SwigDelegatePathOperator_4();
182  public delegate void SwigDelegatePathOperator_5();
183  public delegate bool SwigDelegatePathOperator_6();
184  public delegate bool SwigDelegatePathOperator_7();
185  public delegate bool SwigDelegatePathOperator_8();
186  public delegate bool SwigDelegatePathOperator_9(long base_index);
187  public delegate long SwigDelegatePathOperator_10(int base_index);
188  public delegate void SwigDelegatePathOperator_11(long base_index);
189  public delegate bool SwigDelegatePathOperator_12();
190 
191  private SwigDelegatePathOperator_0 swigDelegate0;
192  private SwigDelegatePathOperator_1 swigDelegate1;
193  private SwigDelegatePathOperator_2 swigDelegate2;
194  private SwigDelegatePathOperator_3 swigDelegate3;
195  private SwigDelegatePathOperator_4 swigDelegate4;
196  private SwigDelegatePathOperator_5 swigDelegate5;
197  private SwigDelegatePathOperator_6 swigDelegate6;
198  private SwigDelegatePathOperator_7 swigDelegate7;
199  private SwigDelegatePathOperator_8 swigDelegate8;
200  private SwigDelegatePathOperator_9 swigDelegate9;
201  private SwigDelegatePathOperator_10 swigDelegate10;
202  private SwigDelegatePathOperator_11 swigDelegate11;
203  private SwigDelegatePathOperator_12 swigDelegate12;
204 
205  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
206  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
207  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
208  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
209  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
210  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
211  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
212  private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { };
213  private static global::System.Type[] swigMethodTypes8 = new global::System.Type[] { };
214  private static global::System.Type[] swigMethodTypes9 = new global::System.Type[] { typeof(long) };
215  private static global::System.Type[] swigMethodTypes10 = new global::System.Type[] { typeof(int) };
216  private static global::System.Type[] swigMethodTypes11 = new global::System.Type[] { typeof(long) };
217  private static global::System.Type[] swigMethodTypes12 = new global::System.Type[] { };
218 }
219 
220 }
static void PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
Definition: PathOperator.cs:18
override void Dispose(bool disposing)
Definition: PathOperator.cs:29
delegate int LongToInt(long t)
static bool PathOperator_MakeOneNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual long GetBaseNodeRestartPosition(int base_index)
Definition: PathOperator.cs:75
static void PathOperator_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, PathOperator.SwigDelegatePathOperator_0 delegate0, PathOperator.SwigDelegatePathOperator_1 delegate1, PathOperator.SwigDelegatePathOperator_2 delegate2, PathOperator.SwigDelegatePathOperator_3 delegate3, PathOperator.SwigDelegatePathOperator_4 delegate4, PathOperator.SwigDelegatePathOperator_5 delegate5, PathOperator.SwigDelegatePathOperator_6 delegate6, PathOperator.SwigDelegatePathOperator_7 delegate7, PathOperator.SwigDelegatePathOperator_8 delegate8, PathOperator.SwigDelegatePathOperator_9 delegate9, PathOperator.SwigDelegatePathOperator_10 delegate10, PathOperator.SwigDelegatePathOperator_11 delegate11, PathOperator.SwigDelegatePathOperator_12 delegate12)
delegate void SwigDelegatePathOperator_5()
static bool PathOperator_InitPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate bool SwigDelegatePathOperator_7()
static long PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
virtual void SetNextBaseToIncrement(long base_index)
Definition: PathOperator.cs:80
virtual bool RestartAtPathStartOnSynchronize()
Definition: PathOperator.cs:65
delegate bool SwigDelegatePathOperator_8()
Definition: Assignment.cs:11
delegate void SwigDelegatePathOperator_1()
delegate void SwigDelegatePathOperator_11(long base_index)
static void PathOperator_SetNextBaseToIncrement(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual bool InitPosition()
Definition: PathOperator.cs:84
virtual bool IsIncremental()
delegate string SwigDelegatePathOperator_0()
static bool PathOperator_OnSamePathAsPreviousBase(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_RestartAtPathStartOnSynchronize(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate bool SwigDelegatePathOperator_12()
virtual new bool MakeOneNeighbor()
Definition: PathOperator.cs:60
virtual bool OnSamePathAsPreviousBase(long base_index)
Definition: PathOperator.cs:70
delegate bool SwigDelegatePathOperator_4()
static void PathOperator_Reset(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr PathOperator_SWIGUpcast(global::System.IntPtr jarg1)
override void Reset()
Definition: PathOperator.cs:56
delegate bool SwigDelegatePathOperator_2()
bool swigCMemOwn
Definition: BaseObject.cs:20
static long PathOperator_GetBaseNodeRestartPosition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
delegate bool SwigDelegatePathOperator_9(long base_index)
static bool PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_RestartAtPathStartOnSynchronizeSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void OnStart()
static void PathOperator_ResetSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_PathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual string ToString()
Definition: BaseObject.cs:55
virtual bool HasFragments()
delegate bool SwigDelegatePathOperator_3()
virtual bool MakeNeighbor()
Definition: PathOperator.cs:51
delegate bool SwigDelegatePathOperator_6()
static bool PathOperator_MakeNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_MakeOneNeighborSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_InitPosition(global::System.Runtime.InteropServices.HandleRef jarg1)
override bool HoldsDelta()
delegate long SwigDelegatePathOperator_10(int base_index)