DotNet Reference

.Net Reference

BaseLns.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 BaseLns : IntVarLocalSearchOperator {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal BaseLns(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.BaseLns_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseLns 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 BaseLns(IntVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_BaseLns(IntVarVector.getCPtr(vars)), true) {
44  SwigDirectorConnect();
45  }
46 
47  public virtual void InitFragments() {
48  if (SwigDerivedClassHasMethod("InitFragments", swigMethodTypes5)) operations_research_constraint_solverPINVOKE.BaseLns_InitFragmentsSwigExplicitBaseLns(swigCPtr); else operations_research_constraint_solverPINVOKE.BaseLns_InitFragments(swigCPtr);
49  }
50 
51  public virtual bool NextFragment() {
53  return ret;
54  }
55 
56  public void AppendToFragment(int index) {
58  }
59 
60  public int FragmentSize() {
62  return ret;
63  }
64 
65  public override bool HasFragments() {
66  bool ret = (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2) ? operations_research_constraint_solverPINVOKE.BaseLns_HasFragmentsSwigExplicitBaseLns(swigCPtr) : operations_research_constraint_solverPINVOKE.BaseLns_HasFragments(swigCPtr));
67  return ret;
68  }
69 
70  private void SwigDirectorConnect() {
71  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
72  swigDelegate0 = new SwigDelegateBaseLns_0(SwigDirectorMethodToString);
73  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
74  swigDelegate1 = new SwigDelegateBaseLns_1(SwigDirectorMethodReset);
75  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
76  swigDelegate2 = new SwigDelegateBaseLns_2(SwigDirectorMethodHasFragments);
77  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
78  swigDelegate3 = new SwigDelegateBaseLns_3(SwigDirectorMethodHoldsDelta);
79  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
80  swigDelegate4 = new SwigDelegateBaseLns_4(SwigDirectorMethodIsIncremental);
81  if (SwigDerivedClassHasMethod("InitFragments", swigMethodTypes5))
82  swigDelegate5 = new SwigDelegateBaseLns_5(SwigDirectorMethodInitFragments);
83  if (SwigDerivedClassHasMethod("NextFragment", swigMethodTypes6))
84  swigDelegate6 = new SwigDelegateBaseLns_6(SwigDirectorMethodNextFragment);
85  operations_research_constraint_solverPINVOKE.BaseLns_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6);
86  }
87 
88  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
89  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);
90  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(BaseLns));
91  return hasDerivedMethod;
92  }
93 
94  private string SwigDirectorMethodToString() {
95  return ToString();
96  }
97 
98  private void SwigDirectorMethodReset() {
99  Reset();
100  }
101 
102  private bool SwigDirectorMethodHasFragments() {
103  return HasFragments();
104  }
105 
106  private bool SwigDirectorMethodHoldsDelta() {
107  return HoldsDelta();
108  }
109 
110  private bool SwigDirectorMethodIsIncremental() {
111  return IsIncremental();
112  }
113 
114  private void SwigDirectorMethodInitFragments() {
115  InitFragments();
116  }
117 
118  private bool SwigDirectorMethodNextFragment() {
119  return NextFragment();
120  }
121 
122  public delegate string SwigDelegateBaseLns_0();
123  public delegate void SwigDelegateBaseLns_1();
124  public delegate bool SwigDelegateBaseLns_2();
125  public delegate bool SwigDelegateBaseLns_3();
126  public delegate bool SwigDelegateBaseLns_4();
127  public delegate void SwigDelegateBaseLns_5();
128  public delegate bool SwigDelegateBaseLns_6();
129 
130  private SwigDelegateBaseLns_0 swigDelegate0;
131  private SwigDelegateBaseLns_1 swigDelegate1;
132  private SwigDelegateBaseLns_2 swigDelegate2;
133  private SwigDelegateBaseLns_3 swigDelegate3;
134  private SwigDelegateBaseLns_4 swigDelegate4;
135  private SwigDelegateBaseLns_5 swigDelegate5;
136  private SwigDelegateBaseLns_6 swigDelegate6;
137 
138  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
139  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
140  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
141  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
142  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
143  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
144  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
145 }
146 
147 }
virtual void InitFragments()
Definition: BaseLns.cs:47
void AppendToFragment(int index)
Definition: BaseLns.cs:56
static int BaseLns_FragmentSize(global::System.Runtime.InteropServices.HandleRef jarg1)
BaseLns(IntVarVector vars)
Definition: BaseLns.cs:42
delegate bool SwigDelegateBaseLns_3()
override void Dispose(bool disposing)
Definition: BaseLns.cs:29
static bool Pending
static void BaseLns_AppendToFragment(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Definition: BaseLns.cs:18
int FragmentSize()
Definition: BaseLns.cs:60
static bool BaseLns_HasFragmentsSwigExplicitBaseLns(global::System.Runtime.InteropServices.HandleRef jarg1)
using System
Definition: Program.cs:14
virtual bool IsIncremental()
delegate bool SwigDelegateBaseLns_2()
static void delete_BaseLns(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void Reset()
override bool HasFragments()
Definition: BaseLns.cs:65
virtual bool NextFragment()
Definition: BaseLns.cs:51
static void BaseLns_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, BaseLns.SwigDelegateBaseLns_0 delegate0, BaseLns.SwigDelegateBaseLns_1 delegate1, BaseLns.SwigDelegateBaseLns_2 delegate2, BaseLns.SwigDelegateBaseLns_3 delegate3, BaseLns.SwigDelegateBaseLns_4 delegate4, BaseLns.SwigDelegateBaseLns_5 delegate5, BaseLns.SwigDelegateBaseLns_6 delegate6)
delegate string SwigDelegateBaseLns_0()
bool swigCMemOwn
Definition: BaseObject.cs:20
static void BaseLns_InitFragments(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool BaseLns_NextFragment(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr BaseLns_SWIGUpcast(global::System.IntPtr jarg1)
delegate bool SwigDelegateBaseLns_6()
delegate void SwigDelegateBaseLns_5()
virtual string ToString()
Definition: BaseObject.cs:55
delegate void SwigDelegateBaseLns_1()
static global::System.Exception Retrieve()
static void BaseLns_InitFragmentsSwigExplicitBaseLns(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool BaseLns_HasFragments(global::System.Runtime.InteropServices.HandleRef jarg1)
override bool HoldsDelta()
delegate bool SwigDelegateBaseLns_4()