1struct domain_base_variant
9 ossia::domain_base<ossia::impulse> m_value0;
11 ossia::domain_base<bool> m_value1;
13 ossia::domain_base<int32_t> m_value2;
15 ossia::domain_base<float> m_value3;
17 ossia::domain_base<std::string> m_value5;
19 ossia::vector_domain m_value6;
21 ossia::vecf_domain<2> m_value7;
23 ossia::vecf_domain<3> m_value8;
25 ossia::vecf_domain<4> m_value9;
27 ossia::domain_base<ossia::value> m_value10;
58 m_impl.m_value0.~domain_base();
61 m_impl.m_value1.~domain_base();
64 m_impl.m_value2.~domain_base();
67 m_impl.m_value3.~domain_base();
70 m_impl.m_value5.~domain_base();
73 m_impl.m_value6.~vector_domain();
76 m_impl.m_value7.~vecf_domain();
79 m_impl.m_value8.~vecf_domain();
82 m_impl.m_value9.~vecf_domain();
85 m_impl.m_value10.~domain_base();
95 static const constexpr auto npos = Npos;
96 int which()
const {
return m_type; }
98 operator bool()
const {
return m_type != npos; }
100 const T* target()
const;
101 template <
typename T>
103 template <
typename T>
104 const T& get()
const;
105 template <
typename T>
108 template <
typename T>
110 domain_base_variant()
114 ~domain_base_variant() { destruct_impl(); }
115 domain_base_variant(
const ossia::domain_base<ossia::impulse>& v)
118 new(&m_impl.m_value0) ossia::domain_base<ossia::impulse>{v};
120 domain_base_variant(ossia::domain_base<ossia::impulse>&& v)
123 new(&m_impl.m_value0) ossia::domain_base<ossia::impulse>{std::move(v)};
125 domain_base_variant(
const ossia::domain_base<bool>& v)
128 new(&m_impl.m_value1) ossia::domain_base<bool>{v};
130 domain_base_variant(ossia::domain_base<bool>&& v)
133 new(&m_impl.m_value1) ossia::domain_base<bool>{std::move(v)};
135 domain_base_variant(
const ossia::domain_base<int32_t>& v)
138 new(&m_impl.m_value2) ossia::domain_base<int32_t>{v};
140 domain_base_variant(ossia::domain_base<int32_t>&& v)
143 new(&m_impl.m_value2) ossia::domain_base<int32_t>{std::move(v)};
145 domain_base_variant(
const ossia::domain_base<float>& v)
148 new(&m_impl.m_value3) ossia::domain_base<float>{v};
150 domain_base_variant(ossia::domain_base<float>&& v)
153 new(&m_impl.m_value3) ossia::domain_base<float>{std::move(v)};
155 domain_base_variant(
const ossia::domain_base<std::string>& v)
158 new(&m_impl.m_value5) ossia::domain_base<std::string>{v};
160 domain_base_variant(ossia::domain_base<std::string>&& v)
163 new(&m_impl.m_value5) ossia::domain_base<std::string>{std::move(v)};
165 domain_base_variant(
const ossia::vector_domain& v)
168 new(&m_impl.m_value6) ossia::vector_domain{v};
170 domain_base_variant(ossia::vector_domain&& v)
173 new(&m_impl.m_value6) ossia::vector_domain{std::move(v)};
175 domain_base_variant(
const ossia::vecf_domain<2>& v)
178 new(&m_impl.m_value7) ossia::vecf_domain<2>{v};
180 domain_base_variant(ossia::vecf_domain<2>&& v)
183 new(&m_impl.m_value7) ossia::vecf_domain<2>{std::move(v)};
185 domain_base_variant(
const ossia::vecf_domain<3>& v)
188 new(&m_impl.m_value8) ossia::vecf_domain<3>{v};
190 domain_base_variant(ossia::vecf_domain<3>&& v)
193 new(&m_impl.m_value8) ossia::vecf_domain<3>{std::move(v)};
195 domain_base_variant(
const ossia::vecf_domain<4>& v)
198 new(&m_impl.m_value9) ossia::vecf_domain<4>{v};
200 domain_base_variant(ossia::vecf_domain<4>&& v)
203 new(&m_impl.m_value9) ossia::vecf_domain<4>{std::move(v)};
205 domain_base_variant(
const ossia::domain_base<ossia::value>& v)
208 new(&m_impl.m_value10) ossia::domain_base<ossia::value>{v};
210 domain_base_variant(ossia::domain_base<ossia::value>&& v)
213 new(&m_impl.m_value10) ossia::domain_base<ossia::value>{std::move(v)};
215 domain_base_variant(
const domain_base_variant& other)
216 : m_type{other.m_type}
221 new(&m_impl.m_value0) ossia::domain_base<ossia::impulse>{other.m_impl.m_value0};
224 new(&m_impl.m_value1) ossia::domain_base<bool>{other.m_impl.m_value1};
227 new(&m_impl.m_value2) ossia::domain_base<int32_t>{other.m_impl.m_value2};
230 new(&m_impl.m_value3) ossia::domain_base<float>{other.m_impl.m_value3};
233 new(&m_impl.m_value5) ossia::domain_base<std::string>{other.m_impl.m_value5};
236 new(&m_impl.m_value6) ossia::vector_domain{other.m_impl.m_value6};
239 new(&m_impl.m_value7) ossia::vecf_domain<2>{other.m_impl.m_value7};
242 new(&m_impl.m_value8) ossia::vecf_domain<3>{other.m_impl.m_value8};
245 new(&m_impl.m_value9) ossia::vecf_domain<4>{other.m_impl.m_value9};
248 new(&m_impl.m_value10) ossia::domain_base<ossia::value>{other.m_impl.m_value10};
254 domain_base_variant(domain_base_variant&& other)
255 : m_type{other.m_type}
260 new(&m_impl.m_value0)
261 ossia::domain_base<ossia::impulse>{std::move(other.m_impl.m_value0)};
264 new(&m_impl.m_value1) ossia::domain_base<bool>{std::move(other.m_impl.m_value1)};
267 new(&m_impl.m_value2)
268 ossia::domain_base<int32_t>{std::move(other.m_impl.m_value2)};
271 new(&m_impl.m_value3)
272 ossia::domain_base<float>{std::move(other.m_impl.m_value3)};
275 new(&m_impl.m_value5)
276 ossia::domain_base<std::string>{std::move(other.m_impl.m_value5)};
279 new(&m_impl.m_value6) ossia::vector_domain{std::move(other.m_impl.m_value6)};
282 new(&m_impl.m_value7) ossia::vecf_domain<2>{std::move(other.m_impl.m_value7)};
285 new(&m_impl.m_value8) ossia::vecf_domain<3>{std::move(other.m_impl.m_value8)};
288 new(&m_impl.m_value9) ossia::vecf_domain<4>{std::move(other.m_impl.m_value9)};
291 new(&m_impl.m_value10)
292 ossia::domain_base<ossia::value>{std::move(other.m_impl.m_value10)};
298 domain_base_variant& operator=(
const domain_base_variant& other)
301 m_type = other.m_type;
305 new(&m_impl.m_value0) ossia::domain_base<ossia::impulse>{other.m_impl.m_value0};
308 new(&m_impl.m_value1) ossia::domain_base<bool>{other.m_impl.m_value1};
311 new(&m_impl.m_value2) ossia::domain_base<int32_t>{other.m_impl.m_value2};
314 new(&m_impl.m_value3) ossia::domain_base<float>{other.m_impl.m_value3};
317 new(&m_impl.m_value5) ossia::domain_base<std::string>{other.m_impl.m_value5};
320 new(&m_impl.m_value6) ossia::vector_domain{other.m_impl.m_value6};
323 new(&m_impl.m_value7) ossia::vecf_domain<2>{other.m_impl.m_value7};
326 new(&m_impl.m_value8) ossia::vecf_domain<3>{other.m_impl.m_value8};
329 new(&m_impl.m_value9) ossia::vecf_domain<4>{other.m_impl.m_value9};
332 new(&m_impl.m_value10) ossia::domain_base<ossia::value>{other.m_impl.m_value10};
339 domain_base_variant& operator=(domain_base_variant&& other)
342 m_type = other.m_type;
346 new(&m_impl.m_value0)
347 ossia::domain_base<ossia::impulse>{std::move(other.m_impl.m_value0)};
350 new(&m_impl.m_value1) ossia::domain_base<bool>{std::move(other.m_impl.m_value1)};
353 new(&m_impl.m_value2)
354 ossia::domain_base<int32_t>{std::move(other.m_impl.m_value2)};
357 new(&m_impl.m_value3)
358 ossia::domain_base<float>{std::move(other.m_impl.m_value3)};
361 new(&m_impl.m_value5)
362 ossia::domain_base<std::string>{std::move(other.m_impl.m_value5)};
365 new(&m_impl.m_value6) ossia::vector_domain{std::move(other.m_impl.m_value6)};
368 new(&m_impl.m_value7) ossia::vecf_domain<2>{std::move(other.m_impl.m_value7)};
371 new(&m_impl.m_value8) ossia::vecf_domain<3>{std::move(other.m_impl.m_value8)};
374 new(&m_impl.m_value9) ossia::vecf_domain<4>{std::move(other.m_impl.m_value9)};
377 new(&m_impl.m_value10)
378 ossia::domain_base<ossia::value>{std::move(other.m_impl.m_value10)};
387inline const ossia::domain_base<ossia::impulse>* domain_base_variant::target()
const
390 return &m_impl.m_value0;
394inline const ossia::domain_base<bool>* domain_base_variant::target()
const
397 return &m_impl.m_value1;
401inline const ossia::domain_base<int32_t>* domain_base_variant::target()
const
404 return &m_impl.m_value2;
408inline const ossia::domain_base<float>* domain_base_variant::target()
const
411 return &m_impl.m_value3;
415inline const ossia::domain_base<std::string>* domain_base_variant::target()
const
418 return &m_impl.m_value5;
422inline const ossia::vector_domain* domain_base_variant::target()
const
425 return &m_impl.m_value6;
429inline const ossia::vecf_domain<2>* domain_base_variant::target()
const
432 return &m_impl.m_value7;
436inline const ossia::vecf_domain<3>* domain_base_variant::target()
const
439 return &m_impl.m_value8;
443inline const ossia::vecf_domain<4>* domain_base_variant::target()
const
446 return &m_impl.m_value9;
450inline const ossia::domain_base<ossia::value>* domain_base_variant::target()
const
453 return &m_impl.m_value10;
457inline ossia::domain_base<ossia::impulse>* domain_base_variant::target()
460 return &m_impl.m_value0;
464inline ossia::domain_base<bool>* domain_base_variant::target()
467 return &m_impl.m_value1;
471inline ossia::domain_base<int32_t>* domain_base_variant::target()
474 return &m_impl.m_value2;
478inline ossia::domain_base<float>* domain_base_variant::target()
481 return &m_impl.m_value3;
485inline ossia::domain_base<std::string>* domain_base_variant::target()
488 return &m_impl.m_value5;
492inline ossia::vector_domain* domain_base_variant::target()
495 return &m_impl.m_value6;
499inline ossia::vecf_domain<2>* domain_base_variant::target()
502 return &m_impl.m_value7;
506inline ossia::vecf_domain<3>* domain_base_variant::target()
509 return &m_impl.m_value8;
513inline ossia::vecf_domain<4>* domain_base_variant::target()
516 return &m_impl.m_value9;
520inline ossia::domain_base<ossia::value>* domain_base_variant::target()
523 return &m_impl.m_value10;
527inline const ossia::domain_base<ossia::impulse>& domain_base_variant::get()
const
530 return m_impl.m_value0;
531 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
534inline const ossia::domain_base<bool>& domain_base_variant::get()
const
537 return m_impl.m_value1;
538 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
541inline const ossia::domain_base<int32_t>& domain_base_variant::get()
const
544 return m_impl.m_value2;
545 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
548inline const ossia::domain_base<float>& domain_base_variant::get()
const
551 return m_impl.m_value3;
552 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
555inline const ossia::domain_base<std::string>& domain_base_variant::get()
const
558 return m_impl.m_value5;
559 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
562inline const ossia::vector_domain& domain_base_variant::get()
const
565 return m_impl.m_value6;
566 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
569inline const ossia::vecf_domain<2>& domain_base_variant::get()
const
572 return m_impl.m_value7;
573 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
576inline const ossia::vecf_domain<3>& domain_base_variant::get()
const
579 return m_impl.m_value8;
580 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
583inline const ossia::vecf_domain<4>& domain_base_variant::get()
const
586 return m_impl.m_value9;
587 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
590inline const ossia::domain_base<ossia::value>& domain_base_variant::get()
const
593 return m_impl.m_value10;
594 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
597inline ossia::domain_base<ossia::impulse>& domain_base_variant::get()
600 return m_impl.m_value0;
601 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
604inline ossia::domain_base<bool>& domain_base_variant::get()
607 return m_impl.m_value1;
608 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
611inline ossia::domain_base<int32_t>& domain_base_variant::get()
614 return m_impl.m_value2;
615 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
618inline ossia::domain_base<float>& domain_base_variant::get()
621 return m_impl.m_value3;
622 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
625inline ossia::domain_base<std::string>& domain_base_variant::get()
628 return m_impl.m_value5;
629 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
632inline ossia::vector_domain& domain_base_variant::get()
635 return m_impl.m_value6;
636 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
639inline ossia::vecf_domain<2>& domain_base_variant::get()
642 return m_impl.m_value7;
643 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
646inline ossia::vecf_domain<3>& domain_base_variant::get()
649 return m_impl.m_value8;
650 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
653inline ossia::vecf_domain<4>& domain_base_variant::get()
656 return m_impl.m_value9;
657 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
660inline ossia::domain_base<ossia::value>& domain_base_variant::get()
663 return m_impl.m_value10;
664 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
666template <
typename Visitor>
667auto apply_nonnull(Visitor&& functor,
const domain_base_variant& var)
671 case domain_base_variant::Type::Type0:
672 return functor(var.m_impl.m_value0);
673 case domain_base_variant::Type::Type1:
674 return functor(var.m_impl.m_value1);
675 case domain_base_variant::Type::Type2:
676 return functor(var.m_impl.m_value2);
677 case domain_base_variant::Type::Type3:
678 return functor(var.m_impl.m_value3);
679 case domain_base_variant::Type::Type5:
680 return functor(var.m_impl.m_value5);
681 case domain_base_variant::Type::Type6:
682 return functor(var.m_impl.m_value6);
683 case domain_base_variant::Type::Type7:
684 return functor(var.m_impl.m_value7);
685 case domain_base_variant::Type::Type8:
686 return functor(var.m_impl.m_value8);
687 case domain_base_variant::Type::Type9:
688 return functor(var.m_impl.m_value9);
689 case domain_base_variant::Type::Type10:
690 return functor(var.m_impl.m_value10);
692 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
695template <
typename Visitor>
696auto apply_nonnull(Visitor&& functor, domain_base_variant& var)
700 case domain_base_variant::Type::Type0:
701 return functor(var.m_impl.m_value0);
702 case domain_base_variant::Type::Type1:
703 return functor(var.m_impl.m_value1);
704 case domain_base_variant::Type::Type2:
705 return functor(var.m_impl.m_value2);
706 case domain_base_variant::Type::Type3:
707 return functor(var.m_impl.m_value3);
708 case domain_base_variant::Type::Type5:
709 return functor(var.m_impl.m_value5);
710 case domain_base_variant::Type::Type6:
711 return functor(var.m_impl.m_value6);
712 case domain_base_variant::Type::Type7:
713 return functor(var.m_impl.m_value7);
714 case domain_base_variant::Type::Type8:
715 return functor(var.m_impl.m_value8);
716 case domain_base_variant::Type::Type9:
717 return functor(var.m_impl.m_value9);
718 case domain_base_variant::Type::Type10:
719 return functor(var.m_impl.m_value10);
721 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
724template <
typename Visitor>
725auto apply_nonnull(Visitor&& functor, domain_base_variant&& var)
729 case domain_base_variant::Type::Type0:
730 return functor(std::move(var.m_impl.m_value0));
731 case domain_base_variant::Type::Type1:
732 return functor(std::move(var.m_impl.m_value1));
733 case domain_base_variant::Type::Type2:
734 return functor(std::move(var.m_impl.m_value2));
735 case domain_base_variant::Type::Type3:
736 return functor(std::move(var.m_impl.m_value3));
737 case domain_base_variant::Type::Type5:
738 return functor(std::move(var.m_impl.m_value5));
739 case domain_base_variant::Type::Type6:
740 return functor(std::move(var.m_impl.m_value6));
741 case domain_base_variant::Type::Type7:
742 return functor(std::move(var.m_impl.m_value7));
743 case domain_base_variant::Type::Type8:
744 return functor(std::move(var.m_impl.m_value8));
745 case domain_base_variant::Type::Type9:
746 return functor(std::move(var.m_impl.m_value9));
747 case domain_base_variant::Type::Type10:
748 return functor(std::move(var.m_impl.m_value10));
750 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
753template <
typename Visitor>
754auto apply(Visitor&& functor,
const domain_base_variant& var)
758 case domain_base_variant::Type::Type0:
759 return functor(var.m_impl.m_value0);
760 case domain_base_variant::Type::Type1:
761 return functor(var.m_impl.m_value1);
762 case domain_base_variant::Type::Type2:
763 return functor(var.m_impl.m_value2);
764 case domain_base_variant::Type::Type3:
765 return functor(var.m_impl.m_value3);
766 case domain_base_variant::Type::Type5:
767 return functor(var.m_impl.m_value5);
768 case domain_base_variant::Type::Type6:
769 return functor(var.m_impl.m_value6);
770 case domain_base_variant::Type::Type7:
771 return functor(var.m_impl.m_value7);
772 case domain_base_variant::Type::Type8:
773 return functor(var.m_impl.m_value8);
774 case domain_base_variant::Type::Type9:
775 return functor(var.m_impl.m_value9);
776 case domain_base_variant::Type::Type10:
777 return functor(var.m_impl.m_value10);
782template <
typename Visitor>
783auto apply(Visitor&& functor, domain_base_variant& var)
787 case domain_base_variant::Type::Type0:
788 return functor(var.m_impl.m_value0);
789 case domain_base_variant::Type::Type1:
790 return functor(var.m_impl.m_value1);
791 case domain_base_variant::Type::Type2:
792 return functor(var.m_impl.m_value2);
793 case domain_base_variant::Type::Type3:
794 return functor(var.m_impl.m_value3);
795 case domain_base_variant::Type::Type5:
796 return functor(var.m_impl.m_value5);
797 case domain_base_variant::Type::Type6:
798 return functor(var.m_impl.m_value6);
799 case domain_base_variant::Type::Type7:
800 return functor(var.m_impl.m_value7);
801 case domain_base_variant::Type::Type8:
802 return functor(var.m_impl.m_value8);
803 case domain_base_variant::Type::Type9:
804 return functor(var.m_impl.m_value9);
805 case domain_base_variant::Type::Type10:
806 return functor(var.m_impl.m_value10);
811template <
typename Visitor>
812auto apply(Visitor&& functor, domain_base_variant&& var)
816 case domain_base_variant::Type::Type0:
817 return functor(std::move(var.m_impl.m_value0));
818 case domain_base_variant::Type::Type1:
819 return functor(std::move(var.m_impl.m_value1));
820 case domain_base_variant::Type::Type2:
821 return functor(std::move(var.m_impl.m_value2));
822 case domain_base_variant::Type::Type3:
823 return functor(std::move(var.m_impl.m_value3));
824 case domain_base_variant::Type::Type5:
825 return functor(std::move(var.m_impl.m_value5));
826 case domain_base_variant::Type::Type6:
827 return functor(std::move(var.m_impl.m_value6));
828 case domain_base_variant::Type::Type7:
829 return functor(std::move(var.m_impl.m_value7));
830 case domain_base_variant::Type::Type8:
831 return functor(std::move(var.m_impl.m_value8));
832 case domain_base_variant::Type::Type9:
833 return functor(std::move(var.m_impl.m_value9));
834 case domain_base_variant::Type::Type10:
835 return functor(std::move(var.m_impl.m_value10));
840inline bool operator==(
const domain_base_variant& lhs,
const domain_base_variant& rhs)
842 if(lhs.m_type == rhs.m_type)
846 case domain_base_variant::Type::Type0:
847 return lhs.m_impl.m_value0 == rhs.m_impl.m_value0;
848 case domain_base_variant::Type::Type1:
849 return lhs.m_impl.m_value1 == rhs.m_impl.m_value1;
850 case domain_base_variant::Type::Type2:
851 return lhs.m_impl.m_value2 == rhs.m_impl.m_value2;
852 case domain_base_variant::Type::Type3:
853 return lhs.m_impl.m_value3 == rhs.m_impl.m_value3;
854 case domain_base_variant::Type::Type5:
855 return lhs.m_impl.m_value5 == rhs.m_impl.m_value5;
856 case domain_base_variant::Type::Type6:
857 return lhs.m_impl.m_value6 == rhs.m_impl.m_value6;
858 case domain_base_variant::Type::Type7:
859 return lhs.m_impl.m_value7 == rhs.m_impl.m_value7;
860 case domain_base_variant::Type::Type8:
861 return lhs.m_impl.m_value8 == rhs.m_impl.m_value8;
862 case domain_base_variant::Type::Type9:
863 return lhs.m_impl.m_value9 == rhs.m_impl.m_value9;
864 case domain_base_variant::Type::Type10:
865 return lhs.m_impl.m_value10 == rhs.m_impl.m_value10;
872inline bool operator!=(
const domain_base_variant& lhs,
const domain_base_variant& rhs)
874 if(lhs.m_type != rhs.m_type)
878 case domain_base_variant::Type::Type0:
879 return lhs.m_impl.m_value0 != rhs.m_impl.m_value0;
880 case domain_base_variant::Type::Type1:
881 return lhs.m_impl.m_value1 != rhs.m_impl.m_value1;
882 case domain_base_variant::Type::Type2:
883 return lhs.m_impl.m_value2 != rhs.m_impl.m_value2;
884 case domain_base_variant::Type::Type3:
885 return lhs.m_impl.m_value3 != rhs.m_impl.m_value3;
886 case domain_base_variant::Type::Type5:
887 return lhs.m_impl.m_value5 != rhs.m_impl.m_value5;
888 case domain_base_variant::Type::Type6:
889 return lhs.m_impl.m_value6 != rhs.m_impl.m_value6;
890 case domain_base_variant::Type::Type7:
891 return lhs.m_impl.m_value7 != rhs.m_impl.m_value7;
892 case domain_base_variant::Type::Type8:
893 return lhs.m_impl.m_value8 != rhs.m_impl.m_value8;
894 case domain_base_variant::Type::Type9:
895 return lhs.m_impl.m_value9 != rhs.m_impl.m_value9;
896 case domain_base_variant::Type::Type10:
897 return lhs.m_impl.m_value10 != rhs.m_impl.m_value10;
904operator==(
const domain_base_variant& lhs,
const ossia::domain_base<ossia::impulse>& rhs)
906 return (lhs.m_type == domain_base_variant::Type::Type0)
907 && (lhs.m_impl.m_value0 == rhs);
910operator==(
const ossia::domain_base<ossia::impulse>& lhs,
const domain_base_variant& rhs)
912 return (rhs.m_type == domain_base_variant::Type::Type0)
913 && (rhs.m_impl.m_value0 == lhs);
916operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<ossia::impulse>& rhs)
918 return (lhs.m_type != domain_base_variant::Type::Type0)
919 || (lhs.m_impl.m_value0 != rhs);
922operator!=(
const ossia::domain_base<ossia::impulse>& lhs,
const domain_base_variant& rhs)
924 return (rhs.m_type != domain_base_variant::Type::Type0)
925 || (rhs.m_impl.m_value0 != lhs);
928operator==(
const domain_base_variant& lhs,
const ossia::domain_base<bool>& rhs)
930 return (lhs.m_type == domain_base_variant::Type::Type1)
931 && (lhs.m_impl.m_value1 == rhs);
934operator==(
const ossia::domain_base<bool>& lhs,
const domain_base_variant& rhs)
936 return (rhs.m_type == domain_base_variant::Type::Type1)
937 && (rhs.m_impl.m_value1 == lhs);
940operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<bool>& rhs)
942 return (lhs.m_type != domain_base_variant::Type::Type1)
943 || (lhs.m_impl.m_value1 != rhs);
946operator!=(
const ossia::domain_base<bool>& lhs,
const domain_base_variant& rhs)
948 return (rhs.m_type != domain_base_variant::Type::Type1)
949 || (rhs.m_impl.m_value1 != lhs);
952operator==(
const domain_base_variant& lhs,
const ossia::domain_base<int32_t>& rhs)
954 return (lhs.m_type == domain_base_variant::Type::Type2)
955 && (lhs.m_impl.m_value2 == rhs);
958operator==(
const ossia::domain_base<int32_t>& lhs,
const domain_base_variant& rhs)
960 return (rhs.m_type == domain_base_variant::Type::Type2)
961 && (rhs.m_impl.m_value2 == lhs);
964operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<int32_t>& rhs)
966 return (lhs.m_type != domain_base_variant::Type::Type2)
967 || (lhs.m_impl.m_value2 != rhs);
970operator!=(
const ossia::domain_base<int32_t>& lhs,
const domain_base_variant& rhs)
972 return (rhs.m_type != domain_base_variant::Type::Type2)
973 || (rhs.m_impl.m_value2 != lhs);
976operator==(
const domain_base_variant& lhs,
const ossia::domain_base<float>& rhs)
978 return (lhs.m_type == domain_base_variant::Type::Type3)
979 && (lhs.m_impl.m_value3 == rhs);
982operator==(
const ossia::domain_base<float>& lhs,
const domain_base_variant& rhs)
984 return (rhs.m_type == domain_base_variant::Type::Type3)
985 && (rhs.m_impl.m_value3 == lhs);
988operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<float>& rhs)
990 return (lhs.m_type != domain_base_variant::Type::Type3)
991 || (lhs.m_impl.m_value3 != rhs);
994operator!=(
const ossia::domain_base<float>& lhs,
const domain_base_variant& rhs)
996 return (rhs.m_type != domain_base_variant::Type::Type3)
997 || (rhs.m_impl.m_value3 != lhs);
1000operator==(
const domain_base_variant& lhs,
const ossia::domain_base<std::string>& rhs)
1002 return (lhs.m_type == domain_base_variant::Type::Type5)
1003 && (lhs.m_impl.m_value5 == rhs);
1006operator==(
const ossia::domain_base<std::string>& lhs,
const domain_base_variant& rhs)
1008 return (rhs.m_type == domain_base_variant::Type::Type5)
1009 && (rhs.m_impl.m_value5 == lhs);
1012operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<std::string>& rhs)
1014 return (lhs.m_type != domain_base_variant::Type::Type5)
1015 || (lhs.m_impl.m_value5 != rhs);
1018operator!=(
const ossia::domain_base<std::string>& lhs,
const domain_base_variant& rhs)
1020 return (rhs.m_type != domain_base_variant::Type::Type5)
1021 || (rhs.m_impl.m_value5 != lhs);
1023inline bool operator==(
const domain_base_variant& lhs,
const ossia::vector_domain& rhs)
1025 return (lhs.m_type == domain_base_variant::Type::Type6)
1026 && (lhs.m_impl.m_value6 == rhs);
1028inline bool operator==(
const ossia::vector_domain& lhs,
const domain_base_variant& rhs)
1030 return (rhs.m_type == domain_base_variant::Type::Type6)
1031 && (rhs.m_impl.m_value6 == lhs);
1033inline bool operator!=(
const domain_base_variant& lhs,
const ossia::vector_domain& rhs)
1035 return (lhs.m_type != domain_base_variant::Type::Type6)
1036 || (lhs.m_impl.m_value6 != rhs);
1038inline bool operator!=(
const ossia::vector_domain& lhs,
const domain_base_variant& rhs)
1040 return (rhs.m_type != domain_base_variant::Type::Type6)
1041 || (rhs.m_impl.m_value6 != lhs);
1043inline bool operator==(
const domain_base_variant& lhs,
const ossia::vecf_domain<2>& rhs)
1045 return (lhs.m_type == domain_base_variant::Type::Type7)
1046 && (lhs.m_impl.m_value7 == rhs);
1048inline bool operator==(
const ossia::vecf_domain<2>& lhs,
const domain_base_variant& rhs)
1050 return (rhs.m_type == domain_base_variant::Type::Type7)
1051 && (rhs.m_impl.m_value7 == lhs);
1053inline bool operator!=(
const domain_base_variant& lhs,
const ossia::vecf_domain<2>& rhs)
1055 return (lhs.m_type != domain_base_variant::Type::Type7)
1056 || (lhs.m_impl.m_value7 != rhs);
1058inline bool operator!=(
const ossia::vecf_domain<2>& lhs,
const domain_base_variant& rhs)
1060 return (rhs.m_type != domain_base_variant::Type::Type7)
1061 || (rhs.m_impl.m_value7 != lhs);
1063inline bool operator==(
const domain_base_variant& lhs,
const ossia::vecf_domain<3>& rhs)
1065 return (lhs.m_type == domain_base_variant::Type::Type8)
1066 && (lhs.m_impl.m_value8 == rhs);
1068inline bool operator==(
const ossia::vecf_domain<3>& lhs,
const domain_base_variant& rhs)
1070 return (rhs.m_type == domain_base_variant::Type::Type8)
1071 && (rhs.m_impl.m_value8 == lhs);
1073inline bool operator!=(
const domain_base_variant& lhs,
const ossia::vecf_domain<3>& rhs)
1075 return (lhs.m_type != domain_base_variant::Type::Type8)
1076 || (lhs.m_impl.m_value8 != rhs);
1078inline bool operator!=(
const ossia::vecf_domain<3>& lhs,
const domain_base_variant& rhs)
1080 return (rhs.m_type != domain_base_variant::Type::Type8)
1081 || (rhs.m_impl.m_value8 != lhs);
1083inline bool operator==(
const domain_base_variant& lhs,
const ossia::vecf_domain<4>& rhs)
1085 return (lhs.m_type == domain_base_variant::Type::Type9)
1086 && (lhs.m_impl.m_value9 == rhs);
1088inline bool operator==(
const ossia::vecf_domain<4>& lhs,
const domain_base_variant& rhs)
1090 return (rhs.m_type == domain_base_variant::Type::Type9)
1091 && (rhs.m_impl.m_value9 == lhs);
1093inline bool operator!=(
const domain_base_variant& lhs,
const ossia::vecf_domain<4>& rhs)
1095 return (lhs.m_type != domain_base_variant::Type::Type9)
1096 || (lhs.m_impl.m_value9 != rhs);
1098inline bool operator!=(
const ossia::vecf_domain<4>& lhs,
const domain_base_variant& rhs)
1100 return (rhs.m_type != domain_base_variant::Type::Type9)
1101 || (rhs.m_impl.m_value9 != lhs);
1104operator==(
const domain_base_variant& lhs,
const ossia::domain_base<ossia::value>& rhs)
1106 return (lhs.m_type == domain_base_variant::Type::Type10)
1107 && (lhs.m_impl.m_value10 == rhs);
1110operator==(
const ossia::domain_base<ossia::value>& lhs,
const domain_base_variant& rhs)
1112 return (rhs.m_type == domain_base_variant::Type::Type10)
1113 && (rhs.m_impl.m_value10 == lhs);
1116operator!=(
const domain_base_variant& lhs,
const ossia::domain_base<ossia::value>& rhs)
1118 return (lhs.m_type != domain_base_variant::Type::Type10)
1119 || (lhs.m_impl.m_value10 != rhs);
1122operator!=(
const ossia::domain_base<ossia::value>& lhs,
const domain_base_variant& rhs)
1124 return (rhs.m_type != domain_base_variant::Type::Type10)
1125 || (rhs.m_impl.m_value10 != lhs);
1127template <
typename Functor>
1128auto apply(Functor&& functor, domain_base_variant& arg0,
const value_variant_type& arg1)
1132 case domain_base_variant::Type::Type0: {
1135 case value_variant_type::Type::Type0: {
1136 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1138 case value_variant_type::Type::Type1: {
1139 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1141 case value_variant_type::Type::Type2: {
1142 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1144 case value_variant_type::Type::Type3: {
1145 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
1147 case value_variant_type::Type::Type4: {
1148 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value4);
1150 case value_variant_type::Type::Type5: {
1151 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
1153 case value_variant_type::Type::Type6: {
1154 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
1156 case value_variant_type::Type::Type7: {
1157 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
1159 case value_variant_type::Type::Type8: {
1160 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
1162 case value_variant_type::Type::Type9: {
1163 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
1166 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1169 case domain_base_variant::Type::Type1: {
1172 case value_variant_type::Type::Type0: {
1173 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1175 case value_variant_type::Type::Type1: {
1176 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1178 case value_variant_type::Type::Type2: {
1179 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1181 case value_variant_type::Type::Type3: {
1182 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
1184 case value_variant_type::Type::Type4: {
1185 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value4);
1187 case value_variant_type::Type::Type5: {
1188 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
1190 case value_variant_type::Type::Type6: {
1191 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
1193 case value_variant_type::Type::Type7: {
1194 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
1196 case value_variant_type::Type::Type8: {
1197 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
1199 case value_variant_type::Type::Type9: {
1200 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
1203 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1206 case domain_base_variant::Type::Type2: {
1209 case value_variant_type::Type::Type0: {
1210 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1212 case value_variant_type::Type::Type1: {
1213 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1215 case value_variant_type::Type::Type2: {
1216 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1218 case value_variant_type::Type::Type3: {
1219 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
1221 case value_variant_type::Type::Type4: {
1222 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value4);
1224 case value_variant_type::Type::Type5: {
1225 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
1227 case value_variant_type::Type::Type6: {
1228 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
1230 case value_variant_type::Type::Type7: {
1231 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
1233 case value_variant_type::Type::Type8: {
1234 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
1236 case value_variant_type::Type::Type9: {
1237 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
1240 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1243 case domain_base_variant::Type::Type3: {
1246 case value_variant_type::Type::Type0: {
1247 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1249 case value_variant_type::Type::Type1: {
1250 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1252 case value_variant_type::Type::Type2: {
1253 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1255 case value_variant_type::Type::Type3: {
1256 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
1258 case value_variant_type::Type::Type4: {
1259 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value4);
1261 case value_variant_type::Type::Type5: {
1262 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
1264 case value_variant_type::Type::Type6: {
1265 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
1267 case value_variant_type::Type::Type7: {
1268 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
1270 case value_variant_type::Type::Type8: {
1271 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
1273 case value_variant_type::Type::Type9: {
1274 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
1277 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1280 case domain_base_variant::Type::Type5: {
1283 case value_variant_type::Type::Type0: {
1284 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
1286 case value_variant_type::Type::Type1: {
1287 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
1289 case value_variant_type::Type::Type2: {
1290 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
1292 case value_variant_type::Type::Type3: {
1293 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
1295 case value_variant_type::Type::Type4: {
1296 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value4);
1298 case value_variant_type::Type::Type5: {
1299 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
1301 case value_variant_type::Type::Type6: {
1302 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
1304 case value_variant_type::Type::Type7: {
1305 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
1307 case value_variant_type::Type::Type8: {
1308 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
1310 case value_variant_type::Type::Type9: {
1311 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
1314 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1317 case domain_base_variant::Type::Type6: {
1320 case value_variant_type::Type::Type0: {
1321 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1323 case value_variant_type::Type::Type1: {
1324 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1326 case value_variant_type::Type::Type2: {
1327 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1329 case value_variant_type::Type::Type3: {
1330 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
1332 case value_variant_type::Type::Type4: {
1333 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value4);
1335 case value_variant_type::Type::Type5: {
1336 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
1338 case value_variant_type::Type::Type6: {
1339 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
1341 case value_variant_type::Type::Type7: {
1342 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
1344 case value_variant_type::Type::Type8: {
1345 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
1347 case value_variant_type::Type::Type9: {
1348 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
1351 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1354 case domain_base_variant::Type::Type7: {
1357 case value_variant_type::Type::Type0: {
1358 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1360 case value_variant_type::Type::Type1: {
1361 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1363 case value_variant_type::Type::Type2: {
1364 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1366 case value_variant_type::Type::Type3: {
1367 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
1369 case value_variant_type::Type::Type4: {
1370 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value4);
1372 case value_variant_type::Type::Type5: {
1373 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
1375 case value_variant_type::Type::Type6: {
1376 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
1378 case value_variant_type::Type::Type7: {
1379 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
1381 case value_variant_type::Type::Type8: {
1382 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
1384 case value_variant_type::Type::Type9: {
1385 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
1388 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1391 case domain_base_variant::Type::Type8: {
1394 case value_variant_type::Type::Type0: {
1395 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1397 case value_variant_type::Type::Type1: {
1398 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1400 case value_variant_type::Type::Type2: {
1401 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1403 case value_variant_type::Type::Type3: {
1404 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
1406 case value_variant_type::Type::Type4: {
1407 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value4);
1409 case value_variant_type::Type::Type5: {
1410 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
1412 case value_variant_type::Type::Type6: {
1413 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
1415 case value_variant_type::Type::Type7: {
1416 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
1418 case value_variant_type::Type::Type8: {
1419 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
1421 case value_variant_type::Type::Type9: {
1422 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
1425 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1428 case domain_base_variant::Type::Type9: {
1431 case value_variant_type::Type::Type0: {
1432 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
1434 case value_variant_type::Type::Type1: {
1435 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
1437 case value_variant_type::Type::Type2: {
1438 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
1440 case value_variant_type::Type::Type3: {
1441 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
1443 case value_variant_type::Type::Type4: {
1444 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value4);
1446 case value_variant_type::Type::Type5: {
1447 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
1449 case value_variant_type::Type::Type6: {
1450 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
1452 case value_variant_type::Type::Type7: {
1453 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
1455 case value_variant_type::Type::Type8: {
1456 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
1458 case value_variant_type::Type::Type9: {
1459 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value9);
1462 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1465 case domain_base_variant::Type::Type10: {
1468 case value_variant_type::Type::Type0: {
1469 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value0);
1471 case value_variant_type::Type::Type1: {
1472 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value1);
1474 case value_variant_type::Type::Type2: {
1475 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value2);
1477 case value_variant_type::Type::Type3: {
1478 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value3);
1480 case value_variant_type::Type::Type4: {
1481 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value4);
1483 case value_variant_type::Type::Type5: {
1484 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value5);
1486 case value_variant_type::Type::Type6: {
1487 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value6);
1489 case value_variant_type::Type::Type7: {
1490 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value7);
1492 case value_variant_type::Type::Type8: {
1493 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value8);
1495 case value_variant_type::Type::Type9: {
1496 return functor(arg0.m_impl.m_value10, arg1.m_impl.m_value9);
1499 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1503 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1506template <
typename Functor>
1508 Functor&& functor,
const value_variant_type& arg0,
const domain_base_variant& arg1)
1512 case value_variant_type::Type::Type0: {
1515 case domain_base_variant::Type::Type0: {
1516 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value0);
1518 case domain_base_variant::Type::Type1: {
1519 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value1);
1521 case domain_base_variant::Type::Type2: {
1522 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value2);
1524 case domain_base_variant::Type::Type3: {
1525 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value3);
1527 case domain_base_variant::Type::Type5: {
1528 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value5);
1530 case domain_base_variant::Type::Type6: {
1531 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value6);
1533 case domain_base_variant::Type::Type7: {
1534 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value7);
1536 case domain_base_variant::Type::Type8: {
1537 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value8);
1539 case domain_base_variant::Type::Type9: {
1540 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value9);
1542 case domain_base_variant::Type::Type10: {
1543 return functor(arg0.m_impl.m_value0, arg1.m_impl.m_value10);
1546 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1549 case value_variant_type::Type::Type1: {
1552 case domain_base_variant::Type::Type0: {
1553 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value0);
1555 case domain_base_variant::Type::Type1: {
1556 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value1);
1558 case domain_base_variant::Type::Type2: {
1559 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value2);
1561 case domain_base_variant::Type::Type3: {
1562 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value3);
1564 case domain_base_variant::Type::Type5: {
1565 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value5);
1567 case domain_base_variant::Type::Type6: {
1568 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value6);
1570 case domain_base_variant::Type::Type7: {
1571 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value7);
1573 case domain_base_variant::Type::Type8: {
1574 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value8);
1576 case domain_base_variant::Type::Type9: {
1577 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value9);
1579 case domain_base_variant::Type::Type10: {
1580 return functor(arg0.m_impl.m_value1, arg1.m_impl.m_value10);
1583 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1586 case value_variant_type::Type::Type2: {
1589 case domain_base_variant::Type::Type0: {
1590 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value0);
1592 case domain_base_variant::Type::Type1: {
1593 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value1);
1595 case domain_base_variant::Type::Type2: {
1596 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value2);
1598 case domain_base_variant::Type::Type3: {
1599 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value3);
1601 case domain_base_variant::Type::Type5: {
1602 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value5);
1604 case domain_base_variant::Type::Type6: {
1605 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value6);
1607 case domain_base_variant::Type::Type7: {
1608 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value7);
1610 case domain_base_variant::Type::Type8: {
1611 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value8);
1613 case domain_base_variant::Type::Type9: {
1614 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value9);
1616 case domain_base_variant::Type::Type10: {
1617 return functor(arg0.m_impl.m_value2, arg1.m_impl.m_value10);
1620 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1623 case value_variant_type::Type::Type3: {
1626 case domain_base_variant::Type::Type0: {
1627 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value0);
1629 case domain_base_variant::Type::Type1: {
1630 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value1);
1632 case domain_base_variant::Type::Type2: {
1633 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value2);
1635 case domain_base_variant::Type::Type3: {
1636 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value3);
1638 case domain_base_variant::Type::Type5: {
1639 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value5);
1641 case domain_base_variant::Type::Type6: {
1642 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value6);
1644 case domain_base_variant::Type::Type7: {
1645 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value7);
1647 case domain_base_variant::Type::Type8: {
1648 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value8);
1650 case domain_base_variant::Type::Type9: {
1651 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value9);
1653 case domain_base_variant::Type::Type10: {
1654 return functor(arg0.m_impl.m_value3, arg1.m_impl.m_value10);
1657 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1660 case value_variant_type::Type::Type4: {
1663 case domain_base_variant::Type::Type0: {
1664 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value0);
1666 case domain_base_variant::Type::Type1: {
1667 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value1);
1669 case domain_base_variant::Type::Type2: {
1670 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value2);
1672 case domain_base_variant::Type::Type3: {
1673 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value3);
1675 case domain_base_variant::Type::Type5: {
1676 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value5);
1678 case domain_base_variant::Type::Type6: {
1679 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value6);
1681 case domain_base_variant::Type::Type7: {
1682 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value7);
1684 case domain_base_variant::Type::Type8: {
1685 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value8);
1687 case domain_base_variant::Type::Type9: {
1688 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value9);
1690 case domain_base_variant::Type::Type10: {
1691 return functor(arg0.m_impl.m_value4, arg1.m_impl.m_value10);
1694 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1697 case value_variant_type::Type::Type5: {
1700 case domain_base_variant::Type::Type0: {
1701 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value0);
1703 case domain_base_variant::Type::Type1: {
1704 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value1);
1706 case domain_base_variant::Type::Type2: {
1707 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value2);
1709 case domain_base_variant::Type::Type3: {
1710 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value3);
1712 case domain_base_variant::Type::Type5: {
1713 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value5);
1715 case domain_base_variant::Type::Type6: {
1716 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value6);
1718 case domain_base_variant::Type::Type7: {
1719 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value7);
1721 case domain_base_variant::Type::Type8: {
1722 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value8);
1724 case domain_base_variant::Type::Type9: {
1725 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value9);
1727 case domain_base_variant::Type::Type10: {
1728 return functor(arg0.m_impl.m_value5, arg1.m_impl.m_value10);
1731 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1734 case value_variant_type::Type::Type6: {
1737 case domain_base_variant::Type::Type0: {
1738 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value0);
1740 case domain_base_variant::Type::Type1: {
1741 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value1);
1743 case domain_base_variant::Type::Type2: {
1744 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value2);
1746 case domain_base_variant::Type::Type3: {
1747 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value3);
1749 case domain_base_variant::Type::Type5: {
1750 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value5);
1752 case domain_base_variant::Type::Type6: {
1753 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value6);
1755 case domain_base_variant::Type::Type7: {
1756 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value7);
1758 case domain_base_variant::Type::Type8: {
1759 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value8);
1761 case domain_base_variant::Type::Type9: {
1762 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value9);
1764 case domain_base_variant::Type::Type10: {
1765 return functor(arg0.m_impl.m_value6, arg1.m_impl.m_value10);
1768 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1771 case value_variant_type::Type::Type7: {
1774 case domain_base_variant::Type::Type0: {
1775 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value0);
1777 case domain_base_variant::Type::Type1: {
1778 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value1);
1780 case domain_base_variant::Type::Type2: {
1781 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value2);
1783 case domain_base_variant::Type::Type3: {
1784 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value3);
1786 case domain_base_variant::Type::Type5: {
1787 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value5);
1789 case domain_base_variant::Type::Type6: {
1790 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value6);
1792 case domain_base_variant::Type::Type7: {
1793 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value7);
1795 case domain_base_variant::Type::Type8: {
1796 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value8);
1798 case domain_base_variant::Type::Type9: {
1799 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value9);
1801 case domain_base_variant::Type::Type10: {
1802 return functor(arg0.m_impl.m_value7, arg1.m_impl.m_value10);
1805 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1808 case value_variant_type::Type::Type8: {
1811 case domain_base_variant::Type::Type0: {
1812 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value0);
1814 case domain_base_variant::Type::Type1: {
1815 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value1);
1817 case domain_base_variant::Type::Type2: {
1818 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value2);
1820 case domain_base_variant::Type::Type3: {
1821 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value3);
1823 case domain_base_variant::Type::Type5: {
1824 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value5);
1826 case domain_base_variant::Type::Type6: {
1827 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value6);
1829 case domain_base_variant::Type::Type7: {
1830 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value7);
1832 case domain_base_variant::Type::Type8: {
1833 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value8);
1835 case domain_base_variant::Type::Type9: {
1836 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value9);
1838 case domain_base_variant::Type::Type10: {
1839 return functor(arg0.m_impl.m_value8, arg1.m_impl.m_value10);
1842 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1845 case value_variant_type::Type::Type9: {
1848 case domain_base_variant::Type::Type0: {
1849 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value0);
1851 case domain_base_variant::Type::Type1: {
1852 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value1);
1854 case domain_base_variant::Type::Type2: {
1855 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value2);
1857 case domain_base_variant::Type::Type3: {
1858 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value3);
1860 case domain_base_variant::Type::Type5: {
1861 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value5);
1863 case domain_base_variant::Type::Type6: {
1864 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value6);
1866 case domain_base_variant::Type::Type7: {
1867 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value7);
1869 case domain_base_variant::Type::Type8: {
1870 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value8);
1872 case domain_base_variant::Type::Type9: {
1873 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value9);
1875 case domain_base_variant::Type::Type10: {
1876 return functor(arg0.m_impl.m_value9, arg1.m_impl.m_value10);
1879 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
1883 ossia_do_throw(std::runtime_error,
"domain_variant_impl: bad type");
val_type matching_type(const unit_t &u)
underlying_type Get the implementation type of an unit
Definition dataspace_visitors.cpp:198