22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
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;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(ChangeValue obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
42 protected override void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
51 base.Dispose(disposing);
55 public ChangeValue(IntVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_ChangeValue(IntVarVector.getCPtr(vars)), true) {
56 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
57 SwigDirectorConnect();
60 public virtual long ModifyValue(
long index,
long value) {
70 private void SwigDirectorConnect() {
71 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
73 if (SwigDerivedClassHasMethod(
"Start", swigMethodTypes1))
75 if (SwigDerivedClassHasMethod(
"Reset", swigMethodTypes2))
77 if (SwigDerivedClassHasMethod(
"HasFragments", swigMethodTypes3))
79 if (SwigDerivedClassHasMethod(
"HoldsDelta", swigMethodTypes4))
81 if (SwigDerivedClassHasMethod(
"IsIncremental", swigMethodTypes5))
83 if (SwigDerivedClassHasMethod(
"SkipUnchanged", swigMethodTypes6))
85 if (SwigDerivedClassHasMethod(
"OnStart", swigMethodTypes7))
87 if (SwigDerivedClassHasMethod(
"MakeOneNeighbor", swigMethodTypes8))
89 if (SwigDerivedClassHasMethod(
"ModifyValue", swigMethodTypes9))
91 operations_research_constraint_solverPINVOKE.
ChangeValue_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9);
94 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
95 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
96 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
97 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
98 if (methodInfo.DeclaringType ==
null)
101 if (methodInfo.Name != methodName)
104 var parameters = methodInfo.GetParameters();
105 if (parameters.Length != methodTypes.Length)
108 bool parametersMatch =
true;
109 for (var i = 0; i < parameters.Length; i++) {
110 if (parameters[i].ParameterType != methodTypes[i]) {
111 parametersMatch =
false;
116 if (!parametersMatch)
119 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(ChangeValue))) &&
120 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
128 private string SwigDirectorMethodToString() {
132 private void SwigDirectorMethodStart(global::System.IntPtr assignment) {
133 Start((assignment == global::System.IntPtr.Zero) ?
null :
new Assignment(assignment,
false));
136 private void SwigDirectorMethodReset() {
140 private bool SwigDirectorMethodHasFragments() {
144 private bool SwigDirectorMethodHoldsDelta() {
148 private bool SwigDirectorMethodIsIncremental() {
152 private bool SwigDirectorMethodSkipUnchanged(
int index) {
156 private void SwigDirectorMethodOnStart() {
160 private bool SwigDirectorMethodMakeOneNeighbor() {
164 private long SwigDirectorMethodModifyValue(
long index,
long value) {
190 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
191 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Assignment) };
192 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { };
193 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { };
194 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { };
195 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { };
196 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { typeof(
int) };
197 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { };
198 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { };
199 private static global::System.Type[] swigMethodTypes9 =
new global::System.Type[] { typeof(
long), typeof(
long) };