Debian Codegraph @

src/h/ST_pack_info.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.amiga.StarStruct;
51
52 public class ST_pack_info extends UnsupportedStructAndPtr {
53
54 private final StarStruct parent;
55
56 public ST_pack_info() {
57 this(null);
58 }
59
60 public ST_pack_info(StarStruct parent) {
61 this.parent = parent;
62 }
63
64 // "typedef struct",
65 // "{",
66 // "float aspect",
67 public int sz;
68 public int margin;
69 private int doSplines;
70 // "pack_mode mode",
71 public int mode;
72 private __ptr__ fixed;
73 // "boolean *fixed",
74 // "packval_t* vals",
75 public __ptr__ vals;
76 public int flags;
77
78 // "}",
79 // "pack_info");
80
81 @Override
82 public void setInt(String fieldName, int data) {
83 if (fieldName.equals("flags")) {
84 this.flags = data;
85 return;
86 }
87 if (fieldName.equals("mode")) {
88 this.mode = data;
89 return;
90 }
91 if (fieldName.equals("sz")) {
92 this.sz = data;
93 return;
94 }
95 if (fieldName.equals("margin")) {
96 this.margin = data;
97 return;
98 }
99 if (fieldName.equals("doSplines")) {
100 this.doSplines = data;
101 return;
102 }
103 if (fieldName.equals("fixed") && data == 0) {
104 this.fixed = null;
105 return;
106 }
107 super.setInt(fieldName, data);
108 }
109
110 @Override
111 public __ptr__ setPtr(String fieldName, __ptr__ newData) {
112 if (fieldName.equals("vals") && newData == null) {
113 this.vals = newData;
114 return vals;
115 }
116 return super.setPtr(fieldName, newData);
117 }
118 }
119
120 // typedef struct {
121 // float aspect; /* desired aspect ratio */
122 // int sz; /* row/column size size */
123 // unsigned int margin; /* margin left around objects, in points */
124 // int doSplines; /* use splines in constructing graph shape */
125 // pack_mode mode; /* granularity and method */
126 // boolean *fixed; /* fixed[i] == true implies g[i] should not be moved */
127 // packval_t* vals; /* for arrays, sort numbers */
128 // int flags;
129 // } pack_info;