22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SymmetryBreaker 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(
SymmetryBreaker 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 SymmetryBreaker() : this(operations_research_constraint_solverPINVOKE.new_SymmetryBreaker(), true) {
56 SwigDirectorConnect();
71 private void SwigDirectorConnect() {
72 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
74 if (SwigDerivedClassHasMethod(
"VisitSetVariableValue", swigMethodTypes1))
76 if (SwigDerivedClassHasMethod(
"VisitSplitVariableDomain", swigMethodTypes2))
78 if (SwigDerivedClassHasMethod(
"VisitScheduleOrPostpone", swigMethodTypes3))
80 if (SwigDerivedClassHasMethod(
"VisitScheduleOrExpedite", swigMethodTypes4))
82 if (SwigDerivedClassHasMethod(
"VisitRankFirstInterval", swigMethodTypes5))
84 if (SwigDerivedClassHasMethod(
"VisitRankLastInterval", swigMethodTypes6))
86 if (SwigDerivedClassHasMethod(
"VisitUnknownDecision", swigMethodTypes7))
91 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
92 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
93 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
94 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
95 if (methodInfo.DeclaringType ==
null)
98 if (methodInfo.Name != methodName)
101 var parameters = methodInfo.GetParameters();
102 if (parameters.Length != methodTypes.Length)
105 bool parametersMatch =
true;
106 for (var i = 0; i < parameters.Length; i++) {
107 if (parameters[i].ParameterType != methodTypes[i]) {
108 parametersMatch =
false;
113 if (!parametersMatch)
116 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(
SymmetryBreaker))) &&
117 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
125 private string SwigDirectorMethodToString() {
129 private void SwigDirectorMethodVisitSetVariableValue(global::System.IntPtr var,
long value) {
133 private void SwigDirectorMethodVisitSplitVariableDomain(global::System.IntPtr var,
long value,
bool start_with_lower_half) {
134 VisitSplitVariableDomain((var == global::System.IntPtr.Zero) ?
null :
new IntVar(var,
false), value, start_with_lower_half);
137 private void SwigDirectorMethodVisitScheduleOrPostpone(global::System.IntPtr var,
long est) {
141 private void SwigDirectorMethodVisitScheduleOrExpedite(global::System.IntPtr var,
long est) {
145 private void SwigDirectorMethodVisitRankFirstInterval(global::System.IntPtr sequence,
int index) {
146 VisitRankFirstInterval((sequence == global::System.IntPtr.Zero) ?
null :
new SequenceVar(sequence,
false), index);
149 private void SwigDirectorMethodVisitRankLastInterval(global::System.IntPtr sequence,
int index) {
150 VisitRankLastInterval((sequence == global::System.IntPtr.Zero) ?
null :
new SequenceVar(sequence,
false), index);
153 private void SwigDirectorMethodVisitUnknownDecision() {
175 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
176 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
IntVar), typeof(
long) };
177 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { typeof(IntVar), typeof(
long), typeof(
bool) };
178 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { typeof(IntervalVar), typeof(
long) };
179 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { typeof(IntervalVar), typeof(
long) };
180 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { typeof(SequenceVar), typeof(
int) };
181 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { typeof(SequenceVar), typeof(
int) };
182 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { };