GLPK for C#/CLI  1.10.0
All Classes Namespaces Functions Properties Pages
glp_arc.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.8
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 
11 namespace org.gnu.glpk {
12 
13 public class glp_arc : global::System.IDisposable {
14  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15  protected bool swigCMemOwn;
16 
17  internal glp_arc(global::System.IntPtr cPtr, bool cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20  }
21 
22  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(glp_arc obj) {
23  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24  }
25 
26  ~glp_arc() {
27  Dispose();
28  }
29 
30  public virtual void Dispose() {
31  lock(this) {
32  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  GLPKPINVOKE.delete_glp_arc(swigCPtr);
36  }
37  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38  }
39  global::System.GC.SuppressFinalize(this);
40  }
41  }
42 
43  public glp_vertex tail {
44  set {
45  GLPKPINVOKE.glp_arc_tail_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_vertex.getCPtr(value)));
47  }
48  get {
49  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_tail_get(swigCPtr);
51  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_vertex(cPtr, false);
52  }
53 
54  }
55 
56  public glp_vertex head {
57  set {
58  GLPKPINVOKE.glp_arc_head_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_vertex.getCPtr(value)));
60  }
61  get {
62  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_head_get(swigCPtr);
64  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_vertex(cPtr, false);
65  }
66 
67  }
68 
69  public SWIGTYPE_p_void data {
70  set {
71  GLPKPINVOKE.glp_arc_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
73  }
74  get {
75  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_data_get(swigCPtr);
76  SWIGTYPE_p_void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
78  return ret;
79  }
80  }
81 
82  public SWIGTYPE_p_void temp {
83  set {
84  GLPKPINVOKE.glp_arc_temp_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
86  }
87  get {
88  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_temp_get(swigCPtr);
89  SWIGTYPE_p_void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
91  return ret;
92  }
93  }
94 
95  public glp_arc t_prev {
96  set {
97  GLPKPINVOKE.glp_arc_t_prev_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_arc.getCPtr(value)));
99  }
100  get {
101  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_t_prev_get(swigCPtr);
103  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_arc(cPtr, false);
104  }
105 
106  }
107 
108  public glp_arc t_next {
109  set {
110  GLPKPINVOKE.glp_arc_t_next_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_arc.getCPtr(value)));
112  }
113  get {
114  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_t_next_get(swigCPtr);
116  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_arc(cPtr, false);
117  }
118 
119  }
120 
121  public glp_arc h_prev {
122  set {
123  GLPKPINVOKE.glp_arc_h_prev_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_arc.getCPtr(value)));
125  }
126  get {
127  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_h_prev_get(swigCPtr);
129  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_arc(cPtr, false);
130  }
131 
132  }
133 
134  public glp_arc h_next {
135  set {
136  GLPKPINVOKE.glp_arc_h_next_set(swigCPtr, global::System.Runtime.InteropServices.HandleRef.ToIntPtr(glp_arc.getCPtr(value)));
138  }
139  get {
140  global::System.IntPtr cPtr = GLPKPINVOKE.glp_arc_h_next_get(swigCPtr);
142  return (cPtr == global::System.IntPtr.Zero) ? null : new glp_arc(cPtr, false);
143  }
144 
145  }
146 
147  public glp_arc() : this(GLPKPINVOKE.new_glp_arc(), true) {
149  }
150 
151 }
152 
153 }