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 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 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  ~PathOperator() {
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  // Keep reference to delegate to avoid GC to collect them early
48  private List<LongToInt> startEmptyPathCallbacks;
49  private LongToInt StoreLongToInt(LongToInt path) {
50  if (startEmptyPathCallbacks == null)
51  startEmptyPathCallbacks = new List<LongToInt>();
52  startEmptyPathCallbacks.Add(path);
53  return path;
54  }
55 
56  public virtual bool MakeNeighbor() {
58  return ret;
59  }
60 
61  public override void Reset() {
63  }
64 
65  protected virtual new bool MakeOneNeighbor() {
67  return ret;
68  }
69 
70  protected virtual bool RestartAtPathStartOnSynchronize() {
72  return ret;
73  }
74 
75  protected virtual bool OnSamePathAsPreviousBase(long base_index) {
76  bool ret = (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes9) ? operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBase(swigCPtr, base_index));
77  return ret;
78  }
79 
80  protected virtual long GetBaseNodeRestartPosition(int base_index) {
81  long ret = (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes10) ? operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPosition(swigCPtr, base_index));
82  return ret;
83  }
84 
85  protected virtual void SetNextBaseToIncrement(long base_index) {
86  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes11)) operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, base_index); else operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrement(swigCPtr, base_index);
87  }
88 
89  protected virtual bool InitPosition() {
90  bool ret = (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes12) ? operations_research_constraint_solverPINVOKE.PathOperator_InitPositionSwigExplicitPathOperator(swigCPtr) : operations_research_constraint_solverPINVOKE.PathOperator_InitPosition(swigCPtr));
91  return ret;
92  }
93 
94  private void SwigDirectorConnect() {
95  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
96  swigDelegate0 = new SwigDelegatePathOperator_0(SwigDirectorToString);
97  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
98  swigDelegate1 = new SwigDelegatePathOperator_1(SwigDirectorReset);
99  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
100  swigDelegate2 = new SwigDelegatePathOperator_2(SwigDirectorHasFragments);
101  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
102  swigDelegate3 = new SwigDelegatePathOperator_3(SwigDirectorHoldsDelta);
103  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
104  swigDelegate4 = new SwigDelegatePathOperator_4(SwigDirectorIsIncremental);
105  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes5))
106  swigDelegate5 = new SwigDelegatePathOperator_5(SwigDirectorOnStart);
107  if (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6))
108  swigDelegate6 = new SwigDelegatePathOperator_6(SwigDirectorMakeOneNeighbor);
109  if (SwigDerivedClassHasMethod("MakeNeighbor", swigMethodTypes7))
110  swigDelegate7 = new SwigDelegatePathOperator_7(SwigDirectorMakeNeighbor);
111  if (SwigDerivedClassHasMethod("RestartAtPathStartOnSynchronize", swigMethodTypes8))
112  swigDelegate8 = new SwigDelegatePathOperator_8(SwigDirectorRestartAtPathStartOnSynchronize);
113  if (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes9))
114  swigDelegate9 = new SwigDelegatePathOperator_9(SwigDirectorOnSamePathAsPreviousBase);
115  if (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes10))
116  swigDelegate10 = new SwigDelegatePathOperator_10(SwigDirectorGetBaseNodeRestartPosition);
117  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes11))
118  swigDelegate11 = new SwigDelegatePathOperator_11(SwigDirectorSetNextBaseToIncrement);
119  if (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes12))
120  swigDelegate12 = new SwigDelegatePathOperator_12(SwigDirectorInitPosition);
121  operations_research_constraint_solverPINVOKE.PathOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12);
122  }
123 
124  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
125  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);
126  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(PathOperator));
127  return hasDerivedMethod;
128  }
129 
130  private string SwigDirectorToString() {
131  return ToString();
132  }
133 
134  private void SwigDirectorReset() {
135  Reset();
136  }
137 
138  private bool SwigDirectorHasFragments() {
139  return HasFragments();
140  }
141 
142  private bool SwigDirectorHoldsDelta() {
143  return HoldsDelta();
144  }
145 
146  private bool SwigDirectorIsIncremental() {
147  return IsIncremental();
148  }
149 
150  private void SwigDirectorOnStart() {
151  OnStart();
152  }
153 
154  private bool SwigDirectorMakeOneNeighbor() {
155  return MakeOneNeighbor();
156  }
157 
158  private bool SwigDirectorMakeNeighbor() {
159  return MakeNeighbor();
160  }
161 
162  private bool SwigDirectorRestartAtPathStartOnSynchronize() {
164  }
165 
166  private bool SwigDirectorOnSamePathAsPreviousBase(long base_index) {
167  return OnSamePathAsPreviousBase(base_index);
168  }
169 
170  private long SwigDirectorGetBaseNodeRestartPosition(int base_index) {
171  return GetBaseNodeRestartPosition(base_index);
172  }
173 
174  private void SwigDirectorSetNextBaseToIncrement(long base_index) {
175  SetNextBaseToIncrement(base_index);
176  }
177 
178  private bool SwigDirectorInitPosition() {
179  return InitPosition();
180  }
181 
182  public delegate string SwigDelegatePathOperator_0();
183  public delegate void SwigDelegatePathOperator_1();
184  public delegate bool SwigDelegatePathOperator_2();
185  public delegate bool SwigDelegatePathOperator_3();
186  public delegate bool SwigDelegatePathOperator_4();
187  public delegate void SwigDelegatePathOperator_5();
188  public delegate bool SwigDelegatePathOperator_6();
189  public delegate bool SwigDelegatePathOperator_7();
190  public delegate bool SwigDelegatePathOperator_8();
191  public delegate bool SwigDelegatePathOperator_9(long base_index);
192  public delegate long SwigDelegatePathOperator_10(int base_index);
193  public delegate void SwigDelegatePathOperator_11(long base_index);
194  public delegate bool SwigDelegatePathOperator_12();
195 
196  private SwigDelegatePathOperator_0 swigDelegate0;
197  private SwigDelegatePathOperator_1 swigDelegate1;
198  private SwigDelegatePathOperator_2 swigDelegate2;
199  private SwigDelegatePathOperator_3 swigDelegate3;
200  private SwigDelegatePathOperator_4 swigDelegate4;
201  private SwigDelegatePathOperator_5 swigDelegate5;
202  private SwigDelegatePathOperator_6 swigDelegate6;
203  private SwigDelegatePathOperator_7 swigDelegate7;
204  private SwigDelegatePathOperator_8 swigDelegate8;
205  private SwigDelegatePathOperator_9 swigDelegate9;
206  private SwigDelegatePathOperator_10 swigDelegate10;
207  private SwigDelegatePathOperator_11 swigDelegate11;
208  private SwigDelegatePathOperator_12 swigDelegate12;
209 
210  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
211  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
212  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
213  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
214  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
215  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
216  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
217  private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { };
218  private static global::System.Type[] swigMethodTypes8 = new global::System.Type[] { };
219  private static global::System.Type[] swigMethodTypes9 = new global::System.Type[] { typeof(long) };
220  private static global::System.Type[] swigMethodTypes10 = new global::System.Type[] { typeof(int) };
221  private static global::System.Type[] swigMethodTypes11 = new global::System.Type[] { typeof(long) };
222  private static global::System.Type[] swigMethodTypes12 = new global::System.Type[] { };
223 }
224 
225 }
static bool PathOperator_OnSamePathAsPreviousBase(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void PathOperator_Reset(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void SetNextBaseToIncrement(long base_index)
Definition: PathOperator.cs:85
static bool PathOperator_MakeOneNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr PathOperator_SWIGUpcast(global::System.IntPtr jarg1)
static bool PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_RestartAtPathStartOnSynchronizeSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_InitPosition(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_RestartAtPathStartOnSynchronize(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual long GetBaseNodeRestartPosition(int base_index)
Definition: PathOperator.cs:80
static void delete_PathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate long SwigDelegatePathOperator_10(int base_index)
delegate void SwigDelegatePathOperator_11(long base_index)
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)
static void PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
delegate bool SwigDelegatePathOperator_9(long base_index)
static bool PathOperator_InitPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PathOperator_ResetSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_MakeNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual bool OnSamePathAsPreviousBase(long base_index)
Definition: PathOperator.cs:75
static long PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long PathOperator_GetBaseNodeRestartPosition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
delegate int LongToInt(long t)
static void PathOperator_SetNextBaseToIncrement(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_MakeOneNeighborSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)