OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
dataspace_variant_visitors.hpp
1#pragma once
2#include <ossia/network/dataspace/dataspace.hpp>
3#include <ossia/network/dataspace/value_with_unit.hpp>
4namespace ossia
5{
6template <typename Functor>
7auto apply(Functor&& functor, const strong_value_variant& arg0, const unit_variant& arg1)
8{
9 switch(arg0.m_type)
10 {
11 case strong_value_variant::Type::Type0: {
12 switch(arg1.m_type)
13 {
14 case unit_variant::Type::Type0: {
15 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
16 }
17 case unit_variant::Type::Type1: {
18 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
19 }
20 case unit_variant::Type::Type2: {
21 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
22 }
23 case unit_variant::Type::Type3: {
24 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
25 }
26 case unit_variant::Type::Type4: {
27 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
28 }
29 case unit_variant::Type::Type5: {
30 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
31 }
32 case unit_variant::Type::Type6: {
33 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
34 }
35 case unit_variant::Type::Type7: {
36 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
37 }
38 default:
39 ossia_do_throw(std::runtime_error, ": bad type");
40 }
41 }
42 case strong_value_variant::Type::Type1: {
43 switch(arg1.m_type)
44 {
45 case unit_variant::Type::Type0: {
46 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
47 }
48 case unit_variant::Type::Type1: {
49 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
50 }
51 case unit_variant::Type::Type2: {
52 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
53 }
54 case unit_variant::Type::Type3: {
55 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
56 }
57 case unit_variant::Type::Type4: {
58 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
59 }
60 case unit_variant::Type::Type5: {
61 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
62 }
63 case unit_variant::Type::Type6: {
64 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
65 }
66 case unit_variant::Type::Type7: {
67 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
68 }
69 default:
70 ossia_do_throw(std::runtime_error, ": bad type");
71 }
72 }
73 case strong_value_variant::Type::Type2: {
74 switch(arg1.m_type)
75 {
76 case unit_variant::Type::Type0: {
77 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
78 }
79 case unit_variant::Type::Type1: {
80 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
81 }
82 case unit_variant::Type::Type2: {
83 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
84 }
85 case unit_variant::Type::Type3: {
86 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
87 }
88 case unit_variant::Type::Type4: {
89 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
90 }
91 case unit_variant::Type::Type5: {
92 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
93 }
94 case unit_variant::Type::Type6: {
95 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
96 }
97 case unit_variant::Type::Type7: {
98 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
99 }
100 default:
101 ossia_do_throw(std::runtime_error, ": bad type");
102 }
103 }
104 case strong_value_variant::Type::Type3: {
105 switch(arg1.m_type)
106 {
107 case unit_variant::Type::Type0: {
108 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
109 }
110 case unit_variant::Type::Type1: {
111 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
112 }
113 case unit_variant::Type::Type2: {
114 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
115 }
116 case unit_variant::Type::Type3: {
117 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
118 }
119 case unit_variant::Type::Type4: {
120 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
121 }
122 case unit_variant::Type::Type5: {
123 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
124 }
125 case unit_variant::Type::Type6: {
126 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
127 }
128 case unit_variant::Type::Type7: {
129 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
130 }
131 default:
132 ossia_do_throw(std::runtime_error, ": bad type");
133 }
134 }
135 case strong_value_variant::Type::Type4: {
136 switch(arg1.m_type)
137 {
138 case unit_variant::Type::Type0: {
139 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
140 }
141 case unit_variant::Type::Type1: {
142 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
143 }
144 case unit_variant::Type::Type2: {
145 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
146 }
147 case unit_variant::Type::Type3: {
148 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
149 }
150 case unit_variant::Type::Type4: {
151 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
152 }
153 case unit_variant::Type::Type5: {
154 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
155 }
156 case unit_variant::Type::Type6: {
157 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
158 }
159 case unit_variant::Type::Type7: {
160 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
161 }
162 default:
163 ossia_do_throw(std::runtime_error, ": bad type");
164 }
165 }
166 case strong_value_variant::Type::Type5: {
167 switch(arg1.m_type)
168 {
169 case unit_variant::Type::Type0: {
170 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
171 }
172 case unit_variant::Type::Type1: {
173 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
174 }
175 case unit_variant::Type::Type2: {
176 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
177 }
178 case unit_variant::Type::Type3: {
179 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
180 }
181 case unit_variant::Type::Type4: {
182 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
183 }
184 case unit_variant::Type::Type5: {
185 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
186 }
187 case unit_variant::Type::Type6: {
188 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
189 }
190 case unit_variant::Type::Type7: {
191 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
192 }
193 default:
194 ossia_do_throw(std::runtime_error, ": bad type");
195 }
196 }
197 case strong_value_variant::Type::Type6: {
198 switch(arg1.m_type)
199 {
200 case unit_variant::Type::Type0: {
201 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
202 }
203 case unit_variant::Type::Type1: {
204 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
205 }
206 case unit_variant::Type::Type2: {
207 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
208 }
209 case unit_variant::Type::Type3: {
210 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
211 }
212 case unit_variant::Type::Type4: {
213 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
214 }
215 case unit_variant::Type::Type5: {
216 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
217 }
218 case unit_variant::Type::Type6: {
219 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
220 }
221 case unit_variant::Type::Type7: {
222 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
223 }
224 default:
225 ossia_do_throw(std::runtime_error, ": bad type");
226 }
227 }
228 case strong_value_variant::Type::Type7: {
229 switch(arg1.m_type)
230 {
231 case unit_variant::Type::Type0: {
232 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
233 }
234 case unit_variant::Type::Type1: {
235 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
236 }
237 case unit_variant::Type::Type2: {
238 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
239 }
240 case unit_variant::Type::Type3: {
241 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
242 }
243 case unit_variant::Type::Type4: {
244 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
245 }
246 case unit_variant::Type::Type5: {
247 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
248 }
249 case unit_variant::Type::Type6: {
250 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
251 }
252 case unit_variant::Type::Type7: {
253 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
254 }
255 default:
256 ossia_do_throw(std::runtime_error, ": bad type");
257 }
258 }
259 case strong_value_variant::Type::Type8: {
260 switch(arg1.m_type)
261 {
262 case unit_variant::Type::Type0: {
263 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
264 }
265 case unit_variant::Type::Type1: {
266 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
267 }
268 case unit_variant::Type::Type2: {
269 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
270 }
271 case unit_variant::Type::Type3: {
272 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
273 }
274 case unit_variant::Type::Type4: {
275 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
276 }
277 case unit_variant::Type::Type5: {
278 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
279 }
280 case unit_variant::Type::Type6: {
281 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
282 }
283 case unit_variant::Type::Type7: {
284 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
285 }
286 default:
287 ossia_do_throw(std::runtime_error, ": bad type");
288 }
289 }
290 default:
291 ossia_do_throw(std::runtime_error, ": bad type");
292 }
293}
294template <typename Functor>
295auto apply(Functor&& functor, const value_variant_type& arg0, const angle_u& arg1)
296{
297 switch(arg0.m_type)
298 {
299 case value_variant_type::Type::Type0: {
300 switch(arg1.m_type)
301 {
302 case angle_u::Type::Type0: {
303 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
304 }
305 case angle_u::Type::Type1: {
306 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
307 }
308 default:
309 ossia_do_throw(std::runtime_error, ": bad type");
310 }
311 }
312 case value_variant_type::Type::Type1: {
313 switch(arg1.m_type)
314 {
315 case angle_u::Type::Type0: {
316 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
317 }
318 case angle_u::Type::Type1: {
319 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
320 }
321 default:
322 ossia_do_throw(std::runtime_error, ": bad type");
323 }
324 }
325 case value_variant_type::Type::Type2: {
326 switch(arg1.m_type)
327 {
328 case angle_u::Type::Type0: {
329 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
330 }
331 case angle_u::Type::Type1: {
332 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
333 }
334 default:
335 ossia_do_throw(std::runtime_error, ": bad type");
336 }
337 }
338 case value_variant_type::Type::Type3: {
339 switch(arg1.m_type)
340 {
341 case angle_u::Type::Type0: {
342 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
343 }
344 case angle_u::Type::Type1: {
345 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
346 }
347 default:
348 ossia_do_throw(std::runtime_error, ": bad type");
349 }
350 }
351 case value_variant_type::Type::Type4: {
352 switch(arg1.m_type)
353 {
354 case angle_u::Type::Type0: {
355 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
356 }
357 case angle_u::Type::Type1: {
358 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
359 }
360 default:
361 ossia_do_throw(std::runtime_error, ": bad type");
362 }
363 }
364 case value_variant_type::Type::Type5: {
365 switch(arg1.m_type)
366 {
367 case angle_u::Type::Type0: {
368 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
369 }
370 case angle_u::Type::Type1: {
371 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
372 }
373 default:
374 ossia_do_throw(std::runtime_error, ": bad type");
375 }
376 }
377 case value_variant_type::Type::Type6: {
378 switch(arg1.m_type)
379 {
380 case angle_u::Type::Type0: {
381 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
382 }
383 case angle_u::Type::Type1: {
384 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
385 }
386 default:
387 ossia_do_throw(std::runtime_error, ": bad type");
388 }
389 }
390 case value_variant_type::Type::Type7: {
391 switch(arg1.m_type)
392 {
393 case angle_u::Type::Type0: {
394 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
395 }
396 case angle_u::Type::Type1: {
397 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
398 }
399 default:
400 ossia_do_throw(std::runtime_error, ": bad type");
401 }
402 }
403 case value_variant_type::Type::Type8: {
404 switch(arg1.m_type)
405 {
406 case angle_u::Type::Type0: {
407 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
408 }
409 case angle_u::Type::Type1: {
410 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
411 }
412 default:
413 ossia_do_throw(std::runtime_error, ": bad type");
414 }
415 }
416 case value_variant_type::Type::Type9: {
417 switch(arg1.m_type)
418 {
419 case angle_u::Type::Type0: {
420 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
421 }
422 case angle_u::Type::Type1: {
423 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
424 }
425 default:
426 ossia_do_throw(std::runtime_error, ": bad type");
427 }
428 }
429 default:
430 ossia_do_throw(std::runtime_error, ": bad type");
431 }
432}
433template <typename Functor>
434auto apply(Functor&& functor, const value_variant_type& arg0, const color_u& arg1)
435{
436 switch(arg0.m_type)
437 {
438 case value_variant_type::Type::Type0: {
439 switch(arg1.m_type)
440 {
441 case color_u::Type::Type0: {
442 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
443 }
444 case color_u::Type::Type1: {
445 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
446 }
447 case color_u::Type::Type2: {
448 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
449 }
450 case color_u::Type::Type3: {
451 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
452 }
453 case color_u::Type::Type4: {
454 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
455 }
456 case color_u::Type::Type5: {
457 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
458 }
459 case color_u::Type::Type6: {
460 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
461 }
462 case color_u::Type::Type7: {
463 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
464 }
465 case color_u::Type::Type8: {
466 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
467 }
468 default:
469 ossia_do_throw(std::runtime_error, ": bad type");
470 }
471 }
472 case value_variant_type::Type::Type1: {
473 switch(arg1.m_type)
474 {
475 case color_u::Type::Type0: {
476 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
477 }
478 case color_u::Type::Type1: {
479 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
480 }
481 case color_u::Type::Type2: {
482 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
483 }
484 case color_u::Type::Type3: {
485 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
486 }
487 case color_u::Type::Type4: {
488 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
489 }
490 case color_u::Type::Type5: {
491 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
492 }
493 case color_u::Type::Type6: {
494 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
495 }
496 case color_u::Type::Type7: {
497 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
498 }
499 case color_u::Type::Type8: {
500 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
501 }
502 default:
503 ossia_do_throw(std::runtime_error, ": bad type");
504 }
505 }
506 case value_variant_type::Type::Type2: {
507 switch(arg1.m_type)
508 {
509 case color_u::Type::Type0: {
510 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
511 }
512 case color_u::Type::Type1: {
513 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
514 }
515 case color_u::Type::Type2: {
516 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
517 }
518 case color_u::Type::Type3: {
519 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
520 }
521 case color_u::Type::Type4: {
522 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
523 }
524 case color_u::Type::Type5: {
525 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
526 }
527 case color_u::Type::Type6: {
528 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
529 }
530 case color_u::Type::Type7: {
531 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
532 }
533 case color_u::Type::Type8: {
534 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
535 }
536 default:
537 ossia_do_throw(std::runtime_error, ": bad type");
538 }
539 }
540 case value_variant_type::Type::Type3: {
541 switch(arg1.m_type)
542 {
543 case color_u::Type::Type0: {
544 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
545 }
546 case color_u::Type::Type1: {
547 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
548 }
549 case color_u::Type::Type2: {
550 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
551 }
552 case color_u::Type::Type3: {
553 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
554 }
555 case color_u::Type::Type4: {
556 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
557 }
558 case color_u::Type::Type5: {
559 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
560 }
561 case color_u::Type::Type6: {
562 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
563 }
564 case color_u::Type::Type7: {
565 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
566 }
567 case color_u::Type::Type8: {
568 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
569 }
570 default:
571 ossia_do_throw(std::runtime_error, ": bad type");
572 }
573 }
574 case value_variant_type::Type::Type4: {
575 switch(arg1.m_type)
576 {
577 case color_u::Type::Type0: {
578 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
579 }
580 case color_u::Type::Type1: {
581 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
582 }
583 case color_u::Type::Type2: {
584 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
585 }
586 case color_u::Type::Type3: {
587 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
588 }
589 case color_u::Type::Type4: {
590 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
591 }
592 case color_u::Type::Type5: {
593 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
594 }
595 case color_u::Type::Type6: {
596 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
597 }
598 case color_u::Type::Type7: {
599 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
600 }
601 case color_u::Type::Type8: {
602 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
603 }
604 default:
605 ossia_do_throw(std::runtime_error, ": bad type");
606 }
607 }
608 case value_variant_type::Type::Type5: {
609 switch(arg1.m_type)
610 {
611 case color_u::Type::Type0: {
612 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
613 }
614 case color_u::Type::Type1: {
615 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
616 }
617 case color_u::Type::Type2: {
618 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
619 }
620 case color_u::Type::Type3: {
621 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
622 }
623 case color_u::Type::Type4: {
624 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
625 }
626 case color_u::Type::Type5: {
627 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
628 }
629 case color_u::Type::Type6: {
630 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
631 }
632 case color_u::Type::Type7: {
633 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
634 }
635 case color_u::Type::Type8: {
636 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
637 }
638 default:
639 ossia_do_throw(std::runtime_error, ": bad type");
640 }
641 }
642 case value_variant_type::Type::Type6: {
643 switch(arg1.m_type)
644 {
645 case color_u::Type::Type0: {
646 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
647 }
648 case color_u::Type::Type1: {
649 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
650 }
651 case color_u::Type::Type2: {
652 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
653 }
654 case color_u::Type::Type3: {
655 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
656 }
657 case color_u::Type::Type4: {
658 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
659 }
660 case color_u::Type::Type5: {
661 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
662 }
663 case color_u::Type::Type6: {
664 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
665 }
666 case color_u::Type::Type7: {
667 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
668 }
669 case color_u::Type::Type8: {
670 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
671 }
672 default:
673 ossia_do_throw(std::runtime_error, ": bad type");
674 }
675 }
676 case value_variant_type::Type::Type7: {
677 switch(arg1.m_type)
678 {
679 case color_u::Type::Type0: {
680 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
681 }
682 case color_u::Type::Type1: {
683 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
684 }
685 case color_u::Type::Type2: {
686 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
687 }
688 case color_u::Type::Type3: {
689 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
690 }
691 case color_u::Type::Type4: {
692 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
693 }
694 case color_u::Type::Type5: {
695 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
696 }
697 case color_u::Type::Type6: {
698 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
699 }
700 case color_u::Type::Type7: {
701 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
702 }
703 case color_u::Type::Type8: {
704 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
705 }
706 default:
707 ossia_do_throw(std::runtime_error, ": bad type");
708 }
709 }
710 case value_variant_type::Type::Type8: {
711 switch(arg1.m_type)
712 {
713 case color_u::Type::Type0: {
714 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
715 }
716 case color_u::Type::Type1: {
717 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
718 }
719 case color_u::Type::Type2: {
720 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
721 }
722 case color_u::Type::Type3: {
723 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
724 }
725 case color_u::Type::Type4: {
726 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
727 }
728 case color_u::Type::Type5: {
729 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
730 }
731 case color_u::Type::Type6: {
732 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
733 }
734 case color_u::Type::Type7: {
735 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
736 }
737 case color_u::Type::Type8: {
738 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
739 }
740 default:
741 ossia_do_throw(std::runtime_error, ": bad type");
742 }
743 }
744 case value_variant_type::Type::Type9: {
745 switch(arg1.m_type)
746 {
747 case color_u::Type::Type0: {
748 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
749 }
750 case color_u::Type::Type1: {
751 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
752 }
753 case color_u::Type::Type2: {
754 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
755 }
756 case color_u::Type::Type3: {
757 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
758 }
759 case color_u::Type::Type4: {
760 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
761 }
762 case color_u::Type::Type5: {
763 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
764 }
765 case color_u::Type::Type6: {
766 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
767 }
768 case color_u::Type::Type7: {
769 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
770 }
771 case color_u::Type::Type8: {
772 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
773 }
774 default:
775 ossia_do_throw(std::runtime_error, ": bad type");
776 }
777 }
778 default:
779 ossia_do_throw(std::runtime_error, ": bad type");
780 }
781}
782template <typename Functor>
783auto apply(Functor&& functor, const value_variant_type& arg0, const distance_u& arg1)
784{
785 switch(arg0.m_type)
786 {
787 case value_variant_type::Type::Type0: {
788 switch(arg1.m_type)
789 {
790 case distance_u::Type::Type0: {
791 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
792 }
793 case distance_u::Type::Type1: {
794 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
795 }
796 case distance_u::Type::Type2: {
797 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
798 }
799 case distance_u::Type::Type3: {
800 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
801 }
802 case distance_u::Type::Type4: {
803 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
804 }
805 case distance_u::Type::Type5: {
806 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
807 }
808 case distance_u::Type::Type6: {
809 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
810 }
811 case distance_u::Type::Type7: {
812 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
813 }
814 case distance_u::Type::Type8: {
815 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
816 }
817 case distance_u::Type::Type9: {
818 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
819 }
820 case distance_u::Type::Type10: {
821 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value10);
822 }
823 default:
824 ossia_do_throw(std::runtime_error, ": bad type");
825 }
826 }
827 case value_variant_type::Type::Type1: {
828 switch(arg1.m_type)
829 {
830 case distance_u::Type::Type0: {
831 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
832 }
833 case distance_u::Type::Type1: {
834 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
835 }
836 case distance_u::Type::Type2: {
837 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
838 }
839 case distance_u::Type::Type3: {
840 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
841 }
842 case distance_u::Type::Type4: {
843 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
844 }
845 case distance_u::Type::Type5: {
846 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
847 }
848 case distance_u::Type::Type6: {
849 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
850 }
851 case distance_u::Type::Type7: {
852 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
853 }
854 case distance_u::Type::Type8: {
855 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
856 }
857 case distance_u::Type::Type9: {
858 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
859 }
860 case distance_u::Type::Type10: {
861 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value10);
862 }
863 default:
864 ossia_do_throw(std::runtime_error, ": bad type");
865 }
866 }
867 case value_variant_type::Type::Type2: {
868 switch(arg1.m_type)
869 {
870 case distance_u::Type::Type0: {
871 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
872 }
873 case distance_u::Type::Type1: {
874 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
875 }
876 case distance_u::Type::Type2: {
877 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
878 }
879 case distance_u::Type::Type3: {
880 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
881 }
882 case distance_u::Type::Type4: {
883 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
884 }
885 case distance_u::Type::Type5: {
886 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
887 }
888 case distance_u::Type::Type6: {
889 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
890 }
891 case distance_u::Type::Type7: {
892 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
893 }
894 case distance_u::Type::Type8: {
895 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
896 }
897 case distance_u::Type::Type9: {
898 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
899 }
900 case distance_u::Type::Type10: {
901 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value10);
902 }
903 default:
904 ossia_do_throw(std::runtime_error, ": bad type");
905 }
906 }
907 case value_variant_type::Type::Type3: {
908 switch(arg1.m_type)
909 {
910 case distance_u::Type::Type0: {
911 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
912 }
913 case distance_u::Type::Type1: {
914 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
915 }
916 case distance_u::Type::Type2: {
917 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
918 }
919 case distance_u::Type::Type3: {
920 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
921 }
922 case distance_u::Type::Type4: {
923 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
924 }
925 case distance_u::Type::Type5: {
926 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
927 }
928 case distance_u::Type::Type6: {
929 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
930 }
931 case distance_u::Type::Type7: {
932 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
933 }
934 case distance_u::Type::Type8: {
935 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
936 }
937 case distance_u::Type::Type9: {
938 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
939 }
940 case distance_u::Type::Type10: {
941 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value10);
942 }
943 default:
944 ossia_do_throw(std::runtime_error, ": bad type");
945 }
946 }
947 case value_variant_type::Type::Type4: {
948 switch(arg1.m_type)
949 {
950 case distance_u::Type::Type0: {
951 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
952 }
953 case distance_u::Type::Type1: {
954 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
955 }
956 case distance_u::Type::Type2: {
957 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
958 }
959 case distance_u::Type::Type3: {
960 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
961 }
962 case distance_u::Type::Type4: {
963 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
964 }
965 case distance_u::Type::Type5: {
966 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
967 }
968 case distance_u::Type::Type6: {
969 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
970 }
971 case distance_u::Type::Type7: {
972 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
973 }
974 case distance_u::Type::Type8: {
975 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
976 }
977 case distance_u::Type::Type9: {
978 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
979 }
980 case distance_u::Type::Type10: {
981 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value10);
982 }
983 default:
984 ossia_do_throw(std::runtime_error, ": bad type");
985 }
986 }
987 case value_variant_type::Type::Type5: {
988 switch(arg1.m_type)
989 {
990 case distance_u::Type::Type0: {
991 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
992 }
993 case distance_u::Type::Type1: {
994 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
995 }
996 case distance_u::Type::Type2: {
997 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
998 }
999 case distance_u::Type::Type3: {
1000 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
1001 }
1002 case distance_u::Type::Type4: {
1003 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
1004 }
1005 case distance_u::Type::Type5: {
1006 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
1007 }
1008 case distance_u::Type::Type6: {
1009 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
1010 }
1011 case distance_u::Type::Type7: {
1012 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
1013 }
1014 case distance_u::Type::Type8: {
1015 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
1016 }
1017 case distance_u::Type::Type9: {
1018 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
1019 }
1020 case distance_u::Type::Type10: {
1021 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value10);
1022 }
1023 default:
1024 ossia_do_throw(std::runtime_error, ": bad type");
1025 }
1026 }
1027 case value_variant_type::Type::Type6: {
1028 switch(arg1.m_type)
1029 {
1030 case distance_u::Type::Type0: {
1031 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1032 }
1033 case distance_u::Type::Type1: {
1034 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1035 }
1036 case distance_u::Type::Type2: {
1037 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1038 }
1039 case distance_u::Type::Type3: {
1040 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
1041 }
1042 case distance_u::Type::Type4: {
1043 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
1044 }
1045 case distance_u::Type::Type5: {
1046 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
1047 }
1048 case distance_u::Type::Type6: {
1049 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
1050 }
1051 case distance_u::Type::Type7: {
1052 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
1053 }
1054 case distance_u::Type::Type8: {
1055 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
1056 }
1057 case distance_u::Type::Type9: {
1058 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
1059 }
1060 case distance_u::Type::Type10: {
1061 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value10);
1062 }
1063 default:
1064 ossia_do_throw(std::runtime_error, ": bad type");
1065 }
1066 }
1067 case value_variant_type::Type::Type7: {
1068 switch(arg1.m_type)
1069 {
1070 case distance_u::Type::Type0: {
1071 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1072 }
1073 case distance_u::Type::Type1: {
1074 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1075 }
1076 case distance_u::Type::Type2: {
1077 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1078 }
1079 case distance_u::Type::Type3: {
1080 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
1081 }
1082 case distance_u::Type::Type4: {
1083 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
1084 }
1085 case distance_u::Type::Type5: {
1086 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
1087 }
1088 case distance_u::Type::Type6: {
1089 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
1090 }
1091 case distance_u::Type::Type7: {
1092 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
1093 }
1094 case distance_u::Type::Type8: {
1095 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
1096 }
1097 case distance_u::Type::Type9: {
1098 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
1099 }
1100 case distance_u::Type::Type10: {
1101 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value10);
1102 }
1103 default:
1104 ossia_do_throw(std::runtime_error, ": bad type");
1105 }
1106 }
1107 case value_variant_type::Type::Type8: {
1108 switch(arg1.m_type)
1109 {
1110 case distance_u::Type::Type0: {
1111 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1112 }
1113 case distance_u::Type::Type1: {
1114 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1115 }
1116 case distance_u::Type::Type2: {
1117 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1118 }
1119 case distance_u::Type::Type3: {
1120 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
1121 }
1122 case distance_u::Type::Type4: {
1123 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
1124 }
1125 case distance_u::Type::Type5: {
1126 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
1127 }
1128 case distance_u::Type::Type6: {
1129 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
1130 }
1131 case distance_u::Type::Type7: {
1132 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
1133 }
1134 case distance_u::Type::Type8: {
1135 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
1136 }
1137 case distance_u::Type::Type9: {
1138 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
1139 }
1140 case distance_u::Type::Type10: {
1141 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value10);
1142 }
1143 default:
1144 ossia_do_throw(std::runtime_error, ": bad type");
1145 }
1146 }
1147 case value_variant_type::Type::Type9: {
1148 switch(arg1.m_type)
1149 {
1150 case distance_u::Type::Type0: {
1151 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
1152 }
1153 case distance_u::Type::Type1: {
1154 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
1155 }
1156 case distance_u::Type::Type2: {
1157 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
1158 }
1159 case distance_u::Type::Type3: {
1160 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
1161 }
1162 case distance_u::Type::Type4: {
1163 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
1164 }
1165 case distance_u::Type::Type5: {
1166 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
1167 }
1168 case distance_u::Type::Type6: {
1169 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
1170 }
1171 case distance_u::Type::Type7: {
1172 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
1173 }
1174 case distance_u::Type::Type8: {
1175 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
1176 }
1177 case distance_u::Type::Type9: {
1178 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value9);
1179 }
1180 case distance_u::Type::Type10: {
1181 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value10);
1182 }
1183 default:
1184 ossia_do_throw(std::runtime_error, ": bad type");
1185 }
1186 }
1187 default:
1188 ossia_do_throw(std::runtime_error, ": bad type");
1189 }
1190}
1191template <typename Functor>
1192auto apply(Functor&& functor, const value_variant_type& arg0, const gain_u& arg1)
1193{
1194 switch(arg0.m_type)
1195 {
1196 case value_variant_type::Type::Type0: {
1197 switch(arg1.m_type)
1198 {
1199 case gain_u::Type::Type0: {
1200 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1201 }
1202 case gain_u::Type::Type1: {
1203 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1204 }
1205 case gain_u::Type::Type2: {
1206 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1207 }
1208 case gain_u::Type::Type3: {
1209 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
1210 }
1211 default:
1212 ossia_do_throw(std::runtime_error, ": bad type");
1213 }
1214 }
1215 case value_variant_type::Type::Type1: {
1216 switch(arg1.m_type)
1217 {
1218 case gain_u::Type::Type0: {
1219 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1220 }
1221 case gain_u::Type::Type1: {
1222 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1223 }
1224 case gain_u::Type::Type2: {
1225 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1226 }
1227 case gain_u::Type::Type3: {
1228 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
1229 }
1230 default:
1231 ossia_do_throw(std::runtime_error, ": bad type");
1232 }
1233 }
1234 case value_variant_type::Type::Type2: {
1235 switch(arg1.m_type)
1236 {
1237 case gain_u::Type::Type0: {
1238 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1239 }
1240 case gain_u::Type::Type1: {
1241 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1242 }
1243 case gain_u::Type::Type2: {
1244 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1245 }
1246 case gain_u::Type::Type3: {
1247 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
1248 }
1249 default:
1250 ossia_do_throw(std::runtime_error, ": bad type");
1251 }
1252 }
1253 case value_variant_type::Type::Type3: {
1254 switch(arg1.m_type)
1255 {
1256 case gain_u::Type::Type0: {
1257 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1258 }
1259 case gain_u::Type::Type1: {
1260 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1261 }
1262 case gain_u::Type::Type2: {
1263 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1264 }
1265 case gain_u::Type::Type3: {
1266 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
1267 }
1268 default:
1269 ossia_do_throw(std::runtime_error, ": bad type");
1270 }
1271 }
1272 case value_variant_type::Type::Type4: {
1273 switch(arg1.m_type)
1274 {
1275 case gain_u::Type::Type0: {
1276 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
1277 }
1278 case gain_u::Type::Type1: {
1279 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
1280 }
1281 case gain_u::Type::Type2: {
1282 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
1283 }
1284 case gain_u::Type::Type3: {
1285 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
1286 }
1287 default:
1288 ossia_do_throw(std::runtime_error, ": bad type");
1289 }
1290 }
1291 case value_variant_type::Type::Type5: {
1292 switch(arg1.m_type)
1293 {
1294 case gain_u::Type::Type0: {
1295 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
1296 }
1297 case gain_u::Type::Type1: {
1298 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
1299 }
1300 case gain_u::Type::Type2: {
1301 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
1302 }
1303 case gain_u::Type::Type3: {
1304 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
1305 }
1306 default:
1307 ossia_do_throw(std::runtime_error, ": bad type");
1308 }
1309 }
1310 case value_variant_type::Type::Type6: {
1311 switch(arg1.m_type)
1312 {
1313 case gain_u::Type::Type0: {
1314 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1315 }
1316 case gain_u::Type::Type1: {
1317 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1318 }
1319 case gain_u::Type::Type2: {
1320 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1321 }
1322 case gain_u::Type::Type3: {
1323 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
1324 }
1325 default:
1326 ossia_do_throw(std::runtime_error, ": bad type");
1327 }
1328 }
1329 case value_variant_type::Type::Type7: {
1330 switch(arg1.m_type)
1331 {
1332 case gain_u::Type::Type0: {
1333 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1334 }
1335 case gain_u::Type::Type1: {
1336 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1337 }
1338 case gain_u::Type::Type2: {
1339 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1340 }
1341 case gain_u::Type::Type3: {
1342 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
1343 }
1344 default:
1345 ossia_do_throw(std::runtime_error, ": bad type");
1346 }
1347 }
1348 case value_variant_type::Type::Type8: {
1349 switch(arg1.m_type)
1350 {
1351 case gain_u::Type::Type0: {
1352 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1353 }
1354 case gain_u::Type::Type1: {
1355 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1356 }
1357 case gain_u::Type::Type2: {
1358 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1359 }
1360 case gain_u::Type::Type3: {
1361 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
1362 }
1363 default:
1364 ossia_do_throw(std::runtime_error, ": bad type");
1365 }
1366 }
1367 case value_variant_type::Type::Type9: {
1368 switch(arg1.m_type)
1369 {
1370 case gain_u::Type::Type0: {
1371 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
1372 }
1373 case gain_u::Type::Type1: {
1374 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
1375 }
1376 case gain_u::Type::Type2: {
1377 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
1378 }
1379 case gain_u::Type::Type3: {
1380 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
1381 }
1382 default:
1383 ossia_do_throw(std::runtime_error, ": bad type");
1384 }
1385 }
1386 default:
1387 ossia_do_throw(std::runtime_error, ": bad type");
1388 }
1389}
1390template <typename Functor>
1391auto apply(Functor&& functor, const value_variant_type& arg0, const orientation_u& arg1)
1392{
1393 switch(arg0.m_type)
1394 {
1395 case value_variant_type::Type::Type0: {
1396 switch(arg1.m_type)
1397 {
1398 case orientation_u::Type::Type0: {
1399 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1400 }
1401 case orientation_u::Type::Type1: {
1402 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1403 }
1404 case orientation_u::Type::Type2: {
1405 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1406 }
1407 default:
1408 ossia_do_throw(std::runtime_error, ": bad type");
1409 }
1410 }
1411 case value_variant_type::Type::Type1: {
1412 switch(arg1.m_type)
1413 {
1414 case orientation_u::Type::Type0: {
1415 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1416 }
1417 case orientation_u::Type::Type1: {
1418 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1419 }
1420 case orientation_u::Type::Type2: {
1421 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1422 }
1423 default:
1424 ossia_do_throw(std::runtime_error, ": bad type");
1425 }
1426 }
1427 case value_variant_type::Type::Type2: {
1428 switch(arg1.m_type)
1429 {
1430 case orientation_u::Type::Type0: {
1431 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1432 }
1433 case orientation_u::Type::Type1: {
1434 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1435 }
1436 case orientation_u::Type::Type2: {
1437 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1438 }
1439 default:
1440 ossia_do_throw(std::runtime_error, ": bad type");
1441 }
1442 }
1443 case value_variant_type::Type::Type3: {
1444 switch(arg1.m_type)
1445 {
1446 case orientation_u::Type::Type0: {
1447 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1448 }
1449 case orientation_u::Type::Type1: {
1450 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1451 }
1452 case orientation_u::Type::Type2: {
1453 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1454 }
1455 default:
1456 ossia_do_throw(std::runtime_error, ": bad type");
1457 }
1458 }
1459 case value_variant_type::Type::Type4: {
1460 switch(arg1.m_type)
1461 {
1462 case orientation_u::Type::Type0: {
1463 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
1464 }
1465 case orientation_u::Type::Type1: {
1466 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
1467 }
1468 case orientation_u::Type::Type2: {
1469 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
1470 }
1471 default:
1472 ossia_do_throw(std::runtime_error, ": bad type");
1473 }
1474 }
1475 case value_variant_type::Type::Type5: {
1476 switch(arg1.m_type)
1477 {
1478 case orientation_u::Type::Type0: {
1479 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
1480 }
1481 case orientation_u::Type::Type1: {
1482 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
1483 }
1484 case orientation_u::Type::Type2: {
1485 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
1486 }
1487 default:
1488 ossia_do_throw(std::runtime_error, ": bad type");
1489 }
1490 }
1491 case value_variant_type::Type::Type6: {
1492 switch(arg1.m_type)
1493 {
1494 case orientation_u::Type::Type0: {
1495 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1496 }
1497 case orientation_u::Type::Type1: {
1498 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1499 }
1500 case orientation_u::Type::Type2: {
1501 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1502 }
1503 default:
1504 ossia_do_throw(std::runtime_error, ": bad type");
1505 }
1506 }
1507 case value_variant_type::Type::Type7: {
1508 switch(arg1.m_type)
1509 {
1510 case orientation_u::Type::Type0: {
1511 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1512 }
1513 case orientation_u::Type::Type1: {
1514 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1515 }
1516 case orientation_u::Type::Type2: {
1517 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1518 }
1519 default:
1520 ossia_do_throw(std::runtime_error, ": bad type");
1521 }
1522 }
1523 case value_variant_type::Type::Type8: {
1524 switch(arg1.m_type)
1525 {
1526 case orientation_u::Type::Type0: {
1527 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1528 }
1529 case orientation_u::Type::Type1: {
1530 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1531 }
1532 case orientation_u::Type::Type2: {
1533 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1534 }
1535 default:
1536 ossia_do_throw(std::runtime_error, ": bad type");
1537 }
1538 }
1539 case value_variant_type::Type::Type9: {
1540 switch(arg1.m_type)
1541 {
1542 case orientation_u::Type::Type0: {
1543 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
1544 }
1545 case orientation_u::Type::Type1: {
1546 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
1547 }
1548 case orientation_u::Type::Type2: {
1549 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
1550 }
1551 default:
1552 ossia_do_throw(std::runtime_error, ": bad type");
1553 }
1554 }
1555 default:
1556 ossia_do_throw(std::runtime_error, ": bad type");
1557 }
1558}
1559template <typename Functor>
1560auto apply(Functor&& functor, const value_variant_type& arg0, const position_u& arg1)
1561{
1562 switch(arg0.m_type)
1563 {
1564 case value_variant_type::Type::Type0: {
1565 switch(arg1.m_type)
1566 {
1567 case position_u::Type::Type0: {
1568 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1569 }
1570 case position_u::Type::Type1: {
1571 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1572 }
1573 case position_u::Type::Type2: {
1574 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1575 }
1576 case position_u::Type::Type3: {
1577 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
1578 }
1579 case position_u::Type::Type4: {
1580 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
1581 }
1582 case position_u::Type::Type5: {
1583 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
1584 }
1585 case position_u::Type::Type6: {
1586 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
1587 }
1588 case position_u::Type::Type7: {
1589 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
1590 }
1591 case position_u::Type::Type8: {
1592 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
1593 }
1594 default:
1595 ossia_do_throw(std::runtime_error, ": bad type");
1596 }
1597 }
1598 case value_variant_type::Type::Type1: {
1599 switch(arg1.m_type)
1600 {
1601 case position_u::Type::Type0: {
1602 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1603 }
1604 case position_u::Type::Type1: {
1605 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1606 }
1607 case position_u::Type::Type2: {
1608 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1609 }
1610 case position_u::Type::Type3: {
1611 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
1612 }
1613 case position_u::Type::Type4: {
1614 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
1615 }
1616 case position_u::Type::Type5: {
1617 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
1618 }
1619 case position_u::Type::Type6: {
1620 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
1621 }
1622 case position_u::Type::Type7: {
1623 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
1624 }
1625 case position_u::Type::Type8: {
1626 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
1627 }
1628 default:
1629 ossia_do_throw(std::runtime_error, ": bad type");
1630 }
1631 }
1632 case value_variant_type::Type::Type2: {
1633 switch(arg1.m_type)
1634 {
1635 case position_u::Type::Type0: {
1636 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1637 }
1638 case position_u::Type::Type1: {
1639 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1640 }
1641 case position_u::Type::Type2: {
1642 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1643 }
1644 case position_u::Type::Type3: {
1645 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
1646 }
1647 case position_u::Type::Type4: {
1648 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
1649 }
1650 case position_u::Type::Type5: {
1651 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
1652 }
1653 case position_u::Type::Type6: {
1654 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
1655 }
1656 case position_u::Type::Type7: {
1657 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
1658 }
1659 case position_u::Type::Type8: {
1660 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
1661 }
1662 default:
1663 ossia_do_throw(std::runtime_error, ": bad type");
1664 }
1665 }
1666 case value_variant_type::Type::Type3: {
1667 switch(arg1.m_type)
1668 {
1669 case position_u::Type::Type0: {
1670 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1671 }
1672 case position_u::Type::Type1: {
1673 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1674 }
1675 case position_u::Type::Type2: {
1676 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1677 }
1678 case position_u::Type::Type3: {
1679 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
1680 }
1681 case position_u::Type::Type4: {
1682 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
1683 }
1684 case position_u::Type::Type5: {
1685 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
1686 }
1687 case position_u::Type::Type6: {
1688 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
1689 }
1690 case position_u::Type::Type7: {
1691 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
1692 }
1693 case position_u::Type::Type8: {
1694 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
1695 }
1696 default:
1697 ossia_do_throw(std::runtime_error, ": bad type");
1698 }
1699 }
1700 case value_variant_type::Type::Type4: {
1701 switch(arg1.m_type)
1702 {
1703 case position_u::Type::Type0: {
1704 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
1705 }
1706 case position_u::Type::Type1: {
1707 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
1708 }
1709 case position_u::Type::Type2: {
1710 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
1711 }
1712 case position_u::Type::Type3: {
1713 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
1714 }
1715 case position_u::Type::Type4: {
1716 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
1717 }
1718 case position_u::Type::Type5: {
1719 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
1720 }
1721 case position_u::Type::Type6: {
1722 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
1723 }
1724 case position_u::Type::Type7: {
1725 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
1726 }
1727 case position_u::Type::Type8: {
1728 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
1729 }
1730 default:
1731 ossia_do_throw(std::runtime_error, ": bad type");
1732 }
1733 }
1734 case value_variant_type::Type::Type5: {
1735 switch(arg1.m_type)
1736 {
1737 case position_u::Type::Type0: {
1738 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
1739 }
1740 case position_u::Type::Type1: {
1741 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
1742 }
1743 case position_u::Type::Type2: {
1744 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
1745 }
1746 case position_u::Type::Type3: {
1747 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
1748 }
1749 case position_u::Type::Type4: {
1750 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
1751 }
1752 case position_u::Type::Type5: {
1753 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
1754 }
1755 case position_u::Type::Type6: {
1756 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
1757 }
1758 case position_u::Type::Type7: {
1759 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
1760 }
1761 case position_u::Type::Type8: {
1762 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
1763 }
1764 default:
1765 ossia_do_throw(std::runtime_error, ": bad type");
1766 }
1767 }
1768 case value_variant_type::Type::Type6: {
1769 switch(arg1.m_type)
1770 {
1771 case position_u::Type::Type0: {
1772 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1773 }
1774 case position_u::Type::Type1: {
1775 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1776 }
1777 case position_u::Type::Type2: {
1778 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1779 }
1780 case position_u::Type::Type3: {
1781 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
1782 }
1783 case position_u::Type::Type4: {
1784 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
1785 }
1786 case position_u::Type::Type5: {
1787 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
1788 }
1789 case position_u::Type::Type6: {
1790 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
1791 }
1792 case position_u::Type::Type7: {
1793 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
1794 }
1795 case position_u::Type::Type8: {
1796 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
1797 }
1798 default:
1799 ossia_do_throw(std::runtime_error, ": bad type");
1800 }
1801 }
1802 case value_variant_type::Type::Type7: {
1803 switch(arg1.m_type)
1804 {
1805 case position_u::Type::Type0: {
1806 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1807 }
1808 case position_u::Type::Type1: {
1809 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1810 }
1811 case position_u::Type::Type2: {
1812 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1813 }
1814 case position_u::Type::Type3: {
1815 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
1816 }
1817 case position_u::Type::Type4: {
1818 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
1819 }
1820 case position_u::Type::Type5: {
1821 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
1822 }
1823 case position_u::Type::Type6: {
1824 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
1825 }
1826 case position_u::Type::Type7: {
1827 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
1828 }
1829 case position_u::Type::Type8: {
1830 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
1831 }
1832 default:
1833 ossia_do_throw(std::runtime_error, ": bad type");
1834 }
1835 }
1836 case value_variant_type::Type::Type8: {
1837 switch(arg1.m_type)
1838 {
1839 case position_u::Type::Type0: {
1840 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1841 }
1842 case position_u::Type::Type1: {
1843 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1844 }
1845 case position_u::Type::Type2: {
1846 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1847 }
1848 case position_u::Type::Type3: {
1849 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
1850 }
1851 case position_u::Type::Type4: {
1852 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
1853 }
1854 case position_u::Type::Type5: {
1855 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
1856 }
1857 case position_u::Type::Type6: {
1858 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
1859 }
1860 case position_u::Type::Type7: {
1861 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
1862 }
1863 case position_u::Type::Type8: {
1864 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
1865 }
1866 default:
1867 ossia_do_throw(std::runtime_error, ": bad type");
1868 }
1869 }
1870 default:
1871 ossia_do_throw(std::runtime_error, ": bad type");
1872 }
1873}
1874template <typename Functor>
1875auto apply(Functor&& functor, const value_variant_type& arg0, const speed_u& arg1)
1876{
1877 switch(arg0.m_type)
1878 {
1879 case value_variant_type::Type::Type0: {
1880 switch(arg1.m_type)
1881 {
1882 case speed_u::Type::Type0: {
1883 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1884 }
1885 case speed_u::Type::Type1: {
1886 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1887 }
1888 case speed_u::Type::Type2: {
1889 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1890 }
1891 case speed_u::Type::Type3: {
1892 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
1893 }
1894 case speed_u::Type::Type4: {
1895 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
1896 }
1897 case speed_u::Type::Type5: {
1898 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
1899 }
1900 default:
1901 ossia_do_throw(std::runtime_error, ": bad type");
1902 }
1903 }
1904 case value_variant_type::Type::Type1: {
1905 switch(arg1.m_type)
1906 {
1907 case speed_u::Type::Type0: {
1908 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1909 }
1910 case speed_u::Type::Type1: {
1911 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1912 }
1913 case speed_u::Type::Type2: {
1914 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1915 }
1916 case speed_u::Type::Type3: {
1917 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
1918 }
1919 case speed_u::Type::Type4: {
1920 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
1921 }
1922 case speed_u::Type::Type5: {
1923 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
1924 }
1925 default:
1926 ossia_do_throw(std::runtime_error, ": bad type");
1927 }
1928 }
1929 case value_variant_type::Type::Type2: {
1930 switch(arg1.m_type)
1931 {
1932 case speed_u::Type::Type0: {
1933 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1934 }
1935 case speed_u::Type::Type1: {
1936 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1937 }
1938 case speed_u::Type::Type2: {
1939 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1940 }
1941 case speed_u::Type::Type3: {
1942 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
1943 }
1944 case speed_u::Type::Type4: {
1945 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
1946 }
1947 case speed_u::Type::Type5: {
1948 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
1949 }
1950 default:
1951 ossia_do_throw(std::runtime_error, ": bad type");
1952 }
1953 }
1954 case value_variant_type::Type::Type3: {
1955 switch(arg1.m_type)
1956 {
1957 case speed_u::Type::Type0: {
1958 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1959 }
1960 case speed_u::Type::Type1: {
1961 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1962 }
1963 case speed_u::Type::Type2: {
1964 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1965 }
1966 case speed_u::Type::Type3: {
1967 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
1968 }
1969 case speed_u::Type::Type4: {
1970 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
1971 }
1972 case speed_u::Type::Type5: {
1973 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
1974 }
1975 default:
1976 ossia_do_throw(std::runtime_error, ": bad type");
1977 }
1978 }
1979 case value_variant_type::Type::Type4: {
1980 switch(arg1.m_type)
1981 {
1982 case speed_u::Type::Type0: {
1983 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
1984 }
1985 case speed_u::Type::Type1: {
1986 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
1987 }
1988 case speed_u::Type::Type2: {
1989 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
1990 }
1991 case speed_u::Type::Type3: {
1992 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
1993 }
1994 case speed_u::Type::Type4: {
1995 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
1996 }
1997 case speed_u::Type::Type5: {
1998 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
1999 }
2000 default:
2001 ossia_do_throw(std::runtime_error, ": bad type");
2002 }
2003 }
2004 case value_variant_type::Type::Type5: {
2005 switch(arg1.m_type)
2006 {
2007 case speed_u::Type::Type0: {
2008 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
2009 }
2010 case speed_u::Type::Type1: {
2011 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
2012 }
2013 case speed_u::Type::Type2: {
2014 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
2015 }
2016 case speed_u::Type::Type3: {
2017 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
2018 }
2019 case speed_u::Type::Type4: {
2020 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
2021 }
2022 case speed_u::Type::Type5: {
2023 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
2024 }
2025 default:
2026 ossia_do_throw(std::runtime_error, ": bad type");
2027 }
2028 }
2029 case value_variant_type::Type::Type6: {
2030 switch(arg1.m_type)
2031 {
2032 case speed_u::Type::Type0: {
2033 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
2034 }
2035 case speed_u::Type::Type1: {
2036 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
2037 }
2038 case speed_u::Type::Type2: {
2039 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
2040 }
2041 case speed_u::Type::Type3: {
2042 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
2043 }
2044 case speed_u::Type::Type4: {
2045 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
2046 }
2047 case speed_u::Type::Type5: {
2048 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
2049 }
2050 default:
2051 ossia_do_throw(std::runtime_error, ": bad type");
2052 }
2053 }
2054 case value_variant_type::Type::Type7: {
2055 switch(arg1.m_type)
2056 {
2057 case speed_u::Type::Type0: {
2058 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
2059 }
2060 case speed_u::Type::Type1: {
2061 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
2062 }
2063 case speed_u::Type::Type2: {
2064 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
2065 }
2066 case speed_u::Type::Type3: {
2067 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
2068 }
2069 case speed_u::Type::Type4: {
2070 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
2071 }
2072 case speed_u::Type::Type5: {
2073 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
2074 }
2075 default:
2076 ossia_do_throw(std::runtime_error, ": bad type");
2077 }
2078 }
2079 case value_variant_type::Type::Type8: {
2080 switch(arg1.m_type)
2081 {
2082 case speed_u::Type::Type0: {
2083 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
2084 }
2085 case speed_u::Type::Type1: {
2086 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
2087 }
2088 case speed_u::Type::Type2: {
2089 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
2090 }
2091 case speed_u::Type::Type3: {
2092 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
2093 }
2094 case speed_u::Type::Type4: {
2095 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
2096 }
2097 case speed_u::Type::Type5: {
2098 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
2099 }
2100 default:
2101 ossia_do_throw(std::runtime_error, ": bad type");
2102 }
2103 }
2104 case value_variant_type::Type::Type9: {
2105 switch(arg1.m_type)
2106 {
2107 case speed_u::Type::Type0: {
2108 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
2109 }
2110 case speed_u::Type::Type1: {
2111 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
2112 }
2113 case speed_u::Type::Type2: {
2114 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
2115 }
2116 case speed_u::Type::Type3: {
2117 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
2118 }
2119 case speed_u::Type::Type4: {
2120 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
2121 }
2122 case speed_u::Type::Type5: {
2123 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
2124 }
2125 default:
2126 ossia_do_throw(std::runtime_error, ": bad type");
2127 }
2128 }
2129 default:
2130 ossia_do_throw(std::runtime_error, ": bad type");
2131 }
2132}
2133template <typename Functor>
2134auto apply(Functor&& functor, const value_variant_type& arg0, const timing_u& arg1)
2135{
2136 switch(arg0.m_type)
2137 {
2138 case value_variant_type::Type::Type0: {
2139 switch(arg1.m_type)
2140 {
2141 case timing_u::Type::Type0: {
2142 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
2143 }
2144 case timing_u::Type::Type1: {
2145 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
2146 }
2147 case timing_u::Type::Type2: {
2148 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
2149 }
2150 case timing_u::Type::Type3: {
2151 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
2152 }
2153 case timing_u::Type::Type4: {
2154 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
2155 }
2156 case timing_u::Type::Type5: {
2157 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
2158 }
2159 case timing_u::Type::Type6: {
2160 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
2161 }
2162 case timing_u::Type::Type7: {
2163 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
2164 }
2165 case timing_u::Type::Type8: {
2166 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
2167 }
2168 default:
2169 ossia_do_throw(std::runtime_error, ": bad type");
2170 }
2171 }
2172 case value_variant_type::Type::Type1: {
2173 switch(arg1.m_type)
2174 {
2175 case timing_u::Type::Type0: {
2176 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
2177 }
2178 case timing_u::Type::Type1: {
2179 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
2180 }
2181 case timing_u::Type::Type2: {
2182 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
2183 }
2184 case timing_u::Type::Type3: {
2185 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
2186 }
2187 case timing_u::Type::Type4: {
2188 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
2189 }
2190 case timing_u::Type::Type5: {
2191 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
2192 }
2193 case timing_u::Type::Type6: {
2194 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
2195 }
2196 case timing_u::Type::Type7: {
2197 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
2198 }
2199 case timing_u::Type::Type8: {
2200 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
2201 }
2202 default:
2203 ossia_do_throw(std::runtime_error, ": bad type");
2204 }
2205 }
2206 case value_variant_type::Type::Type2: {
2207 switch(arg1.m_type)
2208 {
2209 case timing_u::Type::Type0: {
2210 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
2211 }
2212 case timing_u::Type::Type1: {
2213 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
2214 }
2215 case timing_u::Type::Type2: {
2216 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
2217 }
2218 case timing_u::Type::Type3: {
2219 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
2220 }
2221 case timing_u::Type::Type4: {
2222 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
2223 }
2224 case timing_u::Type::Type5: {
2225 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
2226 }
2227 case timing_u::Type::Type6: {
2228 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
2229 }
2230 case timing_u::Type::Type7: {
2231 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
2232 }
2233 case timing_u::Type::Type8: {
2234 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
2235 }
2236 default:
2237 ossia_do_throw(std::runtime_error, ": bad type");
2238 }
2239 }
2240 case value_variant_type::Type::Type3: {
2241 switch(arg1.m_type)
2242 {
2243 case timing_u::Type::Type0: {
2244 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
2245 }
2246 case timing_u::Type::Type1: {
2247 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
2248 }
2249 case timing_u::Type::Type2: {
2250 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
2251 }
2252 case timing_u::Type::Type3: {
2253 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
2254 }
2255 case timing_u::Type::Type4: {
2256 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
2257 }
2258 case timing_u::Type::Type5: {
2259 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
2260 }
2261 case timing_u::Type::Type6: {
2262 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
2263 }
2264 case timing_u::Type::Type7: {
2265 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
2266 }
2267 case timing_u::Type::Type8: {
2268 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
2269 }
2270 default:
2271 ossia_do_throw(std::runtime_error, ": bad type");
2272 }
2273 }
2274 case value_variant_type::Type::Type4: {
2275 switch(arg1.m_type)
2276 {
2277 case timing_u::Type::Type0: {
2278 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
2279 }
2280 case timing_u::Type::Type1: {
2281 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
2282 }
2283 case timing_u::Type::Type2: {
2284 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
2285 }
2286 case timing_u::Type::Type3: {
2287 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
2288 }
2289 case timing_u::Type::Type4: {
2290 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
2291 }
2292 case timing_u::Type::Type5: {
2293 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
2294 }
2295 case timing_u::Type::Type6: {
2296 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
2297 }
2298 case timing_u::Type::Type7: {
2299 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
2300 }
2301 case timing_u::Type::Type8: {
2302 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
2303 }
2304 default:
2305 ossia_do_throw(std::runtime_error, ": bad type");
2306 }
2307 }
2308 case value_variant_type::Type::Type5: {
2309 switch(arg1.m_type)
2310 {
2311 case timing_u::Type::Type0: {
2312 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
2313 }
2314 case timing_u::Type::Type1: {
2315 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
2316 }
2317 case timing_u::Type::Type2: {
2318 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
2319 }
2320 case timing_u::Type::Type3: {
2321 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
2322 }
2323 case timing_u::Type::Type4: {
2324 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
2325 }
2326 case timing_u::Type::Type5: {
2327 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
2328 }
2329 case timing_u::Type::Type6: {
2330 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
2331 }
2332 case timing_u::Type::Type7: {
2333 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
2334 }
2335 case timing_u::Type::Type8: {
2336 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
2337 }
2338 default:
2339 ossia_do_throw(std::runtime_error, ": bad type");
2340 }
2341 }
2342 case value_variant_type::Type::Type6: {
2343 switch(arg1.m_type)
2344 {
2345 case timing_u::Type::Type0: {
2346 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
2347 }
2348 case timing_u::Type::Type1: {
2349 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
2350 }
2351 case timing_u::Type::Type2: {
2352 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
2353 }
2354 case timing_u::Type::Type3: {
2355 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
2356 }
2357 case timing_u::Type::Type4: {
2358 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
2359 }
2360 case timing_u::Type::Type5: {
2361 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
2362 }
2363 case timing_u::Type::Type6: {
2364 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
2365 }
2366 case timing_u::Type::Type7: {
2367 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
2368 }
2369 case timing_u::Type::Type8: {
2370 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
2371 }
2372 default:
2373 ossia_do_throw(std::runtime_error, ": bad type");
2374 }
2375 }
2376 case value_variant_type::Type::Type7: {
2377 switch(arg1.m_type)
2378 {
2379 case timing_u::Type::Type0: {
2380 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
2381 }
2382 case timing_u::Type::Type1: {
2383 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
2384 }
2385 case timing_u::Type::Type2: {
2386 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
2387 }
2388 case timing_u::Type::Type3: {
2389 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
2390 }
2391 case timing_u::Type::Type4: {
2392 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
2393 }
2394 case timing_u::Type::Type5: {
2395 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
2396 }
2397 case timing_u::Type::Type6: {
2398 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
2399 }
2400 case timing_u::Type::Type7: {
2401 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
2402 }
2403 case timing_u::Type::Type8: {
2404 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
2405 }
2406 default:
2407 ossia_do_throw(std::runtime_error, ": bad type");
2408 }
2409 }
2410 case value_variant_type::Type::Type8: {
2411 switch(arg1.m_type)
2412 {
2413 case timing_u::Type::Type0: {
2414 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
2415 }
2416 case timing_u::Type::Type1: {
2417 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
2418 }
2419 case timing_u::Type::Type2: {
2420 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
2421 }
2422 case timing_u::Type::Type3: {
2423 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
2424 }
2425 case timing_u::Type::Type4: {
2426 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
2427 }
2428 case timing_u::Type::Type5: {
2429 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
2430 }
2431 case timing_u::Type::Type6: {
2432 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
2433 }
2434 case timing_u::Type::Type7: {
2435 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
2436 }
2437 case timing_u::Type::Type8: {
2438 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
2439 }
2440 default:
2441 ossia_do_throw(std::runtime_error, ": bad type");
2442 }
2443 }
2444 case value_variant_type::Type::Type9: {
2445 switch(arg1.m_type)
2446 {
2447 case timing_u::Type::Type0: {
2448 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
2449 }
2450 case timing_u::Type::Type1: {
2451 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
2452 }
2453 case timing_u::Type::Type2: {
2454 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
2455 }
2456 case timing_u::Type::Type3: {
2457 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
2458 }
2459 case timing_u::Type::Type4: {
2460 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
2461 }
2462 case timing_u::Type::Type5: {
2463 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
2464 }
2465 case timing_u::Type::Type6: {
2466 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
2467 }
2468 case timing_u::Type::Type7: {
2469 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
2470 }
2471 case timing_u::Type::Type8: {
2472 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
2473 }
2474 default:
2475 ossia_do_throw(std::runtime_error, ": bad type");
2476 }
2477 }
2478 default:
2479 ossia_do_throw(std::runtime_error, ": bad type");
2480 }
2481}
2482template <typename Functor>
2483auto apply(Functor&& functor, const angle& arg0, const angle_u& arg1)
2484{
2485 switch(arg0.m_type)
2486 {
2487 case angle::Type::Type0: {
2488 switch(arg1.m_type)
2489 {
2490 case angle_u::Type::Type0: {
2491 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
2492 }
2493 case angle_u::Type::Type1: {
2494 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
2495 }
2496 default:
2497 ossia_do_throw(std::runtime_error, ": bad type");
2498 }
2499 }
2500 case angle::Type::Type1: {
2501 switch(arg1.m_type)
2502 {
2503 case angle_u::Type::Type0: {
2504 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
2505 }
2506 case angle_u::Type::Type1: {
2507 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
2508 }
2509 default:
2510 ossia_do_throw(std::runtime_error, ": bad type");
2511 }
2512 }
2513 default:
2514 ossia_do_throw(std::runtime_error, ": bad type");
2515 }
2516}
2517template <typename Functor>
2518auto apply(Functor&& functor, const color& arg0, const color_u& arg1)
2519{
2520 switch(arg0.m_type)
2521 {
2522 case color::Type::Type0: {
2523 switch(arg1.m_type)
2524 {
2525 case color_u::Type::Type0: {
2526 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
2527 }
2528 case color_u::Type::Type1: {
2529 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
2530 }
2531 case color_u::Type::Type2: {
2532 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
2533 }
2534 case color_u::Type::Type3: {
2535 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
2536 }
2537 case color_u::Type::Type4: {
2538 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
2539 }
2540 case color_u::Type::Type5: {
2541 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
2542 }
2543 case color_u::Type::Type6: {
2544 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
2545 }
2546 case color_u::Type::Type7: {
2547 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
2548 }
2549 case color_u::Type::Type8: {
2550 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
2551 }
2552 default:
2553 ossia_do_throw(std::runtime_error, ": bad type");
2554 }
2555 }
2556 case color::Type::Type1: {
2557 switch(arg1.m_type)
2558 {
2559 case color_u::Type::Type0: {
2560 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
2561 }
2562 case color_u::Type::Type1: {
2563 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
2564 }
2565 case color_u::Type::Type2: {
2566 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
2567 }
2568 case color_u::Type::Type3: {
2569 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
2570 }
2571 case color_u::Type::Type4: {
2572 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
2573 }
2574 case color_u::Type::Type5: {
2575 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
2576 }
2577 case color_u::Type::Type6: {
2578 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
2579 }
2580 case color_u::Type::Type7: {
2581 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
2582 }
2583 case color_u::Type::Type8: {
2584 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
2585 }
2586 default:
2587 ossia_do_throw(std::runtime_error, ": bad type");
2588 }
2589 }
2590 case color::Type::Type2: {
2591 switch(arg1.m_type)
2592 {
2593 case color_u::Type::Type0: {
2594 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
2595 }
2596 case color_u::Type::Type1: {
2597 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
2598 }
2599 case color_u::Type::Type2: {
2600 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
2601 }
2602 case color_u::Type::Type3: {
2603 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
2604 }
2605 case color_u::Type::Type4: {
2606 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
2607 }
2608 case color_u::Type::Type5: {
2609 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
2610 }
2611 case color_u::Type::Type6: {
2612 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
2613 }
2614 case color_u::Type::Type7: {
2615 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
2616 }
2617 case color_u::Type::Type8: {
2618 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
2619 }
2620 default:
2621 ossia_do_throw(std::runtime_error, ": bad type");
2622 }
2623 }
2624 case color::Type::Type3: {
2625 switch(arg1.m_type)
2626 {
2627 case color_u::Type::Type0: {
2628 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
2629 }
2630 case color_u::Type::Type1: {
2631 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
2632 }
2633 case color_u::Type::Type2: {
2634 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
2635 }
2636 case color_u::Type::Type3: {
2637 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
2638 }
2639 case color_u::Type::Type4: {
2640 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
2641 }
2642 case color_u::Type::Type5: {
2643 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
2644 }
2645 case color_u::Type::Type6: {
2646 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
2647 }
2648 case color_u::Type::Type7: {
2649 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
2650 }
2651 case color_u::Type::Type8: {
2652 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
2653 }
2654 default:
2655 ossia_do_throw(std::runtime_error, ": bad type");
2656 }
2657 }
2658 case color::Type::Type4: {
2659 switch(arg1.m_type)
2660 {
2661 case color_u::Type::Type0: {
2662 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
2663 }
2664 case color_u::Type::Type1: {
2665 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
2666 }
2667 case color_u::Type::Type2: {
2668 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
2669 }
2670 case color_u::Type::Type3: {
2671 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
2672 }
2673 case color_u::Type::Type4: {
2674 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
2675 }
2676 case color_u::Type::Type5: {
2677 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
2678 }
2679 case color_u::Type::Type6: {
2680 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
2681 }
2682 case color_u::Type::Type7: {
2683 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
2684 }
2685 case color_u::Type::Type8: {
2686 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
2687 }
2688 default:
2689 ossia_do_throw(std::runtime_error, ": bad type");
2690 }
2691 }
2692 case color::Type::Type5: {
2693 switch(arg1.m_type)
2694 {
2695 case color_u::Type::Type0: {
2696 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
2697 }
2698 case color_u::Type::Type1: {
2699 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
2700 }
2701 case color_u::Type::Type2: {
2702 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
2703 }
2704 case color_u::Type::Type3: {
2705 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
2706 }
2707 case color_u::Type::Type4: {
2708 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
2709 }
2710 case color_u::Type::Type5: {
2711 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
2712 }
2713 case color_u::Type::Type6: {
2714 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
2715 }
2716 case color_u::Type::Type7: {
2717 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
2718 }
2719 case color_u::Type::Type8: {
2720 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
2721 }
2722 default:
2723 ossia_do_throw(std::runtime_error, ": bad type");
2724 }
2725 }
2726 case color::Type::Type6: {
2727 switch(arg1.m_type)
2728 {
2729 case color_u::Type::Type0: {
2730 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
2731 }
2732 case color_u::Type::Type1: {
2733 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
2734 }
2735 case color_u::Type::Type2: {
2736 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
2737 }
2738 case color_u::Type::Type3: {
2739 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
2740 }
2741 case color_u::Type::Type4: {
2742 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
2743 }
2744 case color_u::Type::Type5: {
2745 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
2746 }
2747 case color_u::Type::Type6: {
2748 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
2749 }
2750 case color_u::Type::Type7: {
2751 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
2752 }
2753 case color_u::Type::Type8: {
2754 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
2755 }
2756 default:
2757 ossia_do_throw(std::runtime_error, ": bad type");
2758 }
2759 }
2760 case color::Type::Type7: {
2761 switch(arg1.m_type)
2762 {
2763 case color_u::Type::Type0: {
2764 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
2765 }
2766 case color_u::Type::Type1: {
2767 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
2768 }
2769 case color_u::Type::Type2: {
2770 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
2771 }
2772 case color_u::Type::Type3: {
2773 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
2774 }
2775 case color_u::Type::Type4: {
2776 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
2777 }
2778 case color_u::Type::Type5: {
2779 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
2780 }
2781 case color_u::Type::Type6: {
2782 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
2783 }
2784 case color_u::Type::Type7: {
2785 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
2786 }
2787 case color_u::Type::Type8: {
2788 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
2789 }
2790 default:
2791 ossia_do_throw(std::runtime_error, ": bad type");
2792 }
2793 }
2794 case color::Type::Type8: {
2795 switch(arg1.m_type)
2796 {
2797 case color_u::Type::Type0: {
2798 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
2799 }
2800 case color_u::Type::Type1: {
2801 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
2802 }
2803 case color_u::Type::Type2: {
2804 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
2805 }
2806 case color_u::Type::Type3: {
2807 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
2808 }
2809 case color_u::Type::Type4: {
2810 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
2811 }
2812 case color_u::Type::Type5: {
2813 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
2814 }
2815 case color_u::Type::Type6: {
2816 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
2817 }
2818 case color_u::Type::Type7: {
2819 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
2820 }
2821 case color_u::Type::Type8: {
2822 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
2823 }
2824 default:
2825 ossia_do_throw(std::runtime_error, ": bad type");
2826 }
2827 }
2828 default:
2829 ossia_do_throw(std::runtime_error, ": bad type");
2830 }
2831}
2832template <typename Functor>
2833auto apply(Functor&& functor, const distance& arg0, const distance_u& arg1)
2834{
2835 switch(arg0.m_type)
2836 {
2837 case distance::Type::Type0: {
2838 switch(arg1.m_type)
2839 {
2840 case distance_u::Type::Type0: {
2841 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
2842 }
2843 case distance_u::Type::Type1: {
2844 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
2845 }
2846 case distance_u::Type::Type2: {
2847 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
2848 }
2849 case distance_u::Type::Type3: {
2850 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
2851 }
2852 case distance_u::Type::Type4: {
2853 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
2854 }
2855 case distance_u::Type::Type5: {
2856 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
2857 }
2858 case distance_u::Type::Type6: {
2859 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
2860 }
2861 case distance_u::Type::Type7: {
2862 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
2863 }
2864 case distance_u::Type::Type8: {
2865 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
2866 }
2867 case distance_u::Type::Type9: {
2868 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
2869 }
2870 case distance_u::Type::Type10: {
2871 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value10);
2872 }
2873 default:
2874 ossia_do_throw(std::runtime_error, ": bad type");
2875 }
2876 }
2877 case distance::Type::Type1: {
2878 switch(arg1.m_type)
2879 {
2880 case distance_u::Type::Type0: {
2881 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
2882 }
2883 case distance_u::Type::Type1: {
2884 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
2885 }
2886 case distance_u::Type::Type2: {
2887 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
2888 }
2889 case distance_u::Type::Type3: {
2890 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
2891 }
2892 case distance_u::Type::Type4: {
2893 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
2894 }
2895 case distance_u::Type::Type5: {
2896 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
2897 }
2898 case distance_u::Type::Type6: {
2899 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
2900 }
2901 case distance_u::Type::Type7: {
2902 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
2903 }
2904 case distance_u::Type::Type8: {
2905 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
2906 }
2907 case distance_u::Type::Type9: {
2908 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
2909 }
2910 case distance_u::Type::Type10: {
2911 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value10);
2912 }
2913 default:
2914 ossia_do_throw(std::runtime_error, ": bad type");
2915 }
2916 }
2917 case distance::Type::Type2: {
2918 switch(arg1.m_type)
2919 {
2920 case distance_u::Type::Type0: {
2921 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
2922 }
2923 case distance_u::Type::Type1: {
2924 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
2925 }
2926 case distance_u::Type::Type2: {
2927 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
2928 }
2929 case distance_u::Type::Type3: {
2930 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
2931 }
2932 case distance_u::Type::Type4: {
2933 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
2934 }
2935 case distance_u::Type::Type5: {
2936 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
2937 }
2938 case distance_u::Type::Type6: {
2939 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
2940 }
2941 case distance_u::Type::Type7: {
2942 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
2943 }
2944 case distance_u::Type::Type8: {
2945 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
2946 }
2947 case distance_u::Type::Type9: {
2948 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
2949 }
2950 case distance_u::Type::Type10: {
2951 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value10);
2952 }
2953 default:
2954 ossia_do_throw(std::runtime_error, ": bad type");
2955 }
2956 }
2957 case distance::Type::Type3: {
2958 switch(arg1.m_type)
2959 {
2960 case distance_u::Type::Type0: {
2961 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
2962 }
2963 case distance_u::Type::Type1: {
2964 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
2965 }
2966 case distance_u::Type::Type2: {
2967 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
2968 }
2969 case distance_u::Type::Type3: {
2970 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
2971 }
2972 case distance_u::Type::Type4: {
2973 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
2974 }
2975 case distance_u::Type::Type5: {
2976 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
2977 }
2978 case distance_u::Type::Type6: {
2979 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
2980 }
2981 case distance_u::Type::Type7: {
2982 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
2983 }
2984 case distance_u::Type::Type8: {
2985 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
2986 }
2987 case distance_u::Type::Type9: {
2988 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
2989 }
2990 case distance_u::Type::Type10: {
2991 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value10);
2992 }
2993 default:
2994 ossia_do_throw(std::runtime_error, ": bad type");
2995 }
2996 }
2997 case distance::Type::Type4: {
2998 switch(arg1.m_type)
2999 {
3000 case distance_u::Type::Type0: {
3001 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
3002 }
3003 case distance_u::Type::Type1: {
3004 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
3005 }
3006 case distance_u::Type::Type2: {
3007 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
3008 }
3009 case distance_u::Type::Type3: {
3010 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
3011 }
3012 case distance_u::Type::Type4: {
3013 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
3014 }
3015 case distance_u::Type::Type5: {
3016 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
3017 }
3018 case distance_u::Type::Type6: {
3019 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
3020 }
3021 case distance_u::Type::Type7: {
3022 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
3023 }
3024 case distance_u::Type::Type8: {
3025 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
3026 }
3027 case distance_u::Type::Type9: {
3028 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
3029 }
3030 case distance_u::Type::Type10: {
3031 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value10);
3032 }
3033 default:
3034 ossia_do_throw(std::runtime_error, ": bad type");
3035 }
3036 }
3037 case distance::Type::Type5: {
3038 switch(arg1.m_type)
3039 {
3040 case distance_u::Type::Type0: {
3041 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
3042 }
3043 case distance_u::Type::Type1: {
3044 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
3045 }
3046 case distance_u::Type::Type2: {
3047 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
3048 }
3049 case distance_u::Type::Type3: {
3050 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
3051 }
3052 case distance_u::Type::Type4: {
3053 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
3054 }
3055 case distance_u::Type::Type5: {
3056 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
3057 }
3058 case distance_u::Type::Type6: {
3059 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
3060 }
3061 case distance_u::Type::Type7: {
3062 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
3063 }
3064 case distance_u::Type::Type8: {
3065 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
3066 }
3067 case distance_u::Type::Type9: {
3068 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
3069 }
3070 case distance_u::Type::Type10: {
3071 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value10);
3072 }
3073 default:
3074 ossia_do_throw(std::runtime_error, ": bad type");
3075 }
3076 }
3077 case distance::Type::Type6: {
3078 switch(arg1.m_type)
3079 {
3080 case distance_u::Type::Type0: {
3081 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
3082 }
3083 case distance_u::Type::Type1: {
3084 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
3085 }
3086 case distance_u::Type::Type2: {
3087 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
3088 }
3089 case distance_u::Type::Type3: {
3090 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
3091 }
3092 case distance_u::Type::Type4: {
3093 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
3094 }
3095 case distance_u::Type::Type5: {
3096 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
3097 }
3098 case distance_u::Type::Type6: {
3099 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
3100 }
3101 case distance_u::Type::Type7: {
3102 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
3103 }
3104 case distance_u::Type::Type8: {
3105 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
3106 }
3107 case distance_u::Type::Type9: {
3108 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
3109 }
3110 case distance_u::Type::Type10: {
3111 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value10);
3112 }
3113 default:
3114 ossia_do_throw(std::runtime_error, ": bad type");
3115 }
3116 }
3117 case distance::Type::Type7: {
3118 switch(arg1.m_type)
3119 {
3120 case distance_u::Type::Type0: {
3121 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
3122 }
3123 case distance_u::Type::Type1: {
3124 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
3125 }
3126 case distance_u::Type::Type2: {
3127 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
3128 }
3129 case distance_u::Type::Type3: {
3130 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
3131 }
3132 case distance_u::Type::Type4: {
3133 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
3134 }
3135 case distance_u::Type::Type5: {
3136 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
3137 }
3138 case distance_u::Type::Type6: {
3139 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
3140 }
3141 case distance_u::Type::Type7: {
3142 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
3143 }
3144 case distance_u::Type::Type8: {
3145 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
3146 }
3147 case distance_u::Type::Type9: {
3148 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
3149 }
3150 case distance_u::Type::Type10: {
3151 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value10);
3152 }
3153 default:
3154 ossia_do_throw(std::runtime_error, ": bad type");
3155 }
3156 }
3157 case distance::Type::Type8: {
3158 switch(arg1.m_type)
3159 {
3160 case distance_u::Type::Type0: {
3161 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
3162 }
3163 case distance_u::Type::Type1: {
3164 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
3165 }
3166 case distance_u::Type::Type2: {
3167 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
3168 }
3169 case distance_u::Type::Type3: {
3170 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
3171 }
3172 case distance_u::Type::Type4: {
3173 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
3174 }
3175 case distance_u::Type::Type5: {
3176 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
3177 }
3178 case distance_u::Type::Type6: {
3179 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
3180 }
3181 case distance_u::Type::Type7: {
3182 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
3183 }
3184 case distance_u::Type::Type8: {
3185 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
3186 }
3187 case distance_u::Type::Type9: {
3188 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
3189 }
3190 case distance_u::Type::Type10: {
3191 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value10);
3192 }
3193 default:
3194 ossia_do_throw(std::runtime_error, ": bad type");
3195 }
3196 }
3197 case distance::Type::Type9: {
3198 switch(arg1.m_type)
3199 {
3200 case distance_u::Type::Type0: {
3201 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
3202 }
3203 case distance_u::Type::Type1: {
3204 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
3205 }
3206 case distance_u::Type::Type2: {
3207 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
3208 }
3209 case distance_u::Type::Type3: {
3210 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
3211 }
3212 case distance_u::Type::Type4: {
3213 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
3214 }
3215 case distance_u::Type::Type5: {
3216 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
3217 }
3218 case distance_u::Type::Type6: {
3219 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
3220 }
3221 case distance_u::Type::Type7: {
3222 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
3223 }
3224 case distance_u::Type::Type8: {
3225 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
3226 }
3227 case distance_u::Type::Type9: {
3228 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value9);
3229 }
3230 case distance_u::Type::Type10: {
3231 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value10);
3232 }
3233 default:
3234 ossia_do_throw(std::runtime_error, ": bad type");
3235 }
3236 }
3237 case distance::Type::Type10: {
3238 switch(arg1.m_type)
3239 {
3240 case distance_u::Type::Type0: {
3241 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value0);
3242 }
3243 case distance_u::Type::Type1: {
3244 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value1);
3245 }
3246 case distance_u::Type::Type2: {
3247 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value2);
3248 }
3249 case distance_u::Type::Type3: {
3250 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value3);
3251 }
3252 case distance_u::Type::Type4: {
3253 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value4);
3254 }
3255 case distance_u::Type::Type5: {
3256 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value5);
3257 }
3258 case distance_u::Type::Type6: {
3259 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value6);
3260 }
3261 case distance_u::Type::Type7: {
3262 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value7);
3263 }
3264 case distance_u::Type::Type8: {
3265 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value8);
3266 }
3267 case distance_u::Type::Type9: {
3268 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value9);
3269 }
3270 case distance_u::Type::Type10: {
3271 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value10);
3272 }
3273 default:
3274 ossia_do_throw(std::runtime_error, ": bad type");
3275 }
3276 }
3277 default:
3278 ossia_do_throw(std::runtime_error, ": bad type");
3279 }
3280}
3281template <typename Functor>
3282auto apply(Functor&& functor, const gain& arg0, const gain_u& arg1)
3283{
3284 switch(arg0.m_type)
3285 {
3286 case gain::Type::Type0: {
3287 switch(arg1.m_type)
3288 {
3289 case gain_u::Type::Type0: {
3290 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
3291 }
3292 case gain_u::Type::Type1: {
3293 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
3294 }
3295 case gain_u::Type::Type2: {
3296 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
3297 }
3298 case gain_u::Type::Type3: {
3299 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
3300 }
3301 default:
3302 ossia_do_throw(std::runtime_error, ": bad type");
3303 }
3304 }
3305 case gain::Type::Type1: {
3306 switch(arg1.m_type)
3307 {
3308 case gain_u::Type::Type0: {
3309 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
3310 }
3311 case gain_u::Type::Type1: {
3312 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
3313 }
3314 case gain_u::Type::Type2: {
3315 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
3316 }
3317 case gain_u::Type::Type3: {
3318 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
3319 }
3320 default:
3321 ossia_do_throw(std::runtime_error, ": bad type");
3322 }
3323 }
3324 case gain::Type::Type2: {
3325 switch(arg1.m_type)
3326 {
3327 case gain_u::Type::Type0: {
3328 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
3329 }
3330 case gain_u::Type::Type1: {
3331 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
3332 }
3333 case gain_u::Type::Type2: {
3334 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
3335 }
3336 case gain_u::Type::Type3: {
3337 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
3338 }
3339 default:
3340 ossia_do_throw(std::runtime_error, ": bad type");
3341 }
3342 }
3343 case gain::Type::Type3: {
3344 switch(arg1.m_type)
3345 {
3346 case gain_u::Type::Type0: {
3347 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
3348 }
3349 case gain_u::Type::Type1: {
3350 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
3351 }
3352 case gain_u::Type::Type2: {
3353 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
3354 }
3355 case gain_u::Type::Type3: {
3356 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
3357 }
3358 default:
3359 ossia_do_throw(std::runtime_error, ": bad type");
3360 }
3361 }
3362 default:
3363 ossia_do_throw(std::runtime_error, ": bad type");
3364 }
3365}
3366template <typename Functor>
3367auto apply(Functor&& functor, const orientation& arg0, const orientation_u& arg1)
3368{
3369 switch(arg0.m_type)
3370 {
3371 case orientation::Type::Type0: {
3372 switch(arg1.m_type)
3373 {
3374 case orientation_u::Type::Type0: {
3375 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
3376 }
3377 case orientation_u::Type::Type1: {
3378 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
3379 }
3380 case orientation_u::Type::Type2: {
3381 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
3382 }
3383 default:
3384 ossia_do_throw(std::runtime_error, ": bad type");
3385 }
3386 }
3387 case orientation::Type::Type1: {
3388 switch(arg1.m_type)
3389 {
3390 case orientation_u::Type::Type0: {
3391 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
3392 }
3393 case orientation_u::Type::Type1: {
3394 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
3395 }
3396 case orientation_u::Type::Type2: {
3397 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
3398 }
3399 default:
3400 ossia_do_throw(std::runtime_error, ": bad type");
3401 }
3402 }
3403 case orientation::Type::Type2: {
3404 switch(arg1.m_type)
3405 {
3406 case orientation_u::Type::Type0: {
3407 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
3408 }
3409 case orientation_u::Type::Type1: {
3410 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
3411 }
3412 case orientation_u::Type::Type2: {
3413 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
3414 }
3415 default:
3416 ossia_do_throw(std::runtime_error, ": bad type");
3417 }
3418 }
3419 default:
3420 ossia_do_throw(std::runtime_error, ": bad type");
3421 }
3422}
3423template <typename Functor>
3424auto apply(Functor&& functor, const position& arg0, const position_u& arg1)
3425{
3426 switch(arg0.m_type)
3427 {
3428 case position::Type::Type0: {
3429 switch(arg1.m_type)
3430 {
3431 case position_u::Type::Type0: {
3432 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
3433 }
3434 case position_u::Type::Type1: {
3435 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
3436 }
3437 case position_u::Type::Type2: {
3438 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
3439 }
3440 case position_u::Type::Type3: {
3441 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
3442 }
3443 case position_u::Type::Type4: {
3444 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
3445 }
3446 case position_u::Type::Type5: {
3447 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
3448 }
3449 case position_u::Type::Type6: {
3450 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
3451 }
3452 case position_u::Type::Type7: {
3453 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
3454 }
3455 case position_u::Type::Type8: {
3456 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
3457 }
3458 default:
3459 ossia_do_throw(std::runtime_error, ": bad type");
3460 }
3461 }
3462 case position::Type::Type1: {
3463 switch(arg1.m_type)
3464 {
3465 case position_u::Type::Type0: {
3466 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
3467 }
3468 case position_u::Type::Type1: {
3469 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
3470 }
3471 case position_u::Type::Type2: {
3472 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
3473 }
3474 case position_u::Type::Type3: {
3475 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
3476 }
3477 case position_u::Type::Type4: {
3478 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
3479 }
3480 case position_u::Type::Type5: {
3481 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
3482 }
3483 case position_u::Type::Type6: {
3484 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
3485 }
3486 case position_u::Type::Type7: {
3487 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
3488 }
3489 case position_u::Type::Type8: {
3490 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
3491 }
3492 default:
3493 ossia_do_throw(std::runtime_error, ": bad type");
3494 }
3495 }
3496 case position::Type::Type2: {
3497 switch(arg1.m_type)
3498 {
3499 case position_u::Type::Type0: {
3500 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
3501 }
3502 case position_u::Type::Type1: {
3503 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
3504 }
3505 case position_u::Type::Type2: {
3506 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
3507 }
3508 case position_u::Type::Type3: {
3509 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
3510 }
3511 case position_u::Type::Type4: {
3512 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
3513 }
3514 case position_u::Type::Type5: {
3515 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
3516 }
3517 case position_u::Type::Type6: {
3518 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
3519 }
3520 case position_u::Type::Type7: {
3521 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
3522 }
3523 case position_u::Type::Type8: {
3524 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
3525 }
3526 default:
3527 ossia_do_throw(std::runtime_error, ": bad type");
3528 }
3529 }
3530 case position::Type::Type3: {
3531 switch(arg1.m_type)
3532 {
3533 case position_u::Type::Type0: {
3534 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
3535 }
3536 case position_u::Type::Type1: {
3537 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
3538 }
3539 case position_u::Type::Type2: {
3540 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
3541 }
3542 case position_u::Type::Type3: {
3543 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
3544 }
3545 case position_u::Type::Type4: {
3546 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
3547 }
3548 case position_u::Type::Type5: {
3549 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
3550 }
3551 case position_u::Type::Type6: {
3552 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
3553 }
3554 case position_u::Type::Type7: {
3555 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
3556 }
3557 case position_u::Type::Type8: {
3558 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
3559 }
3560 default:
3561 ossia_do_throw(std::runtime_error, ": bad type");
3562 }
3563 }
3564 case position::Type::Type4: {
3565 switch(arg1.m_type)
3566 {
3567 case position_u::Type::Type0: {
3568 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
3569 }
3570 case position_u::Type::Type1: {
3571 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
3572 }
3573 case position_u::Type::Type2: {
3574 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
3575 }
3576 case position_u::Type::Type3: {
3577 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
3578 }
3579 case position_u::Type::Type4: {
3580 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
3581 }
3582 case position_u::Type::Type5: {
3583 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
3584 }
3585 case position_u::Type::Type6: {
3586 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
3587 }
3588 case position_u::Type::Type7: {
3589 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
3590 }
3591 case position_u::Type::Type8: {
3592 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
3593 }
3594 default:
3595 ossia_do_throw(std::runtime_error, ": bad type");
3596 }
3597 }
3598 case position::Type::Type5: {
3599 switch(arg1.m_type)
3600 {
3601 case position_u::Type::Type0: {
3602 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
3603 }
3604 case position_u::Type::Type1: {
3605 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
3606 }
3607 case position_u::Type::Type2: {
3608 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
3609 }
3610 case position_u::Type::Type3: {
3611 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
3612 }
3613 case position_u::Type::Type4: {
3614 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
3615 }
3616 case position_u::Type::Type5: {
3617 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
3618 }
3619 case position_u::Type::Type6: {
3620 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
3621 }
3622 case position_u::Type::Type7: {
3623 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
3624 }
3625 case position_u::Type::Type8: {
3626 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
3627 }
3628 default:
3629 ossia_do_throw(std::runtime_error, ": bad type");
3630 }
3631 }
3632 case position::Type::Type6: {
3633 switch(arg1.m_type)
3634 {
3635 case position_u::Type::Type0: {
3636 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
3637 }
3638 case position_u::Type::Type1: {
3639 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
3640 }
3641 case position_u::Type::Type2: {
3642 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
3643 }
3644 case position_u::Type::Type3: {
3645 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
3646 }
3647 case position_u::Type::Type4: {
3648 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
3649 }
3650 case position_u::Type::Type5: {
3651 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
3652 }
3653 case position_u::Type::Type6: {
3654 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
3655 }
3656 case position_u::Type::Type7: {
3657 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
3658 }
3659 case position_u::Type::Type8: {
3660 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
3661 }
3662 default:
3663 ossia_do_throw(std::runtime_error, ": bad type");
3664 }
3665 }
3666 case position::Type::Type7: {
3667 switch(arg1.m_type)
3668 {
3669 case position_u::Type::Type0: {
3670 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
3671 }
3672 case position_u::Type::Type1: {
3673 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
3674 }
3675 case position_u::Type::Type2: {
3676 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
3677 }
3678 case position_u::Type::Type3: {
3679 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
3680 }
3681 case position_u::Type::Type4: {
3682 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
3683 }
3684 case position_u::Type::Type5: {
3685 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
3686 }
3687 case position_u::Type::Type6: {
3688 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
3689 }
3690 case position_u::Type::Type7: {
3691 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
3692 }
3693 case position_u::Type::Type8: {
3694 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
3695 }
3696 default:
3697 ossia_do_throw(std::runtime_error, ": bad type");
3698 }
3699 }
3700 case position::Type::Type8: {
3701 switch(arg1.m_type)
3702 {
3703 case position_u::Type::Type0: {
3704 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
3705 }
3706 case position_u::Type::Type1: {
3707 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
3708 }
3709 case position_u::Type::Type2: {
3710 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
3711 }
3712 case position_u::Type::Type3: {
3713 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
3714 }
3715 case position_u::Type::Type4: {
3716 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
3717 }
3718 case position_u::Type::Type5: {
3719 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
3720 }
3721 case position_u::Type::Type6: {
3722 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
3723 }
3724 case position_u::Type::Type7: {
3725 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
3726 }
3727 case position_u::Type::Type8: {
3728 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
3729 }
3730 default:
3731 ossia_do_throw(std::runtime_error, ": bad type");
3732 }
3733 }
3734 default:
3735 ossia_do_throw(std::runtime_error, ": bad type");
3736 }
3737}
3738template <typename Functor>
3739auto apply(Functor&& functor, const speed& arg0, const speed_u& arg1)
3740{
3741 switch(arg0.m_type)
3742 {
3743 case speed::Type::Type0: {
3744 switch(arg1.m_type)
3745 {
3746 case speed_u::Type::Type0: {
3747 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
3748 }
3749 case speed_u::Type::Type1: {
3750 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
3751 }
3752 case speed_u::Type::Type2: {
3753 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
3754 }
3755 case speed_u::Type::Type3: {
3756 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
3757 }
3758 case speed_u::Type::Type4: {
3759 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
3760 }
3761 case speed_u::Type::Type5: {
3762 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
3763 }
3764 default:
3765 ossia_do_throw(std::runtime_error, ": bad type");
3766 }
3767 }
3768 case speed::Type::Type1: {
3769 switch(arg1.m_type)
3770 {
3771 case speed_u::Type::Type0: {
3772 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
3773 }
3774 case speed_u::Type::Type1: {
3775 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
3776 }
3777 case speed_u::Type::Type2: {
3778 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
3779 }
3780 case speed_u::Type::Type3: {
3781 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
3782 }
3783 case speed_u::Type::Type4: {
3784 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
3785 }
3786 case speed_u::Type::Type5: {
3787 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
3788 }
3789 default:
3790 ossia_do_throw(std::runtime_error, ": bad type");
3791 }
3792 }
3793 case speed::Type::Type2: {
3794 switch(arg1.m_type)
3795 {
3796 case speed_u::Type::Type0: {
3797 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
3798 }
3799 case speed_u::Type::Type1: {
3800 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
3801 }
3802 case speed_u::Type::Type2: {
3803 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
3804 }
3805 case speed_u::Type::Type3: {
3806 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
3807 }
3808 case speed_u::Type::Type4: {
3809 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
3810 }
3811 case speed_u::Type::Type5: {
3812 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
3813 }
3814 default:
3815 ossia_do_throw(std::runtime_error, ": bad type");
3816 }
3817 }
3818 case speed::Type::Type3: {
3819 switch(arg1.m_type)
3820 {
3821 case speed_u::Type::Type0: {
3822 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
3823 }
3824 case speed_u::Type::Type1: {
3825 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
3826 }
3827 case speed_u::Type::Type2: {
3828 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
3829 }
3830 case speed_u::Type::Type3: {
3831 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
3832 }
3833 case speed_u::Type::Type4: {
3834 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
3835 }
3836 case speed_u::Type::Type5: {
3837 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
3838 }
3839 default:
3840 ossia_do_throw(std::runtime_error, ": bad type");
3841 }
3842 }
3843 case speed::Type::Type4: {
3844 switch(arg1.m_type)
3845 {
3846 case speed_u::Type::Type0: {
3847 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
3848 }
3849 case speed_u::Type::Type1: {
3850 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
3851 }
3852 case speed_u::Type::Type2: {
3853 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
3854 }
3855 case speed_u::Type::Type3: {
3856 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
3857 }
3858 case speed_u::Type::Type4: {
3859 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
3860 }
3861 case speed_u::Type::Type5: {
3862 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
3863 }
3864 default:
3865 ossia_do_throw(std::runtime_error, ": bad type");
3866 }
3867 }
3868 case speed::Type::Type5: {
3869 switch(arg1.m_type)
3870 {
3871 case speed_u::Type::Type0: {
3872 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
3873 }
3874 case speed_u::Type::Type1: {
3875 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
3876 }
3877 case speed_u::Type::Type2: {
3878 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
3879 }
3880 case speed_u::Type::Type3: {
3881 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
3882 }
3883 case speed_u::Type::Type4: {
3884 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
3885 }
3886 case speed_u::Type::Type5: {
3887 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
3888 }
3889 default:
3890 ossia_do_throw(std::runtime_error, ": bad type");
3891 }
3892 }
3893 default:
3894 ossia_do_throw(std::runtime_error, ": bad type");
3895 }
3896}
3897template <typename Functor>
3898auto apply(Functor&& functor, const timing& arg0, const timing_u& arg1)
3899{
3900 switch(arg0.m_type)
3901 {
3902 case timing::Type::Type0: {
3903 switch(arg1.m_type)
3904 {
3905 case timing_u::Type::Type0: {
3906 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
3907 }
3908 case timing_u::Type::Type1: {
3909 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
3910 }
3911 case timing_u::Type::Type2: {
3912 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
3913 }
3914 case timing_u::Type::Type3: {
3915 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
3916 }
3917 case timing_u::Type::Type4: {
3918 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
3919 }
3920 case timing_u::Type::Type5: {
3921 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
3922 }
3923 case timing_u::Type::Type6: {
3924 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
3925 }
3926 case timing_u::Type::Type7: {
3927 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
3928 }
3929 case timing_u::Type::Type8: {
3930 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
3931 }
3932 default:
3933 ossia_do_throw(std::runtime_error, ": bad type");
3934 }
3935 }
3936 case timing::Type::Type1: {
3937 switch(arg1.m_type)
3938 {
3939 case timing_u::Type::Type0: {
3940 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
3941 }
3942 case timing_u::Type::Type1: {
3943 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
3944 }
3945 case timing_u::Type::Type2: {
3946 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
3947 }
3948 case timing_u::Type::Type3: {
3949 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
3950 }
3951 case timing_u::Type::Type4: {
3952 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
3953 }
3954 case timing_u::Type::Type5: {
3955 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
3956 }
3957 case timing_u::Type::Type6: {
3958 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
3959 }
3960 case timing_u::Type::Type7: {
3961 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
3962 }
3963 case timing_u::Type::Type8: {
3964 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
3965 }
3966 default:
3967 ossia_do_throw(std::runtime_error, ": bad type");
3968 }
3969 }
3970 case timing::Type::Type2: {
3971 switch(arg1.m_type)
3972 {
3973 case timing_u::Type::Type0: {
3974 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
3975 }
3976 case timing_u::Type::Type1: {
3977 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
3978 }
3979 case timing_u::Type::Type2: {
3980 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
3981 }
3982 case timing_u::Type::Type3: {
3983 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
3984 }
3985 case timing_u::Type::Type4: {
3986 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
3987 }
3988 case timing_u::Type::Type5: {
3989 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
3990 }
3991 case timing_u::Type::Type6: {
3992 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
3993 }
3994 case timing_u::Type::Type7: {
3995 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
3996 }
3997 case timing_u::Type::Type8: {
3998 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
3999 }
4000 default:
4001 ossia_do_throw(std::runtime_error, ": bad type");
4002 }
4003 }
4004 case timing::Type::Type3: {
4005 switch(arg1.m_type)
4006 {
4007 case timing_u::Type::Type0: {
4008 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
4009 }
4010 case timing_u::Type::Type1: {
4011 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
4012 }
4013 case timing_u::Type::Type2: {
4014 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
4015 }
4016 case timing_u::Type::Type3: {
4017 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
4018 }
4019 case timing_u::Type::Type4: {
4020 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
4021 }
4022 case timing_u::Type::Type5: {
4023 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
4024 }
4025 case timing_u::Type::Type6: {
4026 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
4027 }
4028 case timing_u::Type::Type7: {
4029 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
4030 }
4031 case timing_u::Type::Type8: {
4032 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
4033 }
4034 default:
4035 ossia_do_throw(std::runtime_error, ": bad type");
4036 }
4037 }
4038 case timing::Type::Type4: {
4039 switch(arg1.m_type)
4040 {
4041 case timing_u::Type::Type0: {
4042 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
4043 }
4044 case timing_u::Type::Type1: {
4045 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
4046 }
4047 case timing_u::Type::Type2: {
4048 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
4049 }
4050 case timing_u::Type::Type3: {
4051 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
4052 }
4053 case timing_u::Type::Type4: {
4054 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
4055 }
4056 case timing_u::Type::Type5: {
4057 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
4058 }
4059 case timing_u::Type::Type6: {
4060 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
4061 }
4062 case timing_u::Type::Type7: {
4063 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
4064 }
4065 case timing_u::Type::Type8: {
4066 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
4067 }
4068 default:
4069 ossia_do_throw(std::runtime_error, ": bad type");
4070 }
4071 }
4072 case timing::Type::Type5: {
4073 switch(arg1.m_type)
4074 {
4075 case timing_u::Type::Type0: {
4076 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
4077 }
4078 case timing_u::Type::Type1: {
4079 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
4080 }
4081 case timing_u::Type::Type2: {
4082 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
4083 }
4084 case timing_u::Type::Type3: {
4085 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
4086 }
4087 case timing_u::Type::Type4: {
4088 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
4089 }
4090 case timing_u::Type::Type5: {
4091 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
4092 }
4093 case timing_u::Type::Type6: {
4094 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
4095 }
4096 case timing_u::Type::Type7: {
4097 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
4098 }
4099 case timing_u::Type::Type8: {
4100 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
4101 }
4102 default:
4103 ossia_do_throw(std::runtime_error, ": bad type");
4104 }
4105 }
4106 case timing::Type::Type6: {
4107 switch(arg1.m_type)
4108 {
4109 case timing_u::Type::Type0: {
4110 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
4111 }
4112 case timing_u::Type::Type1: {
4113 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
4114 }
4115 case timing_u::Type::Type2: {
4116 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
4117 }
4118 case timing_u::Type::Type3: {
4119 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
4120 }
4121 case timing_u::Type::Type4: {
4122 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
4123 }
4124 case timing_u::Type::Type5: {
4125 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
4126 }
4127 case timing_u::Type::Type6: {
4128 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
4129 }
4130 case timing_u::Type::Type7: {
4131 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
4132 }
4133 case timing_u::Type::Type8: {
4134 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
4135 }
4136 default:
4137 ossia_do_throw(std::runtime_error, ": bad type");
4138 }
4139 }
4140 case timing::Type::Type7: {
4141 switch(arg1.m_type)
4142 {
4143 case timing_u::Type::Type0: {
4144 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
4145 }
4146 case timing_u::Type::Type1: {
4147 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
4148 }
4149 case timing_u::Type::Type2: {
4150 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
4151 }
4152 case timing_u::Type::Type3: {
4153 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
4154 }
4155 case timing_u::Type::Type4: {
4156 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
4157 }
4158 case timing_u::Type::Type5: {
4159 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
4160 }
4161 case timing_u::Type::Type6: {
4162 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
4163 }
4164 case timing_u::Type::Type7: {
4165 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
4166 }
4167 case timing_u::Type::Type8: {
4168 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
4169 }
4170 default:
4171 ossia_do_throw(std::runtime_error, ": bad type");
4172 }
4173 }
4174 case timing::Type::Type8: {
4175 switch(arg1.m_type)
4176 {
4177 case timing_u::Type::Type0: {
4178 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
4179 }
4180 case timing_u::Type::Type1: {
4181 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
4182 }
4183 case timing_u::Type::Type2: {
4184 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
4185 }
4186 case timing_u::Type::Type3: {
4187 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
4188 }
4189 case timing_u::Type::Type4: {
4190 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
4191 }
4192 case timing_u::Type::Type5: {
4193 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
4194 }
4195 case timing_u::Type::Type6: {
4196 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
4197 }
4198 case timing_u::Type::Type7: {
4199 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
4200 }
4201 case timing_u::Type::Type8: {
4202 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
4203 }
4204 default:
4205 ossia_do_throw(std::runtime_error, ": bad type");
4206 }
4207 }
4208 default:
4209 ossia_do_throw(std::runtime_error, ": bad type");
4210 }
4211}
4212template <typename Functor>
4213auto apply(Functor&& functor, const angle& arg0, const value_variant_type& arg1)
4214{
4215 switch(arg0.m_type)
4216 {
4217 case angle::Type::Type0: {
4218 switch(arg1.m_type)
4219 {
4220 case value_variant_type::Type::Type0: {
4221 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
4222 }
4223 case value_variant_type::Type::Type1: {
4224 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
4225 }
4226 case value_variant_type::Type::Type2: {
4227 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
4228 }
4229 case value_variant_type::Type::Type3: {
4230 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
4231 }
4232 case value_variant_type::Type::Type4: {
4233 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
4234 }
4235 case value_variant_type::Type::Type5: {
4236 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
4237 }
4238 case value_variant_type::Type::Type6: {
4239 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
4240 }
4241 case value_variant_type::Type::Type7: {
4242 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
4243 }
4244 case value_variant_type::Type::Type8: {
4245 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
4246 }
4247 case value_variant_type::Type::Type9: {
4248 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
4249 }
4250 default:
4251 ossia_do_throw(std::runtime_error, ": bad type");
4252 }
4253 }
4254 case angle::Type::Type1: {
4255 switch(arg1.m_type)
4256 {
4257 case value_variant_type::Type::Type0: {
4258 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
4259 }
4260 case value_variant_type::Type::Type1: {
4261 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
4262 }
4263 case value_variant_type::Type::Type2: {
4264 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
4265 }
4266 case value_variant_type::Type::Type3: {
4267 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
4268 }
4269 case value_variant_type::Type::Type4: {
4270 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
4271 }
4272 case value_variant_type::Type::Type5: {
4273 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
4274 }
4275 case value_variant_type::Type::Type6: {
4276 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
4277 }
4278 case value_variant_type::Type::Type7: {
4279 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
4280 }
4281 case value_variant_type::Type::Type8: {
4282 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
4283 }
4284 case value_variant_type::Type::Type9: {
4285 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
4286 }
4287 default:
4288 ossia_do_throw(std::runtime_error, ": bad type");
4289 }
4290 }
4291 default:
4292 ossia_do_throw(std::runtime_error, ": bad type");
4293 }
4294}
4295template <typename Functor>
4296auto apply(Functor&& functor, const color& arg0, const value_variant_type& arg1)
4297{
4298 switch(arg0.m_type)
4299 {
4300 case color::Type::Type0: {
4301 switch(arg1.m_type)
4302 {
4303 case value_variant_type::Type::Type0: {
4304 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
4305 }
4306 case value_variant_type::Type::Type1: {
4307 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
4308 }
4309 case value_variant_type::Type::Type2: {
4310 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
4311 }
4312 case value_variant_type::Type::Type3: {
4313 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
4314 }
4315 case value_variant_type::Type::Type4: {
4316 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
4317 }
4318 case value_variant_type::Type::Type5: {
4319 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
4320 }
4321 case value_variant_type::Type::Type6: {
4322 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
4323 }
4324 case value_variant_type::Type::Type7: {
4325 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
4326 }
4327 case value_variant_type::Type::Type8: {
4328 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
4329 }
4330 case value_variant_type::Type::Type9: {
4331 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
4332 }
4333 default:
4334 ossia_do_throw(std::runtime_error, ": bad type");
4335 }
4336 }
4337 case color::Type::Type1: {
4338 switch(arg1.m_type)
4339 {
4340 case value_variant_type::Type::Type0: {
4341 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
4342 }
4343 case value_variant_type::Type::Type1: {
4344 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
4345 }
4346 case value_variant_type::Type::Type2: {
4347 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
4348 }
4349 case value_variant_type::Type::Type3: {
4350 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
4351 }
4352 case value_variant_type::Type::Type4: {
4353 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
4354 }
4355 case value_variant_type::Type::Type5: {
4356 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
4357 }
4358 case value_variant_type::Type::Type6: {
4359 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
4360 }
4361 case value_variant_type::Type::Type7: {
4362 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
4363 }
4364 case value_variant_type::Type::Type8: {
4365 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
4366 }
4367 case value_variant_type::Type::Type9: {
4368 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
4369 }
4370 default:
4371 ossia_do_throw(std::runtime_error, ": bad type");
4372 }
4373 }
4374 case color::Type::Type2: {
4375 switch(arg1.m_type)
4376 {
4377 case value_variant_type::Type::Type0: {
4378 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
4379 }
4380 case value_variant_type::Type::Type1: {
4381 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
4382 }
4383 case value_variant_type::Type::Type2: {
4384 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
4385 }
4386 case value_variant_type::Type::Type3: {
4387 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
4388 }
4389 case value_variant_type::Type::Type4: {
4390 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
4391 }
4392 case value_variant_type::Type::Type5: {
4393 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
4394 }
4395 case value_variant_type::Type::Type6: {
4396 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
4397 }
4398 case value_variant_type::Type::Type7: {
4399 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
4400 }
4401 case value_variant_type::Type::Type8: {
4402 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
4403 }
4404 case value_variant_type::Type::Type9: {
4405 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
4406 }
4407 default:
4408 ossia_do_throw(std::runtime_error, ": bad type");
4409 }
4410 }
4411 case color::Type::Type3: {
4412 switch(arg1.m_type)
4413 {
4414 case value_variant_type::Type::Type0: {
4415 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
4416 }
4417 case value_variant_type::Type::Type1: {
4418 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
4419 }
4420 case value_variant_type::Type::Type2: {
4421 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
4422 }
4423 case value_variant_type::Type::Type3: {
4424 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
4425 }
4426 case value_variant_type::Type::Type4: {
4427 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
4428 }
4429 case value_variant_type::Type::Type5: {
4430 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
4431 }
4432 case value_variant_type::Type::Type6: {
4433 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
4434 }
4435 case value_variant_type::Type::Type7: {
4436 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
4437 }
4438 case value_variant_type::Type::Type8: {
4439 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
4440 }
4441 case value_variant_type::Type::Type9: {
4442 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
4443 }
4444 default:
4445 ossia_do_throw(std::runtime_error, ": bad type");
4446 }
4447 }
4448 case color::Type::Type4: {
4449 switch(arg1.m_type)
4450 {
4451 case value_variant_type::Type::Type0: {
4452 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
4453 }
4454 case value_variant_type::Type::Type1: {
4455 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
4456 }
4457 case value_variant_type::Type::Type2: {
4458 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
4459 }
4460 case value_variant_type::Type::Type3: {
4461 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
4462 }
4463 case value_variant_type::Type::Type4: {
4464 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
4465 }
4466 case value_variant_type::Type::Type5: {
4467 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
4468 }
4469 case value_variant_type::Type::Type6: {
4470 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
4471 }
4472 case value_variant_type::Type::Type7: {
4473 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
4474 }
4475 case value_variant_type::Type::Type8: {
4476 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
4477 }
4478 case value_variant_type::Type::Type9: {
4479 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
4480 }
4481 default:
4482 ossia_do_throw(std::runtime_error, ": bad type");
4483 }
4484 }
4485 case color::Type::Type5: {
4486 switch(arg1.m_type)
4487 {
4488 case value_variant_type::Type::Type0: {
4489 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
4490 }
4491 case value_variant_type::Type::Type1: {
4492 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
4493 }
4494 case value_variant_type::Type::Type2: {
4495 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
4496 }
4497 case value_variant_type::Type::Type3: {
4498 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
4499 }
4500 case value_variant_type::Type::Type4: {
4501 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
4502 }
4503 case value_variant_type::Type::Type5: {
4504 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
4505 }
4506 case value_variant_type::Type::Type6: {
4507 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
4508 }
4509 case value_variant_type::Type::Type7: {
4510 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
4511 }
4512 case value_variant_type::Type::Type8: {
4513 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
4514 }
4515 case value_variant_type::Type::Type9: {
4516 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
4517 }
4518 default:
4519 ossia_do_throw(std::runtime_error, ": bad type");
4520 }
4521 }
4522 case color::Type::Type6: {
4523 switch(arg1.m_type)
4524 {
4525 case value_variant_type::Type::Type0: {
4526 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
4527 }
4528 case value_variant_type::Type::Type1: {
4529 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
4530 }
4531 case value_variant_type::Type::Type2: {
4532 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
4533 }
4534 case value_variant_type::Type::Type3: {
4535 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
4536 }
4537 case value_variant_type::Type::Type4: {
4538 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
4539 }
4540 case value_variant_type::Type::Type5: {
4541 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
4542 }
4543 case value_variant_type::Type::Type6: {
4544 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
4545 }
4546 case value_variant_type::Type::Type7: {
4547 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
4548 }
4549 case value_variant_type::Type::Type8: {
4550 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
4551 }
4552 case value_variant_type::Type::Type9: {
4553 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
4554 }
4555 default:
4556 ossia_do_throw(std::runtime_error, ": bad type");
4557 }
4558 }
4559 case color::Type::Type7: {
4560 switch(arg1.m_type)
4561 {
4562 case value_variant_type::Type::Type0: {
4563 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
4564 }
4565 case value_variant_type::Type::Type1: {
4566 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
4567 }
4568 case value_variant_type::Type::Type2: {
4569 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
4570 }
4571 case value_variant_type::Type::Type3: {
4572 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
4573 }
4574 case value_variant_type::Type::Type4: {
4575 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
4576 }
4577 case value_variant_type::Type::Type5: {
4578 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
4579 }
4580 case value_variant_type::Type::Type6: {
4581 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
4582 }
4583 case value_variant_type::Type::Type7: {
4584 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
4585 }
4586 case value_variant_type::Type::Type8: {
4587 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
4588 }
4589 case value_variant_type::Type::Type9: {
4590 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
4591 }
4592 default:
4593 ossia_do_throw(std::runtime_error, ": bad type");
4594 }
4595 }
4596 case color::Type::Type8: {
4597 switch(arg1.m_type)
4598 {
4599 case value_variant_type::Type::Type0: {
4600 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
4601 }
4602 case value_variant_type::Type::Type1: {
4603 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
4604 }
4605 case value_variant_type::Type::Type2: {
4606 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
4607 }
4608 case value_variant_type::Type::Type3: {
4609 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
4610 }
4611 case value_variant_type::Type::Type4: {
4612 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
4613 }
4614 case value_variant_type::Type::Type5: {
4615 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
4616 }
4617 case value_variant_type::Type::Type6: {
4618 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
4619 }
4620 case value_variant_type::Type::Type7: {
4621 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
4622 }
4623 case value_variant_type::Type::Type8: {
4624 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
4625 }
4626 case value_variant_type::Type::Type9: {
4627 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
4628 }
4629 default:
4630 ossia_do_throw(std::runtime_error, ": bad type");
4631 }
4632 }
4633 default:
4634 ossia_do_throw(std::runtime_error, ": bad type");
4635 }
4636}
4637template <typename Functor>
4638auto apply(Functor&& functor, const distance& arg0, const value_variant_type& arg1)
4639{
4640 switch(arg0.m_type)
4641 {
4642 case distance::Type::Type0: {
4643 switch(arg1.m_type)
4644 {
4645 case value_variant_type::Type::Type0: {
4646 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
4647 }
4648 case value_variant_type::Type::Type1: {
4649 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
4650 }
4651 case value_variant_type::Type::Type2: {
4652 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
4653 }
4654 case value_variant_type::Type::Type3: {
4655 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
4656 }
4657 case value_variant_type::Type::Type4: {
4658 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
4659 }
4660 case value_variant_type::Type::Type5: {
4661 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
4662 }
4663 case value_variant_type::Type::Type6: {
4664 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
4665 }
4666 case value_variant_type::Type::Type7: {
4667 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
4668 }
4669 case value_variant_type::Type::Type8: {
4670 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
4671 }
4672 case value_variant_type::Type::Type9: {
4673 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
4674 }
4675 default:
4676 ossia_do_throw(std::runtime_error, ": bad type");
4677 }
4678 }
4679 case distance::Type::Type1: {
4680 switch(arg1.m_type)
4681 {
4682 case value_variant_type::Type::Type0: {
4683 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
4684 }
4685 case value_variant_type::Type::Type1: {
4686 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
4687 }
4688 case value_variant_type::Type::Type2: {
4689 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
4690 }
4691 case value_variant_type::Type::Type3: {
4692 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
4693 }
4694 case value_variant_type::Type::Type4: {
4695 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
4696 }
4697 case value_variant_type::Type::Type5: {
4698 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
4699 }
4700 case value_variant_type::Type::Type6: {
4701 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
4702 }
4703 case value_variant_type::Type::Type7: {
4704 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
4705 }
4706 case value_variant_type::Type::Type8: {
4707 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
4708 }
4709 case value_variant_type::Type::Type9: {
4710 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
4711 }
4712 default:
4713 ossia_do_throw(std::runtime_error, ": bad type");
4714 }
4715 }
4716 case distance::Type::Type2: {
4717 switch(arg1.m_type)
4718 {
4719 case value_variant_type::Type::Type0: {
4720 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
4721 }
4722 case value_variant_type::Type::Type1: {
4723 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
4724 }
4725 case value_variant_type::Type::Type2: {
4726 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
4727 }
4728 case value_variant_type::Type::Type3: {
4729 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
4730 }
4731 case value_variant_type::Type::Type4: {
4732 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
4733 }
4734 case value_variant_type::Type::Type5: {
4735 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
4736 }
4737 case value_variant_type::Type::Type6: {
4738 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
4739 }
4740 case value_variant_type::Type::Type7: {
4741 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
4742 }
4743 case value_variant_type::Type::Type8: {
4744 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
4745 }
4746 case value_variant_type::Type::Type9: {
4747 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
4748 }
4749 default:
4750 ossia_do_throw(std::runtime_error, ": bad type");
4751 }
4752 }
4753 case distance::Type::Type3: {
4754 switch(arg1.m_type)
4755 {
4756 case value_variant_type::Type::Type0: {
4757 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
4758 }
4759 case value_variant_type::Type::Type1: {
4760 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
4761 }
4762 case value_variant_type::Type::Type2: {
4763 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
4764 }
4765 case value_variant_type::Type::Type3: {
4766 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
4767 }
4768 case value_variant_type::Type::Type4: {
4769 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
4770 }
4771 case value_variant_type::Type::Type5: {
4772 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
4773 }
4774 case value_variant_type::Type::Type6: {
4775 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
4776 }
4777 case value_variant_type::Type::Type7: {
4778 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
4779 }
4780 case value_variant_type::Type::Type8: {
4781 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
4782 }
4783 case value_variant_type::Type::Type9: {
4784 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
4785 }
4786 default:
4787 ossia_do_throw(std::runtime_error, ": bad type");
4788 }
4789 }
4790 case distance::Type::Type4: {
4791 switch(arg1.m_type)
4792 {
4793 case value_variant_type::Type::Type0: {
4794 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
4795 }
4796 case value_variant_type::Type::Type1: {
4797 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
4798 }
4799 case value_variant_type::Type::Type2: {
4800 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
4801 }
4802 case value_variant_type::Type::Type3: {
4803 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
4804 }
4805 case value_variant_type::Type::Type4: {
4806 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
4807 }
4808 case value_variant_type::Type::Type5: {
4809 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
4810 }
4811 case value_variant_type::Type::Type6: {
4812 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
4813 }
4814 case value_variant_type::Type::Type7: {
4815 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
4816 }
4817 case value_variant_type::Type::Type8: {
4818 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
4819 }
4820 case value_variant_type::Type::Type9: {
4821 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
4822 }
4823 default:
4824 ossia_do_throw(std::runtime_error, ": bad type");
4825 }
4826 }
4827 case distance::Type::Type5: {
4828 switch(arg1.m_type)
4829 {
4830 case value_variant_type::Type::Type0: {
4831 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
4832 }
4833 case value_variant_type::Type::Type1: {
4834 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
4835 }
4836 case value_variant_type::Type::Type2: {
4837 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
4838 }
4839 case value_variant_type::Type::Type3: {
4840 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
4841 }
4842 case value_variant_type::Type::Type4: {
4843 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
4844 }
4845 case value_variant_type::Type::Type5: {
4846 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
4847 }
4848 case value_variant_type::Type::Type6: {
4849 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
4850 }
4851 case value_variant_type::Type::Type7: {
4852 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
4853 }
4854 case value_variant_type::Type::Type8: {
4855 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
4856 }
4857 case value_variant_type::Type::Type9: {
4858 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
4859 }
4860 default:
4861 ossia_do_throw(std::runtime_error, ": bad type");
4862 }
4863 }
4864 case distance::Type::Type6: {
4865 switch(arg1.m_type)
4866 {
4867 case value_variant_type::Type::Type0: {
4868 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
4869 }
4870 case value_variant_type::Type::Type1: {
4871 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
4872 }
4873 case value_variant_type::Type::Type2: {
4874 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
4875 }
4876 case value_variant_type::Type::Type3: {
4877 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
4878 }
4879 case value_variant_type::Type::Type4: {
4880 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
4881 }
4882 case value_variant_type::Type::Type5: {
4883 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
4884 }
4885 case value_variant_type::Type::Type6: {
4886 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
4887 }
4888 case value_variant_type::Type::Type7: {
4889 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
4890 }
4891 case value_variant_type::Type::Type8: {
4892 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
4893 }
4894 case value_variant_type::Type::Type9: {
4895 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
4896 }
4897 default:
4898 ossia_do_throw(std::runtime_error, ": bad type");
4899 }
4900 }
4901 case distance::Type::Type7: {
4902 switch(arg1.m_type)
4903 {
4904 case value_variant_type::Type::Type0: {
4905 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
4906 }
4907 case value_variant_type::Type::Type1: {
4908 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
4909 }
4910 case value_variant_type::Type::Type2: {
4911 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
4912 }
4913 case value_variant_type::Type::Type3: {
4914 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
4915 }
4916 case value_variant_type::Type::Type4: {
4917 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
4918 }
4919 case value_variant_type::Type::Type5: {
4920 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
4921 }
4922 case value_variant_type::Type::Type6: {
4923 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
4924 }
4925 case value_variant_type::Type::Type7: {
4926 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
4927 }
4928 case value_variant_type::Type::Type8: {
4929 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
4930 }
4931 case value_variant_type::Type::Type9: {
4932 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
4933 }
4934 default:
4935 ossia_do_throw(std::runtime_error, ": bad type");
4936 }
4937 }
4938 case distance::Type::Type8: {
4939 switch(arg1.m_type)
4940 {
4941 case value_variant_type::Type::Type0: {
4942 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
4943 }
4944 case value_variant_type::Type::Type1: {
4945 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
4946 }
4947 case value_variant_type::Type::Type2: {
4948 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
4949 }
4950 case value_variant_type::Type::Type3: {
4951 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
4952 }
4953 case value_variant_type::Type::Type4: {
4954 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
4955 }
4956 case value_variant_type::Type::Type5: {
4957 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
4958 }
4959 case value_variant_type::Type::Type6: {
4960 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
4961 }
4962 case value_variant_type::Type::Type7: {
4963 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
4964 }
4965 case value_variant_type::Type::Type8: {
4966 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
4967 }
4968 case value_variant_type::Type::Type9: {
4969 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
4970 }
4971 default:
4972 ossia_do_throw(std::runtime_error, ": bad type");
4973 }
4974 }
4975 case distance::Type::Type9: {
4976 switch(arg1.m_type)
4977 {
4978 case value_variant_type::Type::Type0: {
4979 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
4980 }
4981 case value_variant_type::Type::Type1: {
4982 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
4983 }
4984 case value_variant_type::Type::Type2: {
4985 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
4986 }
4987 case value_variant_type::Type::Type3: {
4988 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
4989 }
4990 case value_variant_type::Type::Type4: {
4991 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
4992 }
4993 case value_variant_type::Type::Type5: {
4994 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
4995 }
4996 case value_variant_type::Type::Type6: {
4997 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
4998 }
4999 case value_variant_type::Type::Type7: {
5000 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
5001 }
5002 case value_variant_type::Type::Type8: {
5003 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
5004 }
5005 case value_variant_type::Type::Type9: {
5006 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value9);
5007 }
5008 default:
5009 ossia_do_throw(std::runtime_error, ": bad type");
5010 }
5011 }
5012 case distance::Type::Type10: {
5013 switch(arg1.m_type)
5014 {
5015 case value_variant_type::Type::Type0: {
5016 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value0);
5017 }
5018 case value_variant_type::Type::Type1: {
5019 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value1);
5020 }
5021 case value_variant_type::Type::Type2: {
5022 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value2);
5023 }
5024 case value_variant_type::Type::Type3: {
5025 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value3);
5026 }
5027 case value_variant_type::Type::Type4: {
5028 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value4);
5029 }
5030 case value_variant_type::Type::Type5: {
5031 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value5);
5032 }
5033 case value_variant_type::Type::Type6: {
5034 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value6);
5035 }
5036 case value_variant_type::Type::Type7: {
5037 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value7);
5038 }
5039 case value_variant_type::Type::Type8: {
5040 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value8);
5041 }
5042 case value_variant_type::Type::Type9: {
5043 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value9);
5044 }
5045 default:
5046 ossia_do_throw(std::runtime_error, ": bad type");
5047 }
5048 }
5049 default:
5050 ossia_do_throw(std::runtime_error, ": bad type");
5051 }
5052}
5053template <typename Functor>
5054auto apply(Functor&& functor, const gain& arg0, const value_variant_type& arg1)
5055{
5056 switch(arg0.m_type)
5057 {
5058 case gain::Type::Type0: {
5059 switch(arg1.m_type)
5060 {
5061 case value_variant_type::Type::Type0: {
5062 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
5063 }
5064 case value_variant_type::Type::Type1: {
5065 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
5066 }
5067 case value_variant_type::Type::Type2: {
5068 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
5069 }
5070 case value_variant_type::Type::Type3: {
5071 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
5072 }
5073 case value_variant_type::Type::Type4: {
5074 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
5075 }
5076 case value_variant_type::Type::Type5: {
5077 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
5078 }
5079 case value_variant_type::Type::Type6: {
5080 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
5081 }
5082 case value_variant_type::Type::Type7: {
5083 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
5084 }
5085 case value_variant_type::Type::Type8: {
5086 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
5087 }
5088 case value_variant_type::Type::Type9: {
5089 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
5090 }
5091 default:
5092 ossia_do_throw(std::runtime_error, ": bad type");
5093 }
5094 }
5095 case gain::Type::Type1: {
5096 switch(arg1.m_type)
5097 {
5098 case value_variant_type::Type::Type0: {
5099 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
5100 }
5101 case value_variant_type::Type::Type1: {
5102 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
5103 }
5104 case value_variant_type::Type::Type2: {
5105 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
5106 }
5107 case value_variant_type::Type::Type3: {
5108 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
5109 }
5110 case value_variant_type::Type::Type4: {
5111 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
5112 }
5113 case value_variant_type::Type::Type5: {
5114 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
5115 }
5116 case value_variant_type::Type::Type6: {
5117 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
5118 }
5119 case value_variant_type::Type::Type7: {
5120 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
5121 }
5122 case value_variant_type::Type::Type8: {
5123 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
5124 }
5125 case value_variant_type::Type::Type9: {
5126 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
5127 }
5128 default:
5129 ossia_do_throw(std::runtime_error, ": bad type");
5130 }
5131 }
5132 case gain::Type::Type2: {
5133 switch(arg1.m_type)
5134 {
5135 case value_variant_type::Type::Type0: {
5136 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
5137 }
5138 case value_variant_type::Type::Type1: {
5139 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
5140 }
5141 case value_variant_type::Type::Type2: {
5142 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
5143 }
5144 case value_variant_type::Type::Type3: {
5145 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
5146 }
5147 case value_variant_type::Type::Type4: {
5148 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
5149 }
5150 case value_variant_type::Type::Type5: {
5151 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
5152 }
5153 case value_variant_type::Type::Type6: {
5154 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
5155 }
5156 case value_variant_type::Type::Type7: {
5157 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
5158 }
5159 case value_variant_type::Type::Type8: {
5160 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
5161 }
5162 case value_variant_type::Type::Type9: {
5163 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
5164 }
5165 default:
5166 ossia_do_throw(std::runtime_error, ": bad type");
5167 }
5168 }
5169 case gain::Type::Type3: {
5170 switch(arg1.m_type)
5171 {
5172 case value_variant_type::Type::Type0: {
5173 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
5174 }
5175 case value_variant_type::Type::Type1: {
5176 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
5177 }
5178 case value_variant_type::Type::Type2: {
5179 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
5180 }
5181 case value_variant_type::Type::Type3: {
5182 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
5183 }
5184 case value_variant_type::Type::Type4: {
5185 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
5186 }
5187 case value_variant_type::Type::Type5: {
5188 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
5189 }
5190 case value_variant_type::Type::Type6: {
5191 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
5192 }
5193 case value_variant_type::Type::Type7: {
5194 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
5195 }
5196 case value_variant_type::Type::Type8: {
5197 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
5198 }
5199 case value_variant_type::Type::Type9: {
5200 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
5201 }
5202 default:
5203 ossia_do_throw(std::runtime_error, ": bad type");
5204 }
5205 }
5206 default:
5207 ossia_do_throw(std::runtime_error, ": bad type");
5208 }
5209}
5210template <typename Functor>
5211auto apply(Functor&& functor, const orientation& arg0, const value_variant_type& arg1)
5212{
5213 switch(arg0.m_type)
5214 {
5215 case orientation::Type::Type0: {
5216 switch(arg1.m_type)
5217 {
5218 case value_variant_type::Type::Type0: {
5219 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
5220 }
5221 case value_variant_type::Type::Type1: {
5222 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
5223 }
5224 case value_variant_type::Type::Type2: {
5225 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
5226 }
5227 case value_variant_type::Type::Type3: {
5228 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
5229 }
5230 case value_variant_type::Type::Type4: {
5231 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
5232 }
5233 case value_variant_type::Type::Type5: {
5234 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
5235 }
5236 case value_variant_type::Type::Type6: {
5237 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
5238 }
5239 case value_variant_type::Type::Type7: {
5240 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
5241 }
5242 case value_variant_type::Type::Type8: {
5243 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
5244 }
5245 case value_variant_type::Type::Type9: {
5246 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
5247 }
5248 default:
5249 ossia_do_throw(std::runtime_error, ": bad type");
5250 }
5251 }
5252 case orientation::Type::Type1: {
5253 switch(arg1.m_type)
5254 {
5255 case value_variant_type::Type::Type0: {
5256 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
5257 }
5258 case value_variant_type::Type::Type1: {
5259 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
5260 }
5261 case value_variant_type::Type::Type2: {
5262 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
5263 }
5264 case value_variant_type::Type::Type3: {
5265 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
5266 }
5267 case value_variant_type::Type::Type4: {
5268 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
5269 }
5270 case value_variant_type::Type::Type5: {
5271 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
5272 }
5273 case value_variant_type::Type::Type6: {
5274 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
5275 }
5276 case value_variant_type::Type::Type7: {
5277 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
5278 }
5279 case value_variant_type::Type::Type8: {
5280 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
5281 }
5282 case value_variant_type::Type::Type9: {
5283 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
5284 }
5285 default:
5286 ossia_do_throw(std::runtime_error, ": bad type");
5287 }
5288 }
5289 case orientation::Type::Type2: {
5290 switch(arg1.m_type)
5291 {
5292 case value_variant_type::Type::Type0: {
5293 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
5294 }
5295 case value_variant_type::Type::Type1: {
5296 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
5297 }
5298 case value_variant_type::Type::Type2: {
5299 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
5300 }
5301 case value_variant_type::Type::Type3: {
5302 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
5303 }
5304 case value_variant_type::Type::Type4: {
5305 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
5306 }
5307 case value_variant_type::Type::Type5: {
5308 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
5309 }
5310 case value_variant_type::Type::Type6: {
5311 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
5312 }
5313 case value_variant_type::Type::Type7: {
5314 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
5315 }
5316 case value_variant_type::Type::Type8: {
5317 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
5318 }
5319 case value_variant_type::Type::Type9: {
5320 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
5321 }
5322 default:
5323 ossia_do_throw(std::runtime_error, ": bad type");
5324 }
5325 }
5326 default:
5327 ossia_do_throw(std::runtime_error, ": bad type");
5328 }
5329}
5330template <typename Functor>
5331auto apply(Functor&& functor, const position& arg0, const value_variant_type& arg1)
5332{
5333 switch(arg0.m_type)
5334 {
5335 case position::Type::Type0: {
5336 switch(arg1.m_type)
5337 {
5338 case value_variant_type::Type::Type0: {
5339 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
5340 }
5341 case value_variant_type::Type::Type1: {
5342 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
5343 }
5344 case value_variant_type::Type::Type2: {
5345 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
5346 }
5347 case value_variant_type::Type::Type3: {
5348 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
5349 }
5350 case value_variant_type::Type::Type4: {
5351 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
5352 }
5353 case value_variant_type::Type::Type5: {
5354 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
5355 }
5356 case value_variant_type::Type::Type6: {
5357 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
5358 }
5359 case value_variant_type::Type::Type7: {
5360 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
5361 }
5362 case value_variant_type::Type::Type8: {
5363 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
5364 }
5365 default:
5366 ossia_do_throw(std::runtime_error, ": bad type");
5367 }
5368 }
5369 case position::Type::Type1: {
5370 switch(arg1.m_type)
5371 {
5372 case value_variant_type::Type::Type0: {
5373 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
5374 }
5375 case value_variant_type::Type::Type1: {
5376 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
5377 }
5378 case value_variant_type::Type::Type2: {
5379 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
5380 }
5381 case value_variant_type::Type::Type3: {
5382 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
5383 }
5384 case value_variant_type::Type::Type4: {
5385 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
5386 }
5387 case value_variant_type::Type::Type5: {
5388 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
5389 }
5390 case value_variant_type::Type::Type6: {
5391 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
5392 }
5393 case value_variant_type::Type::Type7: {
5394 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
5395 }
5396 case value_variant_type::Type::Type8: {
5397 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
5398 }
5399 default:
5400 ossia_do_throw(std::runtime_error, ": bad type");
5401 }
5402 }
5403 case position::Type::Type2: {
5404 switch(arg1.m_type)
5405 {
5406 case value_variant_type::Type::Type0: {
5407 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
5408 }
5409 case value_variant_type::Type::Type1: {
5410 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
5411 }
5412 case value_variant_type::Type::Type2: {
5413 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
5414 }
5415 case value_variant_type::Type::Type3: {
5416 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
5417 }
5418 case value_variant_type::Type::Type4: {
5419 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
5420 }
5421 case value_variant_type::Type::Type5: {
5422 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
5423 }
5424 case value_variant_type::Type::Type6: {
5425 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
5426 }
5427 case value_variant_type::Type::Type7: {
5428 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
5429 }
5430 case value_variant_type::Type::Type8: {
5431 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
5432 }
5433 default:
5434 ossia_do_throw(std::runtime_error, ": bad type");
5435 }
5436 }
5437 case position::Type::Type3: {
5438 switch(arg1.m_type)
5439 {
5440 case value_variant_type::Type::Type0: {
5441 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
5442 }
5443 case value_variant_type::Type::Type1: {
5444 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
5445 }
5446 case value_variant_type::Type::Type2: {
5447 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
5448 }
5449 case value_variant_type::Type::Type3: {
5450 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
5451 }
5452 case value_variant_type::Type::Type4: {
5453 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
5454 }
5455 case value_variant_type::Type::Type5: {
5456 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
5457 }
5458 case value_variant_type::Type::Type6: {
5459 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
5460 }
5461 case value_variant_type::Type::Type7: {
5462 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
5463 }
5464 case value_variant_type::Type::Type8: {
5465 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
5466 }
5467 default:
5468 ossia_do_throw(std::runtime_error, ": bad type");
5469 }
5470 }
5471 case position::Type::Type4: {
5472 switch(arg1.m_type)
5473 {
5474 case value_variant_type::Type::Type0: {
5475 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
5476 }
5477 case value_variant_type::Type::Type1: {
5478 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
5479 }
5480 case value_variant_type::Type::Type2: {
5481 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
5482 }
5483 case value_variant_type::Type::Type3: {
5484 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
5485 }
5486 case value_variant_type::Type::Type4: {
5487 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
5488 }
5489 case value_variant_type::Type::Type5: {
5490 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
5491 }
5492 case value_variant_type::Type::Type6: {
5493 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
5494 }
5495 case value_variant_type::Type::Type7: {
5496 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
5497 }
5498 case value_variant_type::Type::Type8: {
5499 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
5500 }
5501 default:
5502 ossia_do_throw(std::runtime_error, ": bad type");
5503 }
5504 }
5505 case position::Type::Type5: {
5506 switch(arg1.m_type)
5507 {
5508 case value_variant_type::Type::Type0: {
5509 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
5510 }
5511 case value_variant_type::Type::Type1: {
5512 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
5513 }
5514 case value_variant_type::Type::Type2: {
5515 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
5516 }
5517 case value_variant_type::Type::Type3: {
5518 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
5519 }
5520 case value_variant_type::Type::Type4: {
5521 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
5522 }
5523 case value_variant_type::Type::Type5: {
5524 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
5525 }
5526 case value_variant_type::Type::Type6: {
5527 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
5528 }
5529 case value_variant_type::Type::Type7: {
5530 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
5531 }
5532 case value_variant_type::Type::Type8: {
5533 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
5534 }
5535 default:
5536 ossia_do_throw(std::runtime_error, ": bad type");
5537 }
5538 }
5539 case position::Type::Type6: {
5540 switch(arg1.m_type)
5541 {
5542 case value_variant_type::Type::Type0: {
5543 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
5544 }
5545 case value_variant_type::Type::Type1: {
5546 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
5547 }
5548 case value_variant_type::Type::Type2: {
5549 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
5550 }
5551 case value_variant_type::Type::Type3: {
5552 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
5553 }
5554 case value_variant_type::Type::Type4: {
5555 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
5556 }
5557 case value_variant_type::Type::Type5: {
5558 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
5559 }
5560 case value_variant_type::Type::Type6: {
5561 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
5562 }
5563 case value_variant_type::Type::Type7: {
5564 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
5565 }
5566 case value_variant_type::Type::Type8: {
5567 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
5568 }
5569 default:
5570 ossia_do_throw(std::runtime_error, ": bad type");
5571 }
5572 }
5573 case position::Type::Type7: {
5574 switch(arg1.m_type)
5575 {
5576 case value_variant_type::Type::Type0: {
5577 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
5578 }
5579 case value_variant_type::Type::Type1: {
5580 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
5581 }
5582 case value_variant_type::Type::Type2: {
5583 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
5584 }
5585 case value_variant_type::Type::Type3: {
5586 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
5587 }
5588 case value_variant_type::Type::Type4: {
5589 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
5590 }
5591 case value_variant_type::Type::Type5: {
5592 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
5593 }
5594 case value_variant_type::Type::Type6: {
5595 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
5596 }
5597 case value_variant_type::Type::Type7: {
5598 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
5599 }
5600 case value_variant_type::Type::Type8: {
5601 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
5602 }
5603 default:
5604 ossia_do_throw(std::runtime_error, ": bad type");
5605 }
5606 }
5607 case position::Type::Type8: {
5608 switch(arg1.m_type)
5609 {
5610 case value_variant_type::Type::Type0: {
5611 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
5612 }
5613 case value_variant_type::Type::Type1: {
5614 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
5615 }
5616 case value_variant_type::Type::Type2: {
5617 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
5618 }
5619 case value_variant_type::Type::Type3: {
5620 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
5621 }
5622 case value_variant_type::Type::Type4: {
5623 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
5624 }
5625 case value_variant_type::Type::Type5: {
5626 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
5627 }
5628 case value_variant_type::Type::Type6: {
5629 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
5630 }
5631 case value_variant_type::Type::Type7: {
5632 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
5633 }
5634 case value_variant_type::Type::Type8: {
5635 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
5636 }
5637 default:
5638 ossia_do_throw(std::runtime_error, ": bad type");
5639 }
5640 }
5641 default:
5642 ossia_do_throw(std::runtime_error, ": bad type");
5643 }
5644}
5645template <typename Functor>
5646auto apply(Functor&& functor, const speed& arg0, const value_variant_type& arg1)
5647{
5648 switch(arg0.m_type)
5649 {
5650 case speed::Type::Type0: {
5651 switch(arg1.m_type)
5652 {
5653 case value_variant_type::Type::Type0: {
5654 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
5655 }
5656 case value_variant_type::Type::Type1: {
5657 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
5658 }
5659 case value_variant_type::Type::Type2: {
5660 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
5661 }
5662 case value_variant_type::Type::Type3: {
5663 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
5664 }
5665 case value_variant_type::Type::Type4: {
5666 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
5667 }
5668 case value_variant_type::Type::Type5: {
5669 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
5670 }
5671 case value_variant_type::Type::Type6: {
5672 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
5673 }
5674 case value_variant_type::Type::Type7: {
5675 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
5676 }
5677 case value_variant_type::Type::Type8: {
5678 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
5679 }
5680 case value_variant_type::Type::Type9: {
5681 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
5682 }
5683 default:
5684 ossia_do_throw(std::runtime_error, ": bad type");
5685 }
5686 }
5687 case speed::Type::Type1: {
5688 switch(arg1.m_type)
5689 {
5690 case value_variant_type::Type::Type0: {
5691 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
5692 }
5693 case value_variant_type::Type::Type1: {
5694 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
5695 }
5696 case value_variant_type::Type::Type2: {
5697 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
5698 }
5699 case value_variant_type::Type::Type3: {
5700 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
5701 }
5702 case value_variant_type::Type::Type4: {
5703 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
5704 }
5705 case value_variant_type::Type::Type5: {
5706 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
5707 }
5708 case value_variant_type::Type::Type6: {
5709 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
5710 }
5711 case value_variant_type::Type::Type7: {
5712 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
5713 }
5714 case value_variant_type::Type::Type8: {
5715 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
5716 }
5717 case value_variant_type::Type::Type9: {
5718 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
5719 }
5720 default:
5721 ossia_do_throw(std::runtime_error, ": bad type");
5722 }
5723 }
5724 case speed::Type::Type2: {
5725 switch(arg1.m_type)
5726 {
5727 case value_variant_type::Type::Type0: {
5728 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
5729 }
5730 case value_variant_type::Type::Type1: {
5731 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
5732 }
5733 case value_variant_type::Type::Type2: {
5734 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
5735 }
5736 case value_variant_type::Type::Type3: {
5737 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
5738 }
5739 case value_variant_type::Type::Type4: {
5740 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
5741 }
5742 case value_variant_type::Type::Type5: {
5743 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
5744 }
5745 case value_variant_type::Type::Type6: {
5746 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
5747 }
5748 case value_variant_type::Type::Type7: {
5749 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
5750 }
5751 case value_variant_type::Type::Type8: {
5752 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
5753 }
5754 case value_variant_type::Type::Type9: {
5755 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
5756 }
5757 default:
5758 ossia_do_throw(std::runtime_error, ": bad type");
5759 }
5760 }
5761 case speed::Type::Type3: {
5762 switch(arg1.m_type)
5763 {
5764 case value_variant_type::Type::Type0: {
5765 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
5766 }
5767 case value_variant_type::Type::Type1: {
5768 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
5769 }
5770 case value_variant_type::Type::Type2: {
5771 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
5772 }
5773 case value_variant_type::Type::Type3: {
5774 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
5775 }
5776 case value_variant_type::Type::Type4: {
5777 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
5778 }
5779 case value_variant_type::Type::Type5: {
5780 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
5781 }
5782 case value_variant_type::Type::Type6: {
5783 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
5784 }
5785 case value_variant_type::Type::Type7: {
5786 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
5787 }
5788 case value_variant_type::Type::Type8: {
5789 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
5790 }
5791 case value_variant_type::Type::Type9: {
5792 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
5793 }
5794 default:
5795 ossia_do_throw(std::runtime_error, ": bad type");
5796 }
5797 }
5798 case speed::Type::Type4: {
5799 switch(arg1.m_type)
5800 {
5801 case value_variant_type::Type::Type0: {
5802 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
5803 }
5804 case value_variant_type::Type::Type1: {
5805 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
5806 }
5807 case value_variant_type::Type::Type2: {
5808 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
5809 }
5810 case value_variant_type::Type::Type3: {
5811 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
5812 }
5813 case value_variant_type::Type::Type4: {
5814 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
5815 }
5816 case value_variant_type::Type::Type5: {
5817 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
5818 }
5819 case value_variant_type::Type::Type6: {
5820 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
5821 }
5822 case value_variant_type::Type::Type7: {
5823 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
5824 }
5825 case value_variant_type::Type::Type8: {
5826 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
5827 }
5828 case value_variant_type::Type::Type9: {
5829 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
5830 }
5831 default:
5832 ossia_do_throw(std::runtime_error, ": bad type");
5833 }
5834 }
5835 case speed::Type::Type5: {
5836 switch(arg1.m_type)
5837 {
5838 case value_variant_type::Type::Type0: {
5839 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
5840 }
5841 case value_variant_type::Type::Type1: {
5842 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
5843 }
5844 case value_variant_type::Type::Type2: {
5845 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
5846 }
5847 case value_variant_type::Type::Type3: {
5848 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
5849 }
5850 case value_variant_type::Type::Type4: {
5851 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
5852 }
5853 case value_variant_type::Type::Type5: {
5854 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
5855 }
5856 case value_variant_type::Type::Type6: {
5857 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
5858 }
5859 case value_variant_type::Type::Type7: {
5860 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
5861 }
5862 case value_variant_type::Type::Type8: {
5863 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
5864 }
5865 case value_variant_type::Type::Type9: {
5866 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
5867 }
5868 default:
5869 ossia_do_throw(std::runtime_error, ": bad type");
5870 }
5871 }
5872 default:
5873 ossia_do_throw(std::runtime_error, ": bad type");
5874 }
5875}
5876template <typename Functor>
5877auto apply(Functor&& functor, const timing& arg0, const value_variant_type& arg1)
5878{
5879 switch(arg0.m_type)
5880 {
5881 case timing::Type::Type0: {
5882 switch(arg1.m_type)
5883 {
5884 case value_variant_type::Type::Type0: {
5885 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
5886 }
5887 case value_variant_type::Type::Type1: {
5888 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
5889 }
5890 case value_variant_type::Type::Type2: {
5891 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
5892 }
5893 case value_variant_type::Type::Type3: {
5894 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
5895 }
5896 case value_variant_type::Type::Type4: {
5897 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
5898 }
5899 case value_variant_type::Type::Type5: {
5900 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
5901 }
5902 case value_variant_type::Type::Type6: {
5903 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
5904 }
5905 case value_variant_type::Type::Type7: {
5906 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
5907 }
5908 case value_variant_type::Type::Type8: {
5909 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
5910 }
5911 case value_variant_type::Type::Type9: {
5912 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
5913 }
5914 default:
5915 ossia_do_throw(std::runtime_error, ": bad type");
5916 }
5917 }
5918 case timing::Type::Type1: {
5919 switch(arg1.m_type)
5920 {
5921 case value_variant_type::Type::Type0: {
5922 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
5923 }
5924 case value_variant_type::Type::Type1: {
5925 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
5926 }
5927 case value_variant_type::Type::Type2: {
5928 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
5929 }
5930 case value_variant_type::Type::Type3: {
5931 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
5932 }
5933 case value_variant_type::Type::Type4: {
5934 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
5935 }
5936 case value_variant_type::Type::Type5: {
5937 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
5938 }
5939 case value_variant_type::Type::Type6: {
5940 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
5941 }
5942 case value_variant_type::Type::Type7: {
5943 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
5944 }
5945 case value_variant_type::Type::Type8: {
5946 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
5947 }
5948 case value_variant_type::Type::Type9: {
5949 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
5950 }
5951 default:
5952 ossia_do_throw(std::runtime_error, ": bad type");
5953 }
5954 }
5955 case timing::Type::Type2: {
5956 switch(arg1.m_type)
5957 {
5958 case value_variant_type::Type::Type0: {
5959 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
5960 }
5961 case value_variant_type::Type::Type1: {
5962 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
5963 }
5964 case value_variant_type::Type::Type2: {
5965 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
5966 }
5967 case value_variant_type::Type::Type3: {
5968 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
5969 }
5970 case value_variant_type::Type::Type4: {
5971 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
5972 }
5973 case value_variant_type::Type::Type5: {
5974 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
5975 }
5976 case value_variant_type::Type::Type6: {
5977 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
5978 }
5979 case value_variant_type::Type::Type7: {
5980 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
5981 }
5982 case value_variant_type::Type::Type8: {
5983 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
5984 }
5985 case value_variant_type::Type::Type9: {
5986 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
5987 }
5988 default:
5989 ossia_do_throw(std::runtime_error, ": bad type");
5990 }
5991 }
5992 case timing::Type::Type3: {
5993 switch(arg1.m_type)
5994 {
5995 case value_variant_type::Type::Type0: {
5996 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
5997 }
5998 case value_variant_type::Type::Type1: {
5999 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
6000 }
6001 case value_variant_type::Type::Type2: {
6002 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
6003 }
6004 case value_variant_type::Type::Type3: {
6005 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
6006 }
6007 case value_variant_type::Type::Type4: {
6008 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
6009 }
6010 case value_variant_type::Type::Type5: {
6011 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
6012 }
6013 case value_variant_type::Type::Type6: {
6014 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
6015 }
6016 case value_variant_type::Type::Type7: {
6017 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
6018 }
6019 case value_variant_type::Type::Type8: {
6020 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
6021 }
6022 case value_variant_type::Type::Type9: {
6023 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
6024 }
6025 default:
6026 ossia_do_throw(std::runtime_error, ": bad type");
6027 }
6028 }
6029 case timing::Type::Type4: {
6030 switch(arg1.m_type)
6031 {
6032 case value_variant_type::Type::Type0: {
6033 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
6034 }
6035 case value_variant_type::Type::Type1: {
6036 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
6037 }
6038 case value_variant_type::Type::Type2: {
6039 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
6040 }
6041 case value_variant_type::Type::Type3: {
6042 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
6043 }
6044 case value_variant_type::Type::Type4: {
6045 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value4);
6046 }
6047 case value_variant_type::Type::Type5: {
6048 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
6049 }
6050 case value_variant_type::Type::Type6: {
6051 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
6052 }
6053 case value_variant_type::Type::Type7: {
6054 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
6055 }
6056 case value_variant_type::Type::Type8: {
6057 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
6058 }
6059 case value_variant_type::Type::Type9: {
6060 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
6061 }
6062 default:
6063 ossia_do_throw(std::runtime_error, ": bad type");
6064 }
6065 }
6066 case timing::Type::Type5: {
6067 switch(arg1.m_type)
6068 {
6069 case value_variant_type::Type::Type0: {
6070 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
6071 }
6072 case value_variant_type::Type::Type1: {
6073 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
6074 }
6075 case value_variant_type::Type::Type2: {
6076 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
6077 }
6078 case value_variant_type::Type::Type3: {
6079 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
6080 }
6081 case value_variant_type::Type::Type4: {
6082 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
6083 }
6084 case value_variant_type::Type::Type5: {
6085 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
6086 }
6087 case value_variant_type::Type::Type6: {
6088 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
6089 }
6090 case value_variant_type::Type::Type7: {
6091 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
6092 }
6093 case value_variant_type::Type::Type8: {
6094 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
6095 }
6096 case value_variant_type::Type::Type9: {
6097 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
6098 }
6099 default:
6100 ossia_do_throw(std::runtime_error, ": bad type");
6101 }
6102 }
6103 case timing::Type::Type6: {
6104 switch(arg1.m_type)
6105 {
6106 case value_variant_type::Type::Type0: {
6107 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
6108 }
6109 case value_variant_type::Type::Type1: {
6110 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
6111 }
6112 case value_variant_type::Type::Type2: {
6113 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
6114 }
6115 case value_variant_type::Type::Type3: {
6116 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
6117 }
6118 case value_variant_type::Type::Type4: {
6119 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
6120 }
6121 case value_variant_type::Type::Type5: {
6122 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
6123 }
6124 case value_variant_type::Type::Type6: {
6125 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
6126 }
6127 case value_variant_type::Type::Type7: {
6128 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
6129 }
6130 case value_variant_type::Type::Type8: {
6131 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
6132 }
6133 case value_variant_type::Type::Type9: {
6134 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
6135 }
6136 default:
6137 ossia_do_throw(std::runtime_error, ": bad type");
6138 }
6139 }
6140 case timing::Type::Type7: {
6141 switch(arg1.m_type)
6142 {
6143 case value_variant_type::Type::Type0: {
6144 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
6145 }
6146 case value_variant_type::Type::Type1: {
6147 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
6148 }
6149 case value_variant_type::Type::Type2: {
6150 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
6151 }
6152 case value_variant_type::Type::Type3: {
6153 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
6154 }
6155 case value_variant_type::Type::Type4: {
6156 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
6157 }
6158 case value_variant_type::Type::Type5: {
6159 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
6160 }
6161 case value_variant_type::Type::Type6: {
6162 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
6163 }
6164 case value_variant_type::Type::Type7: {
6165 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
6166 }
6167 case value_variant_type::Type::Type8: {
6168 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
6169 }
6170 case value_variant_type::Type::Type9: {
6171 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
6172 }
6173 default:
6174 ossia_do_throw(std::runtime_error, ": bad type");
6175 }
6176 }
6177 case timing::Type::Type8: {
6178 switch(arg1.m_type)
6179 {
6180 case value_variant_type::Type::Type0: {
6181 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
6182 }
6183 case value_variant_type::Type::Type1: {
6184 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
6185 }
6186 case value_variant_type::Type::Type2: {
6187 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
6188 }
6189 case value_variant_type::Type::Type3: {
6190 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
6191 }
6192 case value_variant_type::Type::Type4: {
6193 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
6194 }
6195 case value_variant_type::Type::Type5: {
6196 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
6197 }
6198 case value_variant_type::Type::Type6: {
6199 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
6200 }
6201 case value_variant_type::Type::Type7: {
6202 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
6203 }
6204 case value_variant_type::Type::Type8: {
6205 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
6206 }
6207 case value_variant_type::Type::Type9: {
6208 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
6209 }
6210 default:
6211 ossia_do_throw(std::runtime_error, ": bad type");
6212 }
6213 }
6214 default:
6215 ossia_do_throw(std::runtime_error, ": bad type");
6216 }
6217}
6218}
Definition git_info.h:7