Debian Codegraph @

src/h/ST_Agnodeinfo_t.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program:
18 *
19 *************************************************************************
20 * Copyright (c) 2011 AT&T Intellectual Property
21 * All rights reserved. This program and the accompanying materials
22 * are made available under the terms of the Eclipse Public License v1.0
23 * which accompanies this distribution, and is available at
24 * http://www.eclipse.org/legal/epl-v10.html
25 *
26 * Contributors: See CVS logs. Details at http://www.graphviz.org/
27 *************************************************************************
28 *
29 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
30 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
31 *
32 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
33 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
34 *
35 * You may obtain a copy of the License at
36 *
37 * http://www.eclipse.org/legal/epl-v10.html
38 *
39 * Unless required by applicable law or agreed to in writing, software
40 * distributed under the License is distributed on an "AS IS" BASIS,
41 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 * See the License for the specific language governing permissions and
43 * limitations under the License.
44 *
45 */
46 package h;
47
48 import smetana.core.UnsupportedStructAndPtr;
49 import smetana.core.__ptr__;
50 import smetana.core.__struct__;
51 import smetana.core.amiga.StarStruct;
52
53 public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
54
55 private final StarStruct parent;
56
57 public ST_Agnodeinfo_t() {
58 this(null);
59 }
60
61 public ST_Agnodeinfo_t(StarStruct parent) {
62 this.parent = parent;
63 }
64
65 public final ST_Agrec_s hdr = new ST_Agrec_s(this);
66
67 public ST_shape_desc shape;
68 public ST_polygon_t shape_info;
69 public final ST_pointf coord = new ST_pointf(this);
70 public double width, height;
71
72 // "boxf bb",
73 public double ht, lw, rw;
74 public ST_textlabel_t label;
75 public ST_textlabel_t xlabel;
76 // "void *alg",
77 public ST_Agedge_s alg = null;
78 // "char state",
79 // "unsigned char gui_state",
80 // "boolean clustnode",
81 // "unsigned char pinned",
82 public int id, heapindex, hops;
83 // "double *pos, dist",
84 public int showboxes;
85
86 public boolean has_port;
87 // "node_t* rep",
88 // "node_t *set",
89 public int node_type, mark, onstack;
90 public int ranktype, weight_class;
91 public ST_Agnode_s next;
92 public ST_Agnode_s prev;
93 // "elist in, out, flat_out, flat_in, other",
94 public final ST_elist in = new ST_elist(this);
95 public final ST_elist out = new ST_elist(this);
96 public final ST_elist flat_out = new ST_elist(this);
97 public final ST_elist flat_in = new ST_elist(this);
98 public final ST_elist other = new ST_elist(this);
99 public ST_Agraph_s clust;
100 public int UF_size;
101
102 public ST_Agnode_s UF_parent;
103
104 public ST_Agnode_s inleaf, outleaf;
105 public int rank, order;
106 public double mval;
107 public final ST_elist save_in = new ST_elist(this);
108 public final ST_elist save_out = new ST_elist(this);
109 public final ST_elist tree_in = new ST_elist(this);
110 public final ST_elist tree_out = new ST_elist(this);
111 public ST_Agedge_s par;
112 public int low, lim;
113 public int priority;
114
115 // "double pad[1]",
116 // "}",
117 // "Agnodeinfo_t");
118
119 @Override
120 public __ptr__ castTo(Class dest) {
121 if (dest == ST_Agrec_s.class) {
122 return hdr;
123 }
124 return super.castTo(dest);
125 }
126
127 @Override
128 public void setDouble(String fieldName, double data) {
129 if (fieldName.equals("width")) {
130 this.width = data;
131 return;
132 }
133 if (fieldName.equals("height")) {
134 this.height = data;
135 return;
136 }
137 if (fieldName.equals("ht")) {
138 this.ht = data;
139 return;
140 }
141 if (fieldName.equals("lw")) {
142 this.lw = data;
143 return;
144 }
145 if (fieldName.equals("rw")) {
146 this.rw = data;
147 return;
148 }
149 if (fieldName.equals("mval")) {
150 this.mval = data;
151 return;
152 }
153 super.setDouble(fieldName, data);
154 }
155
156 @Override
157 public void setInt(String fieldName, int data) {
158 if (fieldName.equals("showboxes")) {
159 this.showboxes = data;
160 return;
161 }
162 if (fieldName.equals("UF_size")) {
163 this.UF_size = data;
164 return;
165 }
166 if (fieldName.equals("mark")) {
167 this.mark = data;
168 return;
169 }
170 if (fieldName.equals("onstack")) {
171 this.onstack = data;
172 return;
173 }
174 if (fieldName.equals("priority")) {
175 this.priority = data;
176 return;
177 }
178 if (fieldName.equals("node_type")) {
179 this.node_type = data;
180 return;
181 }
182 if (fieldName.equals("rank")) {
183 this.rank = data;
184 return;
185 }
186 if (fieldName.equals("order")) {
187 this.order = data;
188 return;
189 }
190 if (fieldName.equals("ranktype")) {
191 this.ranktype = data;
192 return;
193 }
194 if (fieldName.equals("low")) {
195 this.low = data;
196 return;
197 }
198 if (fieldName.equals("lim")) {
199 this.lim = data;
200 return;
201 }
202 if (fieldName.equals("weight_class")) {
203 this.weight_class = data;
204 return;
205 }
206 super.setInt(fieldName, data);
207 }
208
209 @Override
210 public __ptr__ setPtr(String fieldName, __ptr__ newData) {
211 if (fieldName.equals("shape")) {
212 this.shape = (ST_shape_desc) newData;
213 return shape;
214 }
215 if (fieldName.equals("shape_info")) {
216 this.shape_info = (ST_polygon_t) newData;
217 return shape_info;
218 }
219 if (fieldName.equals("label")) {
220 this.label = (ST_textlabel_t) newData;
221 return label;
222 }
223 if (fieldName.equals("clust")) {
224 this.clust = (ST_Agraph_s) newData;
225 return clust;
226 }
227 if (fieldName.equals("next")) {
228 this.next = (ST_Agnode_s) newData;
229 return next;
230 }
231 if (fieldName.equals("prev")) {
232 this.prev = (ST_Agnode_s) newData;
233 return prev;
234 }
235 if (fieldName.equals("UF_parent")) {
236 this.UF_parent = (ST_Agnode_s) newData;
237 return UF_parent;
238 }
239 if (fieldName.equals("par")) {
240 this.par = (ST_Agedge_s) newData;
241 return par;
242 }
243 if (fieldName.equals("alg")) {
244 this.alg = (ST_Agedge_s) alg;
245 return alg;
246 }
247 return super.setPtr(fieldName, newData);
248 }
249
250
251
252 @Override
253 public void setStruct(String fieldName, __struct__ newData) {
254 if (fieldName.equals("save_in")) {
255 save_in.copyDataFrom(newData);
256 return;
257 }
258 if (fieldName.equals("save_out")) {
259 save_out.copyDataFrom(newData);
260 return;
261 }
262 if (fieldName.equals("out")) {
263 out.copyDataFrom(newData);
264 return;
265 }
266 if (fieldName.equals("in")) {
267 in.copyDataFrom(newData);
268 return;
269 }
270 super.setStruct(fieldName, newData);
271 }
272 }
273
274 // typedef struct Agnodeinfo_t {
275 // Agrec_t hdr;
276 // shape_desc *shape;
277 // void *shape_info;
278 // pointf coord;
279 // double width, height; /* inches */
280 // boxf bb;
281 // double ht, lw, rw;
282 // textlabel_t *label;
283 // textlabel_t *xlabel;
284 // void *alg;
285 // char state;
286 // unsigned char gui_state; /* Node state for GUI ops */
287 // boolean clustnode;
288 //
289 //
290 // unsigned char pinned;
291 // int id, heapindex, hops;
292 // double *pos, dist;
293 //
294 //
295 // unsigned char showboxes;
296 // boolean has_port;
297 // node_t* rep;
298 // node_t *set;
299 //
300 // /* fast graph */
301 // char node_type, mark, onstack;
302 // char ranktype, weight_class;
303 // node_t *next, *prev;
304 // elist in, out, flat_out, flat_in, other;
305 // graph_t *clust;
306 //
307 // /* for union-find and collapsing nodes */
308 // int UF_size;
309 // node_t *UF_parent;
310 // node_t *inleaf, *outleaf;
311 //
312 // /* for placing nodes */
313 // int rank, order; /* initially, order = 1 for ordered edges */
314 // double mval;
315 // elist save_in, save_out;
316 //
317 // /* for network-simplex */
318 // elist tree_in, tree_out;
319 // edge_t *par;
320 // int low, lim;
321 // int priority;
322 //
323 // double pad[1];
324 //
325 //
326 // } Agnodeinfo_t;