1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2 // -*- mode: C++ -*-
3 //
4 // Copyright (C) 2013-2019 Red Hat, Inc.
5
6 #include "abg-viz-svg.h"
7
main()8 int main()
9 {
10 using namespace abigail;
11
12 // sa-base
13 {
14 svg obj("sa-base");
15 row r = { "base", primary_row_sty, 0, 1, 1 };
16 obj.start();
17 obj.add_y_row(r);
18 obj.finish();
19 }
20
21 // sa-A
22 {
23 svg obj("sa-A");
24 row r1 = { "A", primary_row_sty, 0, 24, 8 };
25 row r2 = { "base", base_row_sty, 0, 0, 0 };
26 row r3 = { "_M_i", member_row_sty, 0, 8, 8 };
27 row r4 = { "_M_n", member_row_sty, 8, 8, 8 };
28 row r5 = { "_M_type", member_row_sty, 16, 2, 2 };
29 row r6 = { "PADDING", implementation_row_sty, 18, 6, 0 };
30 obj.start();
31 obj.add_y_row(r1);
32 obj.add_y_row(r2);
33 obj.add_y_row(r3);
34 obj.add_y_row(r4);
35 obj.add_y_row(r5);
36 obj.add_y_row(r6);
37 obj.finish();
38 }
39
40 // sa-B
41 {
42 svg obj("sa-B");
43 row r1 = { "B", primary_row_sty, 0, 24, 8 };
44 row r2 = { "base", base_row_sty, 0, 0, 0 };
45 row r3 = { "_M_type", member_row_sty, 0, 2, 2 };
46 row r4 = { "HOLE", implementation_row_sty, 2, 2, 0 };
47 row r5 = { "_M_state", member_row_sty, 4, 4, 4 };
48 obj.start();
49 obj.add_y_row(r1);
50 obj.add_y_row(r2);
51 obj.add_y_row(r3);
52 obj.add_y_row(r4);
53 obj.add_y_row(r5);
54 obj.finish();
55 }
56
57 // sa-C1
58 {
59 svg obj("sa-C1");
60 row r1 = { "C1", primary_row_sty, 0, 2, 2 };
61 row r2 = { "base", base_row_sty, 0, 0, 0 };
62 row r3 = { "_M_type", member_row_sty, 0, 2, 2 };
63 obj.start();
64 obj.add_y_row(r1);
65 obj.add_y_row(r2);
66 obj.add_y_row(r3);
67 obj.finish();
68 }
69
70 // sa-C2
71 {
72 svg obj("sa-C2");
73 row r1 = { "C2", primary_row_sty, 0, 16, 8 };
74 row r2 = { "base", base_row_sty, 0, 0, 0 };
75 row r3 = { "IMPLEMENTATION", implementation_row_sty, 0, 8, 8 };
76 row r4 = { "_M_type", member_row_sty, 8, 2, 2 };
77 row r5 = { "PADDING", implementation_row_sty, 10, 6, 0 };
78 obj.start();
79 obj.add_y_row(r1);
80 obj.add_y_row(r2);
81 obj.add_y_row(r3);
82 obj.add_y_row(r4);
83 obj.add_y_row(r5);
84 obj.finish();
85 }
86
87 // sa-C3
88 {
89 svg obj("sa-C3");
90 row r1 = { "C3", primary_row_sty, 0, 16, 8 };
91 row r2 = { "base", base_row_sty, 0, 0, 0 };
92 row r3 = { "IMPLEMENTATION", implementation_row_sty, 0, 8, 8 };
93 row r4 = { "_M_type", member_row_sty, 8, 2, 2 };
94 row r5 = { "PADDING", implementation_row_sty, 10, 6, 0 };
95 obj.start();
96 obj.add_y_row(r1);
97 obj.add_y_row(r2);
98 obj.add_y_row(r3);
99 obj.add_y_row(r4);
100 obj.add_y_row(r5);
101 obj.finish();
102 }
103
104 // sa-D1
105 {
106 svg obj("sa-D1");
107 row r1 = { "D1", primary_row_sty, 0, 48, 8 };
108 row r2 = { "A", base_row_sty, 0, 24, 8 };
109 row r3 = { "_M_index", member_row_sty, 24, 8, 8 };
110 row r4 = { "_M_array", member_row_sty, 32, 8, 8 };
111 row r5 = { "_M_ok", member_row_sty, 40, 1, 1 };
112 row r6 = { "PADDING", implementation_row_sty, 41, 7, 0 };
113 obj.start();
114 obj.add_y_row(r1);
115 obj.add_y_row(r2);
116 obj.add_y_row(r3);
117 obj.add_y_row(r4);
118 obj.add_y_row(r5);
119 obj.add_y_row(r6);
120 obj.finish();
121 }
122
123 // sa-D2
124 {
125 svg obj("sa-D2");
126 row r1 = { "D2", primary_row_sty, 0, 32, 8 };
127 row r2 = { "C1", base_row_sty, 0, 2, 2 };
128 row r3 = { "HOLE", implementation_row_sty, 2, 2, 0 };
129 row r4 = { "_M_state", member_row_sty, 4, 4, 4 };
130 row r5 = { "_M_index", member_row_sty, 8, 8, 8 };
131 row r6 = { "_M_array", member_row_sty, 16, 8, 8 };
132 row r7 = { "_M_ok", member_row_sty, 24, 1, 1 };
133 row r8 = { "PADDING", implementation_row_sty, 41, 7, 0 };
134 obj.start();
135 obj.add_y_row(r1);
136 obj.add_y_row(r2);
137 obj.add_y_row(r3);
138 obj.add_y_row(r4);
139 obj.add_y_row(r5);
140 obj.add_y_row(r6);
141 obj.add_y_row(r7);
142 obj.add_y_row(r8);
143 obj.finish();
144 }
145
146 // sa-D2v
147 {
148 svg obj("sa-D2v");
149 row r1 = { "D2v", primary_row_sty, 0, 56, 8 };
150 row r2 = { "C2", base_row_sty, 0, 16, 16 };
151 row r3 = { "IMPLEMENTATION", implementation_row_sty, 16, 8, 8 };
152 row r4 = { "_M_state", member_row_sty, 24, 4, 4 };
153 row r5 = { "HOLE", implementation_row_sty, 28, 4, 0 };
154 row r6 = { "_M_index", member_row_sty, 32, 8, 8 };
155 row r7 = { "_M_array", member_row_sty, 40, 8, 8 };
156 row r8 = { "_M_ok", member_row_sty, 48, 1, 1 };
157 row r9 = { "PADDING", implementation_row_sty, 49, 7, 0 };
158 obj.start();
159 obj.add_y_row(r1);
160 obj.add_y_row(r2);
161 obj.add_y_row(r3);
162 obj.add_y_row(r4);
163 obj.add_y_row(r5);
164 obj.add_y_row(r6);
165 obj.add_y_row(r7);
166 obj.add_y_row(r8);
167 obj.add_y_row(r9);
168 obj.finish();
169 }
170
171 // sa-D3
172 {
173 svg obj("sa-D3");
174 row r1 = { "D3", primary_row_sty, 0, 24, 8 };
175 row r2 = { "C1", base_row_sty, 0, 2, 2 };
176 row r3 = { "HOLE", implementation_row_sty, 2, 6, 0 };
177 row r4 = { "_M_index", member_row_sty, 8, 8, 8 };
178 row r5 = { "_M_array", member_row_sty, 16, 8, 8 };
179 obj.start();
180 obj.add_y_row(r1);
181 obj.add_y_row(r2);
182 obj.add_y_row(r3);
183 obj.add_y_row(r4);
184 obj.add_y_row(r5);
185 obj.finish();
186 }
187
188 // sa-D3v
189 {
190 svg obj("sa-D3v");
191 row r1 = { "D3v", primary_row_sty, 0, 40, 8 };
192 row r2 = { "C3", base_row_sty, 0, 16, 16 };
193 row r3 = { "IMPLEMENTATION", implementation_row_sty, 16, 8, 8 };
194 row r4 = { "_M_index", member_row_sty, 24, 8, 8 };
195 row r5 = { "_M_array", member_row_sty, 32, 8, 8 };
196 obj.start();
197 obj.add_y_row(r1);
198 obj.add_y_row(r2);
199 obj.add_y_row(r3);
200 obj.add_y_row(r4);
201 obj.add_y_row(r5);
202 obj.finish();
203 }
204
205 // sa-D4v
206 {
207 svg obj("sa-D4v");
208 row r1 = { "D4v", primary_row_sty, 0, 32, 8 };
209 row r2 = { "C4", base_row_sty, 0, 16, 16 };
210 row r3 = { "_M_index", member_row_sty, 16, 8, 8 };
211 row r4 = { "_M_array", member_row_sty, 24, 8, 8 };
212 obj.start();
213 obj.add_y_row(r1);
214 obj.add_y_row(r2);
215 obj.add_y_row(r3);
216 obj.add_y_row(r4);
217 obj.finish();
218 }
219
220 // sa-Dd1
221 {
222 svg obj("sa-Dd1");
223 row r1 = { "Dd1", primary_row_sty, 0, 32, 8 };
224 row r2 = { "A", base_row_sty, 0, 24, 8 };
225 row r3 = { "B", base_row_sty, 24, 8, 8 };
226 obj.start();
227 obj.add_y_row(r1);
228 obj.add_y_row(r2);
229 obj.add_y_row(r3);
230 obj.finish();
231 }
232
233 // sa-Dd2
234 {
235 svg obj("sa-Dd2");
236 row r1 = { "Dd2", primary_row_sty, 0, 56, 8 };
237 row r2 = { "A", base_row_sty, 0, 24, 8 };
238 row r3 = { "D4v", base_row_sty, 24, 32, 8 };
239 obj.start();
240 obj.add_y_row(r1);
241 obj.add_y_row(r2);
242 obj.add_y_row(r3);
243 obj.finish();
244 }
245
246 // sa-Dd3
247 {
248 svg obj("sa-Dd3");
249 row r1 = { "Dd3", primary_row_sty, 0, 56, 8 };
250 row r2 = { "D2", base_row_sty, 0, 32, 8 };
251 row r3 = { "D3", base_row_sty, 32, 24, 8 };
252 obj.start();
253 obj.add_y_row(r1);
254 obj.add_y_row(r2);
255 obj.add_y_row(r3);
256 obj.finish();
257 }
258
259 // sa-Dd4
260 {
261 svg obj("sa-Dd4");
262 row r1 = { "Dd4", primary_row_sty, 0, 96, 8 };
263 row r2 = { "D2v", base_row_sty, 0, 56, 8 };
264 row r3 = { "D3v", base_row_sty, 56, 40, 8 };
265 obj.start();
266 obj.add_y_row(r1);
267 obj.add_y_row(r2);
268 obj.add_y_row(r3);
269 obj.finish();
270 }
271
272 // sa-Dd5
273 {
274 svg obj("sa-Dd5");
275 row r1 = { "Dd5", primary_row_sty, 0, 48, 8 };
276 row r2 = { "D5v1", base_row_sty, 0, 32, 8 };
277 row r3 = { "D5v2", base_row_sty, 16, 32, 8 };
278 obj.start();
279 obj.add_y_row(r1);
280 obj.add_y_row(r2);
281 obj.add_y_row(r3);
282 obj.finish();
283 }
284
285 return 0;
286 }
287