Debian Codegraph @

src/h/ST_Agdesc_s.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.HardcodedStruct;
49 import smetana.core.UnsupportedStarStruct;
50 import smetana.core.UnsupportedStructAndPtr;
51 import smetana.core.__struct__;
52 import smetana.core.amiga.Area;
53 import smetana.core.amiga.AreaInt;
54 import smetana.core.amiga.InternalData;
55 import smetana.core.amiga.StarStruct;
56
57 public class ST_Agdesc_s extends UnsupportedStructAndPtr implements HardcodedStruct {
58 public int directed; /* if edges are asymmetric */
59 public int strict; /* if multi-edges forbidden */
60 public int no_loop; /* if no loops */
61 public int maingraph; /* if this is the top level graph */
62 public int flatlock; /* if sets are flattened into lists in cdt */
63 public int no_write; /* if a temporary subgraph */
64 public int has_attrs; /* if string attr tables should be initialized */
65 public int has_cmpnd; /* if may contain collapsed nodes */
66
67 public ST_Agdesc_s() {
68 this(null);
69 }
70
71 public ST_Agdesc_s(StarStruct parent) {
72 }
73
74 @Override
75 public __struct__ copy() {
76 final ST_Agdesc_s result = new ST_Agdesc_s();
77 result.directed = directed;
78 result.strict = strict;
79 result.no_loop = no_loop;
80 result.maingraph = maingraph;
81 result.flatlock = flatlock;
82 result.no_write = no_write;
83 result.has_attrs = has_attrs;
84 result.has_cmpnd = has_cmpnd;
85 return result;
86 }
87
88 @Override
89 public void copyDataFrom(__struct__ other) {
90 ST_Agdesc_s other2 = (ST_Agdesc_s) other;
91 directed = other2.directed;
92 strict = other2.strict;
93 no_loop = other2.no_loop;
94 maingraph = other2.maingraph;
95 flatlock = other2.flatlock;
96 no_write = other2.no_write;
97 has_attrs = other2.has_attrs;
98 has_cmpnd = other2.has_cmpnd;
99 }
100
101 public class MyInternalData extends UnsupportedStarStruct implements InternalData {
102
103 @Override
104 public Area getArea(String name) {
105 final AreaInt result = new AreaInt();
106 if (name.equals("directed")) {
107 result.setInternal(directed);
108 return result;
109 }
110 if (name.equals("strict")) {
111 result.setInternal(strict);
112 return result;
113 }
114 if (name.equals("no_loop")) {
115 result.setInternal(no_loop);
116 return result;
117 }
118 if (name.equals("maingraph")) {
119 result.setInternal(maingraph);
120 return result;
121 }
122 if (name.equals("flatlock")) {
123 result.setInternal(flatlock);
124 return result;
125 }
126 if (name.equals("no_write")) {
127 result.setInternal(no_write);
128 return result;
129 }
130 if (name.equals("has_attrs")) {
131 result.setInternal(has_attrs);
132 return result;
133 }
134 if (name.equals("has_cmpnd")) {
135 result.setInternal(has_cmpnd);
136 return result;
137 }
138 return super.getArea(name);
139 }
140
141 }
142
143 @Override
144 public StarStruct getInternalData() {
145 return new MyInternalData();
146 }
147
148 }
149
150 // struct Agdesc_s { /* graph descriptor */
151 // unsigned directed:1; /* if edges are asymmetric */
152 // unsigned strict:1; /* if multi-edges forbidden */
153 // unsigned no_loop:1; /* if no loops */
154 // unsigned maingraph:1; /* if this is the top level graph */
155 // unsigned flatlock:1; /* if sets are flattened into lists in cdt */
156 // unsigned no_write:1; /* if a temporary subgraph */
157 // unsigned has_attrs:1; /* if string attr tables should be initialized */
158 // unsigned has_cmpnd:1; /* if may contain collapsed nodes */
159 // };