Debian Codegraph @

src/gen/lib/cgraph/subg__c.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 gen.lib.cgraph;
47 import static gen.lib.cgraph.graph__c.agopen1;
48 import static gen.lib.cgraph.id__c.agmapnametoid;
49 import static gen.lib.cgraph.id__c.agregister;
50 import static gen.lib.cgraph.mem__c.agalloc;
51 import static gen.lib.cgraph.utils__c.agdtdisc;
52 import static smetana.core.JUtils.sizeof;
53 import static smetana.core.JUtilsDebug.ENTERING;
54 import static smetana.core.JUtilsDebug.LEAVING;
55 import static smetana.core.Macro.AGID;
56 import static smetana.core.Macro.AGRAPH;
57 import static smetana.core.Macro.N;
58 import static smetana.core.Macro.UNSUPPORTED;
59 import h.ST_Agdesc_s;
60 import h.ST_Agraph_s;
61 import h.ST_dt_s;
62 import smetana.core.CString;
63 import smetana.core.Z;
64 import smetana.core.__ptr__;
65
66 public class subg__c {
67 //1 9k44uhd5foylaeoekf3llonjq
68 // extern Dtmethod_t* Dtset
69
70
71 //1 1ahfywsmzcpcig2oxm7pt9ihj
72 // extern Dtmethod_t* Dtbag
73
74
75 //1 anhghfj3k7dmkudy2n7rvt31v
76 // extern Dtmethod_t* Dtoset
77
78
79 //1 5l6oj1ux946zjwvir94ykejbc
80 // extern Dtmethod_t* Dtobag
81
82
83 //1 2wtf222ak6cui8cfjnw6w377z
84 // extern Dtmethod_t* Dtlist
85
86
87 //1 d1s1s6ibtcsmst88e3057u9r7
88 // extern Dtmethod_t* Dtstack
89
90
91 //1 axa7mflo824p6fspjn1rdk0mt
92 // extern Dtmethod_t* Dtqueue
93
94
95 //1 ega812utobm4xx9oa9w9ayij6
96 // extern Dtmethod_t* Dtdeque
97
98
99 //1 cyfr996ur43045jv1tjbelzmj
100 // extern Dtmethod_t* Dtorder
101
102
103 //1 wlofoiftbjgrrabzb2brkycg
104 // extern Dtmethod_t* Dttree
105
106
107 //1 12bds94t7voj7ulwpcvgf6agr
108 // extern Dtmethod_t* Dthash
109
110
111 //1 9lqknzty480cy7zsubmabkk8h
112 // extern Dtmethod_t _Dttree
113
114
115 //1 bvn6zkbcp8vjdhkccqo1xrkrb
116 // extern Dtmethod_t _Dthash
117
118
119 //1 9lidhtd6nsmmv3e7vjv9e10gw
120 // extern Dtmethod_t _Dtlist
121
122
123 //1 34ujfamjxo7xn89u90oh2k6f8
124 // extern Dtmethod_t _Dtqueue
125
126
127 //1 3jy4aceckzkdv950h89p4wjc8
128 // extern Dtmethod_t _Dtstack
129
130
131 //1 8dfqgf3u1v830qzcjqh9o8ha7
132 // extern Agmemdisc_t AgMemDisc
133
134
135 //1 18k2oh2t6llfsdc5x0wlcnby8
136 // extern Agiddisc_t AgIdDisc
137
138
139 //1 a4r7hi80gdxtsv4hdoqpyiivn
140 // extern Agiodisc_t AgIoDisc
141
142
143 //1 bnzt5syjb7mgeru19114vd6xx
144 // extern Agdisc_t AgDefaultDisc
145
146
147 //1 35y2gbegsdjilegaribes00mg
148 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
149
150
151 //1 c2rygslq6bcuka3awmvy2b3ow
152 // typedef Agsubnode_t Agnoderef_t
153
154
155 //1 xam6yv0dcsx57dtg44igpbzn
156 // typedef Dtlink_t Agedgeref_t
157
158
159 //1 6ayavpu39aihwyojkx093pcy3
160 // extern Agraph_t *Ag_G_global
161
162
163 //1 871mxtg9l6ffpxdl9kniwusf7
164 // extern char *AgDataRecName
165
166
167 //1 c0o2kmml0tn6hftuwo0u4shwd
168 // extern Dtdisc_t Ag_subnode_id_disc
169
170
171 //1 8k15pyu256unm2kpd9zf5pf7k
172 // extern Dtdisc_t Ag_subnode_seq_disc
173
174
175 //1 e3d820y06gpeusn6atgmj8bzd
176 // extern Dtdisc_t Ag_mainedge_id_disc
177
178
179 //1 cbr0772spix9h1aw7h5v7dv9j
180 // extern Dtdisc_t Ag_subedge_id_disc
181
182
183 //1 akd0c3v0j7m2npxcb9acit1fa
184 // extern Dtdisc_t Ag_mainedge_seq_disc
185
186
187 //1 12d8la07351ww7vwfzucjst8m
188 // extern Dtdisc_t Ag_subedge_seq_disc
189
190
191 //1 29eokk7v88e62g8o6lizmo967
192 // extern Dtdisc_t Ag_subgraph_id_disc
193
194
195 //1 4xd9cbgy6hk5g6nhjcbpzkx14
196 // extern Agcbdisc_t AgAttrdisc
197
198
199
200
201 //3 11ezyrsjsotjz9b3cyvb4ie8p
202 // static Agraph_t *agfindsubg_by_id(Agraph_t * g, unsigned long id)
203 public static ST_Agraph_s agfindsubg_by_id(ST_Agraph_s g, int id) {
204 ENTERING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
205 try {
206 final ST_Agraph_s template = new ST_Agraph_s();
207 agdtdisc(g, (ST_dt_s) g.g_dict, Z.z().Ag_subgraph_id_disc);
208 AGID(template, id);
209 return (ST_Agraph_s) g.g_dict.searchf.exe(g.g_dict, template, 0000004);
210 } finally {
211 LEAVING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
212 }
213 }
214
215
216
217
218 //3 44saycxbfbr9lou0itlyewkb4
219 // static Agraph_t *localsubg(Agraph_t * g, unsigned long id)
220 public static ST_Agraph_s localsubg(ST_Agraph_s g, int id) {
221 ENTERING("44saycxbfbr9lou0itlyewkb4","localsubg");
222 try {
223 ST_Agraph_s subg;
224 subg = agfindsubg_by_id(g, id);
225 if (subg!=null)
226 return subg;
227 subg = (ST_Agraph_s) agalloc(g, sizeof(ST_Agraph_s.class));
228 subg.setPtr("clos", g.clos);
229 subg.setStruct("desc", g.desc);
230 ((ST_Agdesc_s)subg.desc).maingraph = 0;
231 subg.setPtr("parent", g);
232 subg.setPtr("root", g.root);
233 AGID(subg, id);
234 return agopen1(subg);
235 } finally {
236 LEAVING("44saycxbfbr9lou0itlyewkb4","localsubg");
237 }
238 }
239
240
241
242
243 //3 6wqxmivgp34bobzqacmsj7lcv
244 // Agraph_t *agidsubg(Agraph_t * g, unsigned long id, int cflag)
245 public static Object agidsubg(Object... arg) {
246 UNSUPPORTED("9vhen1flll6k35g72uuroky0z"); // Agraph_t *agidsubg(Agraph_t * g, unsigned long id, int cflag)
247 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
248 UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg;
249 UNSUPPORTED("elpselocwvpfk3o27nejqo6dl"); // subg = agfindsubg_by_id(g, id);
250 UNSUPPORTED("cf9t4fxh9z5rmv58441ne0ysa"); // if ((subg == ((Agraph_t*)0)) && cflag && agallocid(g, AGRAPH, id))
251 UNSUPPORTED("ecrqdk8b7debftn6d8bbmh0s4"); // subg = localsubg(g, id);
252 UNSUPPORTED("17jmp11l2jzc1v9qpaqkzkauj"); // return subg;
253 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
254
255 throw new UnsupportedOperationException();
256 }
257
258
259
260
261 //3 a24jd4r2sdyb4lb2hyababrda
262 // Agraph_t *agsubg(Agraph_t * g, char *name, int cflag)
263 public static ST_Agraph_s agsubg(ST_Agraph_s g, CString name, boolean cflag) {
264 ENTERING("a24jd4r2sdyb4lb2hyababrda","agsubg");
265 try {
266 int id[] = new int[]{0};
267 ST_Agraph_s subg;
268 if (name!=null && agmapnametoid(g, AGRAPH, name, id, false)!=0) {
269 /* might already exist */
270 if ((subg = agfindsubg_by_id(g, id[0]))!=null)
271 return subg;
272 }
273 if (cflag && agmapnametoid(g, AGRAPH, name, id, (N(false)))!=0) { /* reserve id */
274 subg = localsubg(g, id[0]);
275 agregister(g, AGRAPH, subg);
276 return subg;
277 }
278 return null;
279 } finally {
280 LEAVING("a24jd4r2sdyb4lb2hyababrda","agsubg");
281 }
282 }
283
284
285
286
287 //3 51eksrs0lhkgohunejlpwyc4k
288 // Agraph_t *agfstsubg(Agraph_t * g)
289 public static ST_Agraph_s agfstsubg(ST_Agraph_s g) {
290 ENTERING("51eksrs0lhkgohunejlpwyc4k","agfstsubg");
291 try {
292 __ptr__ tmp = (__ptr__)g.g_dict.searchf.exe(g.g_dict,null,0000200);
293 if (tmp!=null) tmp = tmp.castTo(ST_Agraph_s.class);
294 return (ST_Agraph_s) tmp;
295 } finally {
296 LEAVING("51eksrs0lhkgohunejlpwyc4k","agfstsubg");
297 }
298 }
299
300
301
302
303 //3 85c1qisrein0tzm2regoe61t
304 // Agraph_t *agnxtsubg(Agraph_t * subg)
305 public static ST_Agraph_s agnxtsubg(ST_Agraph_s subg) {
306 ENTERING("85c1qisrein0tzm2regoe61t","agnxtsubg");
307 try {
308 ST_Agraph_s g;
309 g = agparent(subg);
310 if (g==null) return null;
311 __ptr__ tmp = (__ptr__) g.g_dict.searchf.exe(g.g_dict, subg, 0000010);
312 if (tmp==null) return null;
313 return (ST_Agraph_s) tmp.getPtr();
314 } finally {
315 LEAVING("85c1qisrein0tzm2regoe61t","agnxtsubg");
316 }
317 }
318
319
320
321
322 //3 7kbp6j03hd7u6nnlivi0vt3ja
323 // Agraph_t *agparent(Agraph_t * g)
324 public static ST_Agraph_s agparent(ST_Agraph_s g) {
325 ENTERING("7kbp6j03hd7u6nnlivi0vt3ja","agparent");
326 try {
327 return (ST_Agraph_s) g.parent;
328 } finally {
329 LEAVING("7kbp6j03hd7u6nnlivi0vt3ja","agparent");
330 }
331 }
332
333
334
335
336 //3 37trxrsv69a3pl08f5awwj3tq
337 // long agdelsubg(Agraph_t * g, Agraph_t * subg)
338 public static Object agdelsubg(Object... arg) {
339 UNSUPPORTED("bjcimcpi0qag1hc37no67mct5"); // long agdelsubg(Agraph_t * g, Agraph_t * subg)
340 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
341 UNSUPPORTED("dugmh24ptzgxuj3204p7n39m4"); // return (long) (*(((Dt_t*)(g->g_dict))->searchf))((g->g_dict),(void*)(subg),0000002);
342 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
343
344 throw new UnsupportedOperationException();
345 }
346
347
348 }