DotNet Reference

.Net Reference

ChangeValue.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 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
18 public partial class ChangeValue : IntVarLocalSearchOperator {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal ChangeValue(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.ChangeValue_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChangeValue 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 ChangeValue(IntVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_ChangeValue(IntVarVector.getCPtr(vars)), true) {
44  SwigDirectorConnect();
45  }
46 
47  public virtual long ModifyValue(long index, long value) {
49  return ret;
50  }
51 
52  protected virtual new bool MakeOneNeighbor() {
53  bool ret = (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6) ? operations_research_constraint_solverPINVOKE.ChangeValue_MakeOneNeighborSwigExplicitChangeValue(swigCPtr) : operations_research_constraint_solverPINVOKE.ChangeValue_MakeOneNeighbor(swigCPtr));
54  return ret;
55  }
56 
57  private void SwigDirectorConnect() {
58  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
59  swigDelegate0 = new SwigDelegateChangeValue_0(SwigDirectorMethodToString);
60  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
61  swigDelegate1 = new SwigDelegateChangeValue_1(SwigDirectorMethodReset);
62  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
63  swigDelegate2 = new SwigDelegateChangeValue_2(SwigDirectorMethodHasFragments);
64  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
65  swigDelegate3 = new SwigDelegateChangeValue_3(SwigDirectorMethodHoldsDelta);
66  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
67  swigDelegate4 = new SwigDelegateChangeValue_4(SwigDirectorMethodIsIncremental);
68  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes5))
69  swigDelegate5 = new SwigDelegateChangeValue_5(SwigDirectorMethodOnStart);
70  if (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6))
71  swigDelegate6 = new SwigDelegateChangeValue_6(SwigDirectorMethodMakeOneNeighbor);
72  if (SwigDerivedClassHasMethod("ModifyValue", swigMethodTypes7))
73  swigDelegate7 = new SwigDelegateChangeValue_7(SwigDirectorMethodModifyValue);
74  operations_research_constraint_solverPINVOKE.ChangeValue_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7);
75  }
76 
77  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
78  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);
79  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ChangeValue));
80  return hasDerivedMethod;
81  }
82 
83  private string SwigDirectorMethodToString() {
84  return ToString();
85  }
86 
87  private void SwigDirectorMethodReset() {
88  Reset();
89  }
90 
91  private bool SwigDirectorMethodHasFragments() {
92  return HasFragments();
93  }
94 
95  private bool SwigDirectorMethodHoldsDelta() {
96  return HoldsDelta();
97  }
98 
99  private bool SwigDirectorMethodIsIncremental() {
100  return IsIncremental();
101  }
102 
103  private void SwigDirectorMethodOnStart() {
104  OnStart();
105  }
106 
107  private bool SwigDirectorMethodMakeOneNeighbor() {
108  return MakeOneNeighbor();
109  }
110 
111  private long SwigDirectorMethodModifyValue(long index, long value) {
112  return ModifyValue(index, value);
113  }
114 
115  public delegate string SwigDelegateChangeValue_0();
116  public delegate void SwigDelegateChangeValue_1();
117  public delegate bool SwigDelegateChangeValue_2();
118  public delegate bool SwigDelegateChangeValue_3();
119  public delegate bool SwigDelegateChangeValue_4();
120  public delegate void SwigDelegateChangeValue_5();
121  public delegate bool SwigDelegateChangeValue_6();
122  public delegate long SwigDelegateChangeValue_7(long index, long value);
123 
124  private SwigDelegateChangeValue_0 swigDelegate0;
125  private SwigDelegateChangeValue_1 swigDelegate1;
126  private SwigDelegateChangeValue_2 swigDelegate2;
127  private SwigDelegateChangeValue_3 swigDelegate3;
128  private SwigDelegateChangeValue_4 swigDelegate4;
129  private SwigDelegateChangeValue_5 swigDelegate5;
130  private SwigDelegateChangeValue_6 swigDelegate6;
131  private SwigDelegateChangeValue_7 swigDelegate7;
132 
133  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
134  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
135  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
136  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
137  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
138  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
139  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
140  private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { typeof(long), typeof(long) };
141 }
142 
143 }
static global::System.IntPtr ChangeValue_SWIGUpcast(global::System.IntPtr jarg1)
static void delete_ChangeValue(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate bool SwigDelegateChangeValue_3()
Definition: ChangeValue.cs:18
ChangeValue(IntVarVector vars)
Definition: ChangeValue.cs:42
static bool Pending
virtual long ModifyValue(long index, long value)
Definition: ChangeValue.cs:47
delegate bool SwigDelegateChangeValue_2()
using System
Definition: Program.cs:14
virtual bool IsIncremental()
override void Dispose(bool disposing)
Definition: ChangeValue.cs:29
delegate void SwigDelegateChangeValue_5()
delegate string SwigDelegateChangeValue_0()
virtual void Reset()
delegate void SwigDelegateChangeValue_1()
static bool ChangeValue_MakeOneNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
bool swigCMemOwn
Definition: BaseObject.cs:20
delegate bool SwigDelegateChangeValue_4()
static void ChangeValue_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, ChangeValue.SwigDelegateChangeValue_0 delegate0, ChangeValue.SwigDelegateChangeValue_1 delegate1, ChangeValue.SwigDelegateChangeValue_2 delegate2, ChangeValue.SwigDelegateChangeValue_3 delegate3, ChangeValue.SwigDelegateChangeValue_4 delegate4, ChangeValue.SwigDelegateChangeValue_5 delegate5, ChangeValue.SwigDelegateChangeValue_6 delegate6, ChangeValue.SwigDelegateChangeValue_7 delegate7)
delegate long SwigDelegateChangeValue_7(long index, long value)
static bool ChangeValue_MakeOneNeighborSwigExplicitChangeValue(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void OnStart()
virtual string ToString()
Definition: BaseObject.cs:55
virtual bool HasFragments()
static global::System.Exception Retrieve()
static long ChangeValue_ModifyValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
override bool HoldsDelta()
delegate bool SwigDelegateChangeValue_6()
virtual new bool MakeOneNeighbor()
Definition: ChangeValue.cs:52