aas-core3 1.0.1
Manipulate, verify and de/serialize asset administration shells in C++.
Loading...
Searching...
No Matches
enhancing.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2023 aas-core3.0-cpp AUTHORS
2//
3// SPDX-License-Identifier: MIT
4
5#ifndef AAS_CORE_AAS_3_0_ENHANCING_GUARD_
6#define AAS_CORE_AAS_3_0_ENHANCING_GUARD_
7
8// This code has been automatically generated by aas-core-codegen.
9// Do NOT edit or append.
10
14
15#pragma warning(push, 0)
16#include <sstream>
17#include <stdexcept>
18#pragma warning(pop)
19
20namespace aas_core {
21namespace aas_3_0 {
22
27namespace enhancing {
28
29// region Forward declarations
30
31template <typename E>
32std::shared_ptr<
34> Wrap(
35 const std::shared_ptr<
37 >& that,
38 const std::function<
39 std::shared_ptr<E>(
40 const std::shared_ptr<types::IClass>&
41 )
42 >& factory
43);
44
45template <typename E>
46std::shared_ptr<
48> Wrap(
49 const std::shared_ptr<
51 >& that,
52 const std::function<
53 std::shared_ptr<E>(
54 const std::shared_ptr<types::IClass>&
55 )
56 >& factory
57);
58
59template <typename E>
60std::shared_ptr<
62> Wrap(
63 const std::shared_ptr<
65 >& that,
66 const std::function<
67 std::shared_ptr<E>(
68 const std::shared_ptr<types::IClass>&
69 )
70 >& factory
71);
72
73template <typename E>
74std::shared_ptr<
76> Wrap(
77 const std::shared_ptr<
79 >& that,
80 const std::function<
81 std::shared_ptr<E>(
82 const std::shared_ptr<types::IClass>&
83 )
84 >& factory
85);
86
87template <typename E>
88std::shared_ptr<
90> Wrap(
91 const std::shared_ptr<
93 >& that,
94 const std::function<
95 std::shared_ptr<E>(
96 const std::shared_ptr<types::IClass>&
97 )
98 >& factory
99);
100
101template <typename E>
102std::shared_ptr<
104> Wrap(
105 const std::shared_ptr<
107 >& that,
108 const std::function<
109 std::shared_ptr<E>(
110 const std::shared_ptr<types::IClass>&
111 )
112 >& factory
113);
114
115template <typename E>
116std::shared_ptr<
118> Wrap(
119 const std::shared_ptr<
121 >& that,
122 const std::function<
123 std::shared_ptr<E>(
124 const std::shared_ptr<types::IClass>&
125 )
126 >& factory
127);
128
129template <typename E>
130std::shared_ptr<
132> Wrap(
133 const std::shared_ptr<
135 >& that,
136 const std::function<
137 std::shared_ptr<E>(
138 const std::shared_ptr<types::IClass>&
139 )
140 >& factory
141);
142
143template <typename E>
144std::shared_ptr<
146> Wrap(
147 const std::shared_ptr<
149 >& that,
150 const std::function<
151 std::shared_ptr<E>(
152 const std::shared_ptr<types::IClass>&
153 )
154 >& factory
155);
156
157template <typename E>
158std::shared_ptr<
160> Wrap(
161 const std::shared_ptr<
163 >& that,
164 const std::function<
165 std::shared_ptr<E>(
166 const std::shared_ptr<types::IClass>&
167 )
168 >& factory
169);
170
171template <typename E>
172std::shared_ptr<
174> Wrap(
175 const std::shared_ptr<
177 >& that,
178 const std::function<
179 std::shared_ptr<E>(
180 const std::shared_ptr<types::IClass>&
181 )
182 >& factory
183);
184
185template <typename E>
186std::shared_ptr<
188> Wrap(
189 const std::shared_ptr<
191 >& that,
192 const std::function<
193 std::shared_ptr<E>(
194 const std::shared_ptr<types::IClass>&
195 )
196 >& factory
197);
198
199template <typename E>
200std::shared_ptr<
202> Wrap(
203 const std::shared_ptr<
205 >& that,
206 const std::function<
207 std::shared_ptr<E>(
208 const std::shared_ptr<types::IClass>&
209 )
210 >& factory
211);
212
213template <typename E>
214std::shared_ptr<
216> Wrap(
217 const std::shared_ptr<
219 >& that,
220 const std::function<
221 std::shared_ptr<E>(
222 const std::shared_ptr<types::IClass>&
223 )
224 >& factory
225);
226
227template <typename E>
228std::shared_ptr<
230> Wrap(
231 const std::shared_ptr<
233 >& that,
234 const std::function<
235 std::shared_ptr<E>(
236 const std::shared_ptr<types::IClass>&
237 )
238 >& factory
239);
240
241template <typename E>
242std::shared_ptr<
244> Wrap(
245 const std::shared_ptr<
247 >& that,
248 const std::function<
249 std::shared_ptr<E>(
250 const std::shared_ptr<types::IClass>&
251 )
252 >& factory
253);
254
255template <typename E>
256std::shared_ptr<
258> Wrap(
259 const std::shared_ptr<
261 >& that,
262 const std::function<
263 std::shared_ptr<E>(
264 const std::shared_ptr<types::IClass>&
265 )
266 >& factory
267);
268
269template <typename E>
270std::shared_ptr<
272> Wrap(
273 const std::shared_ptr<
275 >& that,
276 const std::function<
277 std::shared_ptr<E>(
278 const std::shared_ptr<types::IClass>&
279 )
280 >& factory
281);
282
283template <typename E>
284std::shared_ptr<
286> Wrap(
287 const std::shared_ptr<
289 >& that,
290 const std::function<
291 std::shared_ptr<E>(
292 const std::shared_ptr<types::IClass>&
293 )
294 >& factory
295);
296
297template <typename E>
298std::shared_ptr<
300> Wrap(
301 const std::shared_ptr<
303 >& that,
304 const std::function<
305 std::shared_ptr<E>(
306 const std::shared_ptr<types::IClass>&
307 )
308 >& factory
309);
310
311template <typename E>
312std::shared_ptr<
314> Wrap(
315 const std::shared_ptr<
317 >& that,
318 const std::function<
319 std::shared_ptr<E>(
320 const std::shared_ptr<types::IClass>&
321 )
322 >& factory
323);
324
325template <typename E>
326std::shared_ptr<
328> Wrap(
329 const std::shared_ptr<
331 >& that,
332 const std::function<
333 std::shared_ptr<E>(
334 const std::shared_ptr<types::IClass>&
335 )
336 >& factory
337);
338
339template <typename E>
340std::shared_ptr<
342> Wrap(
343 const std::shared_ptr<
345 >& that,
346 const std::function<
347 std::shared_ptr<E>(
348 const std::shared_ptr<types::IClass>&
349 )
350 >& factory
351);
352
353template <typename E>
354std::shared_ptr<
356> Wrap(
357 const std::shared_ptr<
359 >& that,
360 const std::function<
361 std::shared_ptr<E>(
362 const std::shared_ptr<types::IClass>&
363 )
364 >& factory
365);
366
367template <typename E>
368std::shared_ptr<
370> Wrap(
371 const std::shared_ptr<
373 >& that,
374 const std::function<
375 std::shared_ptr<E>(
376 const std::shared_ptr<types::IClass>&
377 )
378 >& factory
379);
380
381template <typename E>
382std::shared_ptr<
384> Wrap(
385 const std::shared_ptr<
387 >& that,
388 const std::function<
389 std::shared_ptr<E>(
390 const std::shared_ptr<types::IClass>&
391 )
392 >& factory
393);
394
395template <typename E>
396std::shared_ptr<
398> Wrap(
399 const std::shared_ptr<
401 >& that,
402 const std::function<
403 std::shared_ptr<E>(
404 const std::shared_ptr<types::IClass>&
405 )
406 >& factory
407);
408
409template <typename E>
410std::shared_ptr<
412> Wrap(
413 const std::shared_ptr<
415 >& that,
416 const std::function<
417 std::shared_ptr<E>(
418 const std::shared_ptr<types::IClass>&
419 )
420 >& factory
421);
422
423template <typename E>
424std::shared_ptr<
426> Wrap(
427 const std::shared_ptr<
429 >& that,
430 const std::function<
431 std::shared_ptr<E>(
432 const std::shared_ptr<types::IClass>&
433 )
434 >& factory
435);
436
437template <typename E>
438std::shared_ptr<
440> Wrap(
441 const std::shared_ptr<
443 >& that,
444 const std::function<
445 std::shared_ptr<E>(
446 const std::shared_ptr<types::IClass>&
447 )
448 >& factory
449);
450
451template <typename E>
452std::shared_ptr<
454> Wrap(
455 const std::shared_ptr<
457 >& that,
458 const std::function<
459 std::shared_ptr<E>(
460 const std::shared_ptr<types::IClass>&
461 )
462 >& factory
463);
464
465template <typename E>
466std::shared_ptr<
468> Wrap(
469 const std::shared_ptr<
471 >& that,
472 const std::function<
473 std::shared_ptr<E>(
474 const std::shared_ptr<types::IClass>&
475 )
476 >& factory
477);
478
479template <typename E>
480std::shared_ptr<
482> Wrap(
483 const std::shared_ptr<
485 >& that,
486 const std::function<
487 std::shared_ptr<E>(
488 const std::shared_ptr<types::IClass>&
489 )
490 >& factory
491);
492
493template <typename E>
494std::shared_ptr<
496> Wrap(
497 const std::shared_ptr<
499 >& that,
500 const std::function<
501 std::shared_ptr<E>(
502 const std::shared_ptr<types::IClass>&
503 )
504 >& factory
505);
506
507template <typename E>
508std::shared_ptr<
510> Wrap(
511 const std::shared_ptr<
513 >& that,
514 const std::function<
515 std::shared_ptr<E>(
516 const std::shared_ptr<types::IClass>&
517 )
518 >& factory
519);
520
521template <typename E>
522std::shared_ptr<
524> Wrap(
525 const std::shared_ptr<
527 >& that,
528 const std::function<
529 std::shared_ptr<E>(
530 const std::shared_ptr<types::IClass>&
531 )
532 >& factory
533);
534
535template <typename E>
536std::shared_ptr<
538> Wrap(
539 const std::shared_ptr<
541 >& that,
542 const std::function<
543 std::shared_ptr<E>(
544 const std::shared_ptr<types::IClass>&
545 )
546 >& factory
547);
548
549template <typename E>
550std::shared_ptr<
552> Wrap(
553 const std::shared_ptr<
555 >& that,
556 const std::function<
557 std::shared_ptr<E>(
558 const std::shared_ptr<types::IClass>&
559 )
560 >& factory
561);
562
563template <typename E>
564std::shared_ptr<
566> Wrap(
567 const std::shared_ptr<
569 >& that,
570 const std::function<
571 std::shared_ptr<E>(
572 const std::shared_ptr<types::IClass>&
573 )
574 >& factory
575);
576
577template <typename E>
578std::shared_ptr<
580> Wrap(
581 const std::shared_ptr<
583 >& that,
584 const std::function<
585 std::shared_ptr<E>(
586 const std::shared_ptr<types::IClass>&
587 )
588 >& factory
589);
590
591template <typename E>
592std::shared_ptr<
594> Wrap(
595 const std::shared_ptr<
597 >& that,
598 const std::function<
599 std::shared_ptr<E>(
600 const std::shared_ptr<types::IClass>&
601 )
602 >& factory
603);
604
605template <typename E>
606std::shared_ptr<
608> Wrap(
609 const std::shared_ptr<
611 >& that,
612 const std::function<
613 std::shared_ptr<E>(
614 const std::shared_ptr<types::IClass>&
615 )
616 >& factory
617);
618
619template <typename E>
620std::shared_ptr<
622> Wrap(
623 const std::shared_ptr<
625 >& that,
626 const std::function<
627 std::shared_ptr<E>(
628 const std::shared_ptr<types::IClass>&
629 )
630 >& factory
631);
632
633template <typename E>
634std::shared_ptr<
636> Wrap(
637 const std::shared_ptr<
639 >& that,
640 const std::function<
641 std::shared_ptr<E>(
642 const std::shared_ptr<types::IClass>&
643 )
644 >& factory
645);
646
647template <typename E>
648std::shared_ptr<
650> Wrap(
651 const std::shared_ptr<
653 >& that,
654 const std::function<
655 std::shared_ptr<E>(
656 const std::shared_ptr<types::IClass>&
657 )
658 >& factory
659);
660
661template <typename E>
662std::shared_ptr<
664> Wrap(
665 const std::shared_ptr<
667 >& that,
668 const std::function<
669 std::shared_ptr<E>(
670 const std::shared_ptr<types::IClass>&
671 )
672 >& factory
673);
674
675template <typename E>
676std::shared_ptr<
678> Wrap(
679 const std::shared_ptr<
681 >& that,
682 const std::function<
683 std::shared_ptr<E>(
684 const std::shared_ptr<types::IClass>&
685 )
686 >& factory
687);
688
689template <typename E>
690std::shared_ptr<
692> Wrap(
693 const std::shared_ptr<
695 >& that,
696 const std::function<
697 std::shared_ptr<E>(
698 const std::shared_ptr<types::IClass>&
699 )
700 >& factory
701);
702
703template <typename E>
704std::shared_ptr<
706> Wrap(
707 const std::shared_ptr<
709 >& that,
710 const std::function<
711 std::shared_ptr<E>(
712 const std::shared_ptr<types::IClass>&
713 )
714 >& factory
715);
716
717template <typename E>
718std::shared_ptr<
719 types::IDataSpecificationIec61360
720> Wrap(
721 const std::shared_ptr<
722 types::IDataSpecificationIec61360
723 >& that,
724 const std::function<
725 std::shared_ptr<E>(
726 const std::shared_ptr<types::IClass>&
727 )
728 >& factory
729);
730
731// endregion Forward declarations
732
734namespace impl {
735
736template<typename E>
737class IEnhanced {
738 public:
739 virtual const std::shared_ptr<E>& enhancement() const = 0;
740
741 virtual std::shared_ptr<E>& mutable_enhancement() = 0;
742
743 virtual void set_enhancement(
744 std::shared_ptr<E> value
745 ) = 0;
746
747 virtual ~IEnhanced() = default;
748};
749
750template<class E>
751class EnhancedExtension
752 : virtual public types::IExtension,
753 virtual public IEnhanced<E> {
754 public:
755 types::ModelType model_type() const override {
757 }
758
759 const common::optional<
760 std::shared_ptr<types::IReference>
761 >& semantic_id() const override {
762 return instance_->semantic_id();
763 }
764
765 common::optional<
766 std::shared_ptr<types::IReference>
767 >& mutable_semantic_id() override {
768 return instance_->mutable_semantic_id();
769 }
770
771 void set_semantic_id(
772 common::optional<
773 std::shared_ptr<types::IReference>
774 > value
775 ) override {
776 instance_->set_semantic_id(value);
777 }
778
779 const common::optional<
780 std::vector<
781 std::shared_ptr<types::IReference>
782 >
783 >& supplemental_semantic_ids() const override {
784 return instance_->supplemental_semantic_ids();
785 }
786
787 common::optional<
788 std::vector<
789 std::shared_ptr<types::IReference>
790 >
791 >& mutable_supplemental_semantic_ids() override {
792 return instance_->mutable_supplemental_semantic_ids();
793 }
794
795 void set_supplemental_semantic_ids(
796 common::optional<
797 std::vector<
798 std::shared_ptr<types::IReference>
799 >
800 > value
801 ) override {
802 instance_->set_supplemental_semantic_ids(value);
803 }
804
805 const std::wstring& name() const override {
806 return instance_->name();
807 }
808
809 std::wstring& mutable_name() override {
810 return instance_->mutable_name();
811 }
812
813 void set_name(
814 std::wstring value
815 ) override {
816 instance_->set_name(value);
817 }
818
819 const common::optional<types::DataTypeDefXsd>& value_type() const override {
820 return instance_->value_type();
821 }
822
823 common::optional<types::DataTypeDefXsd>& mutable_value_type() override {
824 return instance_->mutable_value_type();
825 }
826
827 void set_value_type(
828 common::optional<types::DataTypeDefXsd> value
829 ) override {
830 instance_->set_value_type(value);
831 }
832
833 const common::optional<std::wstring>& value() const override {
834 return instance_->value();
835 }
836
837 common::optional<std::wstring>& mutable_value() override {
838 return instance_->mutable_value();
839 }
840
841 void set_value(
842 common::optional<std::wstring> value
843 ) override {
844 instance_->set_value(value);
845 }
846
847 const common::optional<
848 std::vector<
849 std::shared_ptr<types::IReference>
850 >
851 >& refers_to() const override {
852 return instance_->refers_to();
853 }
854
855 common::optional<
856 std::vector<
857 std::shared_ptr<types::IReference>
858 >
859 >& mutable_refers_to() override {
860 return instance_->mutable_refers_to();
861 }
862
863 void set_refers_to(
864 common::optional<
865 std::vector<
866 std::shared_ptr<types::IReference>
867 >
868 > value
869 ) override {
870 instance_->set_refers_to(value);
871 }
872
873 types::DataTypeDefXsd ValueTypeOrDefault() const override {
874 return instance_->ValueTypeOrDefault();
875 }
876
877 const std::shared_ptr<E>& enhancement() const {
878 return enhancement_;
879 }
880
881 std::shared_ptr<E>& mutable_enhancement() {
882 return enhancement_;
883 }
884
885 void set_enhancement(
886 std::shared_ptr<E> value
887 ) {
888 enhancement_ = std::move(value);
889 }
890
891 EnhancedExtension(
892 std::shared_ptr<types::IExtension> instance,
893 std::shared_ptr<E> enhancement
894 ) :
895 instance_(instance),
896 enhancement_(enhancement) {
897 // Intentionally empty.
898 }
899
900 virtual ~EnhancedExtension() = default;
901
902 private:
903 std::shared_ptr<types::IExtension> instance_;
904 std::shared_ptr<E> enhancement_;
905};
906
907template<class E>
908class EnhancedAdministrativeInformation
909 : virtual public types::IAdministrativeInformation,
910 virtual public IEnhanced<E> {
911 public:
912 types::ModelType model_type() const override {
914 }
915
916 const common::optional<
917 std::vector<
918 std::shared_ptr<types::IEmbeddedDataSpecification>
919 >
920 >& embedded_data_specifications() const override {
921 return instance_->embedded_data_specifications();
922 }
923
924 common::optional<
925 std::vector<
926 std::shared_ptr<types::IEmbeddedDataSpecification>
927 >
928 >& mutable_embedded_data_specifications() override {
929 return instance_->mutable_embedded_data_specifications();
930 }
931
932 void set_embedded_data_specifications(
933 common::optional<
934 std::vector<
935 std::shared_ptr<types::IEmbeddedDataSpecification>
936 >
937 > value
938 ) override {
939 instance_->set_embedded_data_specifications(value);
940 }
941
942 const common::optional<std::wstring>& version() const override {
943 return instance_->version();
944 }
945
946 common::optional<std::wstring>& mutable_version() override {
947 return instance_->mutable_version();
948 }
949
950 void set_version(
951 common::optional<std::wstring> value
952 ) override {
953 instance_->set_version(value);
954 }
955
956 const common::optional<std::wstring>& revision() const override {
957 return instance_->revision();
958 }
959
960 common::optional<std::wstring>& mutable_revision() override {
961 return instance_->mutable_revision();
962 }
963
964 void set_revision(
965 common::optional<std::wstring> value
966 ) override {
967 instance_->set_revision(value);
968 }
969
970 const common::optional<
971 std::shared_ptr<types::IReference>
972 >& creator() const override {
973 return instance_->creator();
974 }
975
976 common::optional<
977 std::shared_ptr<types::IReference>
978 >& mutable_creator() override {
979 return instance_->mutable_creator();
980 }
981
982 void set_creator(
983 common::optional<
984 std::shared_ptr<types::IReference>
985 > value
986 ) override {
987 instance_->set_creator(value);
988 }
989
990 const common::optional<std::wstring>& template_id() const override {
991 return instance_->template_id();
992 }
993
994 common::optional<std::wstring>& mutable_template_id() override {
995 return instance_->mutable_template_id();
996 }
997
998 void set_template_id(
999 common::optional<std::wstring> value
1000 ) override {
1001 instance_->set_template_id(value);
1002 }
1003
1004 const std::shared_ptr<E>& enhancement() const {
1005 return enhancement_;
1006 }
1007
1008 std::shared_ptr<E>& mutable_enhancement() {
1009 return enhancement_;
1010 }
1011
1012 void set_enhancement(
1013 std::shared_ptr<E> value
1014 ) {
1015 enhancement_ = std::move(value);
1016 }
1017
1018 EnhancedAdministrativeInformation(
1019 std::shared_ptr<types::IAdministrativeInformation> instance,
1020 std::shared_ptr<E> enhancement
1021 ) :
1022 instance_(instance),
1023 enhancement_(enhancement) {
1024 // Intentionally empty.
1025 }
1026
1027 virtual ~EnhancedAdministrativeInformation() = default;
1028
1029 private:
1030 std::shared_ptr<types::IAdministrativeInformation> instance_;
1031 std::shared_ptr<E> enhancement_;
1032};
1033
1034template<class E>
1035class EnhancedQualifier
1036 : virtual public types::IQualifier,
1037 virtual public IEnhanced<E> {
1038 public:
1039 types::ModelType model_type() const override {
1041 }
1042
1043 const common::optional<
1044 std::shared_ptr<types::IReference>
1045 >& semantic_id() const override {
1046 return instance_->semantic_id();
1047 }
1048
1049 common::optional<
1050 std::shared_ptr<types::IReference>
1051 >& mutable_semantic_id() override {
1052 return instance_->mutable_semantic_id();
1053 }
1054
1055 void set_semantic_id(
1056 common::optional<
1057 std::shared_ptr<types::IReference>
1058 > value
1059 ) override {
1060 instance_->set_semantic_id(value);
1061 }
1062
1063 const common::optional<
1064 std::vector<
1065 std::shared_ptr<types::IReference>
1066 >
1067 >& supplemental_semantic_ids() const override {
1068 return instance_->supplemental_semantic_ids();
1069 }
1070
1071 common::optional<
1072 std::vector<
1073 std::shared_ptr<types::IReference>
1074 >
1075 >& mutable_supplemental_semantic_ids() override {
1076 return instance_->mutable_supplemental_semantic_ids();
1077 }
1078
1079 void set_supplemental_semantic_ids(
1080 common::optional<
1081 std::vector<
1082 std::shared_ptr<types::IReference>
1083 >
1084 > value
1085 ) override {
1086 instance_->set_supplemental_semantic_ids(value);
1087 }
1088
1089 const common::optional<types::QualifierKind>& kind() const override {
1090 return instance_->kind();
1091 }
1092
1093 common::optional<types::QualifierKind>& mutable_kind() override {
1094 return instance_->mutable_kind();
1095 }
1096
1097 void set_kind(
1098 common::optional<types::QualifierKind> value
1099 ) override {
1100 instance_->set_kind(value);
1101 }
1102
1103 const std::wstring& type() const override {
1104 return instance_->type();
1105 }
1106
1107 std::wstring& mutable_type() override {
1108 return instance_->mutable_type();
1109 }
1110
1111 void set_type(
1112 std::wstring value
1113 ) override {
1114 instance_->set_type(value);
1115 }
1116
1117 types::DataTypeDefXsd value_type() const override {
1118 return instance_->value_type();
1119 }
1120
1121 types::DataTypeDefXsd& mutable_value_type() override {
1122 return instance_->mutable_value_type();
1123 }
1124
1125 void set_value_type(
1127 ) override {
1128 instance_->set_value_type(value);
1129 }
1130
1131 const common::optional<std::wstring>& value() const override {
1132 return instance_->value();
1133 }
1134
1135 common::optional<std::wstring>& mutable_value() override {
1136 return instance_->mutable_value();
1137 }
1138
1139 void set_value(
1140 common::optional<std::wstring> value
1141 ) override {
1142 instance_->set_value(value);
1143 }
1144
1145 const common::optional<
1146 std::shared_ptr<types::IReference>
1147 >& value_id() const override {
1148 return instance_->value_id();
1149 }
1150
1151 common::optional<
1152 std::shared_ptr<types::IReference>
1153 >& mutable_value_id() override {
1154 return instance_->mutable_value_id();
1155 }
1156
1157 void set_value_id(
1158 common::optional<
1159 std::shared_ptr<types::IReference>
1160 > value
1161 ) override {
1162 instance_->set_value_id(value);
1163 }
1164
1165 types::QualifierKind KindOrDefault() const override {
1166 return instance_->KindOrDefault();
1167 }
1168
1169 const std::shared_ptr<E>& enhancement() const {
1170 return enhancement_;
1171 }
1172
1173 std::shared_ptr<E>& mutable_enhancement() {
1174 return enhancement_;
1175 }
1176
1177 void set_enhancement(
1178 std::shared_ptr<E> value
1179 ) {
1180 enhancement_ = std::move(value);
1181 }
1182
1183 EnhancedQualifier(
1184 std::shared_ptr<types::IQualifier> instance,
1185 std::shared_ptr<E> enhancement
1186 ) :
1187 instance_(instance),
1188 enhancement_(enhancement) {
1189 // Intentionally empty.
1190 }
1191
1192 virtual ~EnhancedQualifier() = default;
1193
1194 private:
1195 std::shared_ptr<types::IQualifier> instance_;
1196 std::shared_ptr<E> enhancement_;
1197};
1198
1199template<class E>
1200class EnhancedAssetAdministrationShell
1201 : virtual public types::IAssetAdministrationShell,
1202 virtual public IEnhanced<E> {
1203 public:
1204 types::ModelType model_type() const override {
1206 }
1207
1208 const common::optional<
1209 std::vector<
1210 std::shared_ptr<types::IExtension>
1211 >
1212 >& extensions() const override {
1213 return instance_->extensions();
1214 }
1215
1216 common::optional<
1217 std::vector<
1218 std::shared_ptr<types::IExtension>
1219 >
1220 >& mutable_extensions() override {
1221 return instance_->mutable_extensions();
1222 }
1223
1224 void set_extensions(
1225 common::optional<
1226 std::vector<
1227 std::shared_ptr<types::IExtension>
1228 >
1229 > value
1230 ) override {
1231 instance_->set_extensions(value);
1232 }
1233
1234 const common::optional<std::wstring>& category() const override {
1235 return instance_->category();
1236 }
1237
1238 common::optional<std::wstring>& mutable_category() override {
1239 return instance_->mutable_category();
1240 }
1241
1242 void set_category(
1243 common::optional<std::wstring> value
1244 ) override {
1245 instance_->set_category(value);
1246 }
1247
1248 const common::optional<std::wstring>& id_short() const override {
1249 return instance_->id_short();
1250 }
1251
1252 common::optional<std::wstring>& mutable_id_short() override {
1253 return instance_->mutable_id_short();
1254 }
1255
1256 void set_id_short(
1257 common::optional<std::wstring> value
1258 ) override {
1259 instance_->set_id_short(value);
1260 }
1261
1262 const common::optional<
1263 std::vector<
1264 std::shared_ptr<types::ILangStringNameType>
1265 >
1266 >& display_name() const override {
1267 return instance_->display_name();
1268 }
1269
1270 common::optional<
1271 std::vector<
1272 std::shared_ptr<types::ILangStringNameType>
1273 >
1274 >& mutable_display_name() override {
1275 return instance_->mutable_display_name();
1276 }
1277
1278 void set_display_name(
1279 common::optional<
1280 std::vector<
1281 std::shared_ptr<types::ILangStringNameType>
1282 >
1283 > value
1284 ) override {
1285 instance_->set_display_name(value);
1286 }
1287
1288 const common::optional<
1289 std::vector<
1290 std::shared_ptr<types::ILangStringTextType>
1291 >
1292 >& description() const override {
1293 return instance_->description();
1294 }
1295
1296 common::optional<
1297 std::vector<
1298 std::shared_ptr<types::ILangStringTextType>
1299 >
1300 >& mutable_description() override {
1301 return instance_->mutable_description();
1302 }
1303
1304 void set_description(
1305 common::optional<
1306 std::vector<
1307 std::shared_ptr<types::ILangStringTextType>
1308 >
1309 > value
1310 ) override {
1311 instance_->set_description(value);
1312 }
1313
1314 const common::optional<
1315 std::shared_ptr<types::IAdministrativeInformation>
1316 >& administration() const override {
1317 return instance_->administration();
1318 }
1319
1320 common::optional<
1321 std::shared_ptr<types::IAdministrativeInformation>
1322 >& mutable_administration() override {
1323 return instance_->mutable_administration();
1324 }
1325
1326 void set_administration(
1327 common::optional<
1328 std::shared_ptr<types::IAdministrativeInformation>
1329 > value
1330 ) override {
1331 instance_->set_administration(value);
1332 }
1333
1334 const std::wstring& id() const override {
1335 return instance_->id();
1336 }
1337
1338 std::wstring& mutable_id() override {
1339 return instance_->mutable_id();
1340 }
1341
1342 void set_id(
1343 std::wstring value
1344 ) override {
1345 instance_->set_id(value);
1346 }
1347
1348 const common::optional<
1349 std::vector<
1350 std::shared_ptr<types::IEmbeddedDataSpecification>
1351 >
1352 >& embedded_data_specifications() const override {
1353 return instance_->embedded_data_specifications();
1354 }
1355
1356 common::optional<
1357 std::vector<
1358 std::shared_ptr<types::IEmbeddedDataSpecification>
1359 >
1360 >& mutable_embedded_data_specifications() override {
1361 return instance_->mutable_embedded_data_specifications();
1362 }
1363
1364 void set_embedded_data_specifications(
1365 common::optional<
1366 std::vector<
1367 std::shared_ptr<types::IEmbeddedDataSpecification>
1368 >
1369 > value
1370 ) override {
1371 instance_->set_embedded_data_specifications(value);
1372 }
1373
1374 const common::optional<
1375 std::shared_ptr<types::IReference>
1376 >& derived_from() const override {
1377 return instance_->derived_from();
1378 }
1379
1380 common::optional<
1381 std::shared_ptr<types::IReference>
1382 >& mutable_derived_from() override {
1383 return instance_->mutable_derived_from();
1384 }
1385
1386 void set_derived_from(
1387 common::optional<
1388 std::shared_ptr<types::IReference>
1389 > value
1390 ) override {
1391 instance_->set_derived_from(value);
1392 }
1393
1394 const std::shared_ptr<types::IAssetInformation>& asset_information() const override {
1395 return instance_->asset_information();
1396 }
1397
1398 std::shared_ptr<types::IAssetInformation>& mutable_asset_information() override {
1399 return instance_->mutable_asset_information();
1400 }
1401
1402 void set_asset_information(
1403 std::shared_ptr<types::IAssetInformation> value
1404 ) override {
1405 instance_->set_asset_information(value);
1406 }
1407
1408 const common::optional<
1409 std::vector<
1410 std::shared_ptr<types::IReference>
1411 >
1412 >& submodels() const override {
1413 return instance_->submodels();
1414 }
1415
1416 common::optional<
1417 std::vector<
1418 std::shared_ptr<types::IReference>
1419 >
1420 >& mutable_submodels() override {
1421 return instance_->mutable_submodels();
1422 }
1423
1424 void set_submodels(
1425 common::optional<
1426 std::vector<
1427 std::shared_ptr<types::IReference>
1428 >
1429 > value
1430 ) override {
1431 instance_->set_submodels(value);
1432 }
1433
1434 const std::shared_ptr<E>& enhancement() const {
1435 return enhancement_;
1436 }
1437
1438 std::shared_ptr<E>& mutable_enhancement() {
1439 return enhancement_;
1440 }
1441
1442 void set_enhancement(
1443 std::shared_ptr<E> value
1444 ) {
1445 enhancement_ = std::move(value);
1446 }
1447
1448 EnhancedAssetAdministrationShell(
1449 std::shared_ptr<types::IAssetAdministrationShell> instance,
1450 std::shared_ptr<E> enhancement
1451 ) :
1452 instance_(instance),
1453 enhancement_(enhancement) {
1454 // Intentionally empty.
1455 }
1456
1457 virtual ~EnhancedAssetAdministrationShell() = default;
1458
1459 private:
1460 std::shared_ptr<types::IAssetAdministrationShell> instance_;
1461 std::shared_ptr<E> enhancement_;
1462};
1463
1464template<class E>
1465class EnhancedAssetInformation
1466 : virtual public types::IAssetInformation,
1467 virtual public IEnhanced<E> {
1468 public:
1469 types::ModelType model_type() const override {
1471 }
1472
1473 types::AssetKind asset_kind() const override {
1474 return instance_->asset_kind();
1475 }
1476
1477 types::AssetKind& mutable_asset_kind() override {
1478 return instance_->mutable_asset_kind();
1479 }
1480
1481 void set_asset_kind(
1482 types::AssetKind value
1483 ) override {
1484 instance_->set_asset_kind(value);
1485 }
1486
1487 const common::optional<std::wstring>& global_asset_id() const override {
1488 return instance_->global_asset_id();
1489 }
1490
1491 common::optional<std::wstring>& mutable_global_asset_id() override {
1492 return instance_->mutable_global_asset_id();
1493 }
1494
1495 void set_global_asset_id(
1496 common::optional<std::wstring> value
1497 ) override {
1498 instance_->set_global_asset_id(value);
1499 }
1500
1501 const common::optional<
1502 std::vector<
1503 std::shared_ptr<types::ISpecificAssetId>
1504 >
1505 >& specific_asset_ids() const override {
1506 return instance_->specific_asset_ids();
1507 }
1508
1509 common::optional<
1510 std::vector<
1511 std::shared_ptr<types::ISpecificAssetId>
1512 >
1513 >& mutable_specific_asset_ids() override {
1514 return instance_->mutable_specific_asset_ids();
1515 }
1516
1517 void set_specific_asset_ids(
1518 common::optional<
1519 std::vector<
1520 std::shared_ptr<types::ISpecificAssetId>
1521 >
1522 > value
1523 ) override {
1524 instance_->set_specific_asset_ids(value);
1525 }
1526
1527 const common::optional<std::wstring>& asset_type() const override {
1528 return instance_->asset_type();
1529 }
1530
1531 common::optional<std::wstring>& mutable_asset_type() override {
1532 return instance_->mutable_asset_type();
1533 }
1534
1535 void set_asset_type(
1536 common::optional<std::wstring> value
1537 ) override {
1538 instance_->set_asset_type(value);
1539 }
1540
1541 const common::optional<
1542 std::shared_ptr<types::IResource>
1543 >& default_thumbnail() const override {
1544 return instance_->default_thumbnail();
1545 }
1546
1547 common::optional<
1548 std::shared_ptr<types::IResource>
1549 >& mutable_default_thumbnail() override {
1550 return instance_->mutable_default_thumbnail();
1551 }
1552
1553 void set_default_thumbnail(
1554 common::optional<
1555 std::shared_ptr<types::IResource>
1556 > value
1557 ) override {
1558 instance_->set_default_thumbnail(value);
1559 }
1560
1561 const std::shared_ptr<E>& enhancement() const {
1562 return enhancement_;
1563 }
1564
1565 std::shared_ptr<E>& mutable_enhancement() {
1566 return enhancement_;
1567 }
1568
1569 void set_enhancement(
1570 std::shared_ptr<E> value
1571 ) {
1572 enhancement_ = std::move(value);
1573 }
1574
1575 EnhancedAssetInformation(
1576 std::shared_ptr<types::IAssetInformation> instance,
1577 std::shared_ptr<E> enhancement
1578 ) :
1579 instance_(instance),
1580 enhancement_(enhancement) {
1581 // Intentionally empty.
1582 }
1583
1584 virtual ~EnhancedAssetInformation() = default;
1585
1586 private:
1587 std::shared_ptr<types::IAssetInformation> instance_;
1588 std::shared_ptr<E> enhancement_;
1589};
1590
1591template<class E>
1592class EnhancedResource
1593 : virtual public types::IResource,
1594 virtual public IEnhanced<E> {
1595 public:
1596 types::ModelType model_type() const override {
1598 }
1599
1600 const std::wstring& path() const override {
1601 return instance_->path();
1602 }
1603
1604 std::wstring& mutable_path() override {
1605 return instance_->mutable_path();
1606 }
1607
1608 void set_path(
1609 std::wstring value
1610 ) override {
1611 instance_->set_path(value);
1612 }
1613
1614 const common::optional<std::wstring>& content_type() const override {
1615 return instance_->content_type();
1616 }
1617
1618 common::optional<std::wstring>& mutable_content_type() override {
1619 return instance_->mutable_content_type();
1620 }
1621
1622 void set_content_type(
1623 common::optional<std::wstring> value
1624 ) override {
1625 instance_->set_content_type(value);
1626 }
1627
1628 const std::shared_ptr<E>& enhancement() const {
1629 return enhancement_;
1630 }
1631
1632 std::shared_ptr<E>& mutable_enhancement() {
1633 return enhancement_;
1634 }
1635
1636 void set_enhancement(
1637 std::shared_ptr<E> value
1638 ) {
1639 enhancement_ = std::move(value);
1640 }
1641
1642 EnhancedResource(
1643 std::shared_ptr<types::IResource> instance,
1644 std::shared_ptr<E> enhancement
1645 ) :
1646 instance_(instance),
1647 enhancement_(enhancement) {
1648 // Intentionally empty.
1649 }
1650
1651 virtual ~EnhancedResource() = default;
1652
1653 private:
1654 std::shared_ptr<types::IResource> instance_;
1655 std::shared_ptr<E> enhancement_;
1656};
1657
1658template<class E>
1659class EnhancedSpecificAssetId
1660 : virtual public types::ISpecificAssetId,
1661 virtual public IEnhanced<E> {
1662 public:
1663 types::ModelType model_type() const override {
1665 }
1666
1667 const common::optional<
1668 std::shared_ptr<types::IReference>
1669 >& semantic_id() const override {
1670 return instance_->semantic_id();
1671 }
1672
1673 common::optional<
1674 std::shared_ptr<types::IReference>
1675 >& mutable_semantic_id() override {
1676 return instance_->mutable_semantic_id();
1677 }
1678
1679 void set_semantic_id(
1680 common::optional<
1681 std::shared_ptr<types::IReference>
1682 > value
1683 ) override {
1684 instance_->set_semantic_id(value);
1685 }
1686
1687 const common::optional<
1688 std::vector<
1689 std::shared_ptr<types::IReference>
1690 >
1691 >& supplemental_semantic_ids() const override {
1692 return instance_->supplemental_semantic_ids();
1693 }
1694
1695 common::optional<
1696 std::vector<
1697 std::shared_ptr<types::IReference>
1698 >
1699 >& mutable_supplemental_semantic_ids() override {
1700 return instance_->mutable_supplemental_semantic_ids();
1701 }
1702
1703 void set_supplemental_semantic_ids(
1704 common::optional<
1705 std::vector<
1706 std::shared_ptr<types::IReference>
1707 >
1708 > value
1709 ) override {
1710 instance_->set_supplemental_semantic_ids(value);
1711 }
1712
1713 const std::wstring& name() const override {
1714 return instance_->name();
1715 }
1716
1717 std::wstring& mutable_name() override {
1718 return instance_->mutable_name();
1719 }
1720
1721 void set_name(
1722 std::wstring value
1723 ) override {
1724 instance_->set_name(value);
1725 }
1726
1727 const std::wstring& value() const override {
1728 return instance_->value();
1729 }
1730
1731 std::wstring& mutable_value() override {
1732 return instance_->mutable_value();
1733 }
1734
1735 void set_value(
1736 std::wstring value
1737 ) override {
1738 instance_->set_value(value);
1739 }
1740
1741 const common::optional<
1742 std::shared_ptr<types::IReference>
1743 >& external_subject_id() const override {
1744 return instance_->external_subject_id();
1745 }
1746
1747 common::optional<
1748 std::shared_ptr<types::IReference>
1749 >& mutable_external_subject_id() override {
1750 return instance_->mutable_external_subject_id();
1751 }
1752
1753 void set_external_subject_id(
1754 common::optional<
1755 std::shared_ptr<types::IReference>
1756 > value
1757 ) override {
1758 instance_->set_external_subject_id(value);
1759 }
1760
1761 const std::shared_ptr<E>& enhancement() const {
1762 return enhancement_;
1763 }
1764
1765 std::shared_ptr<E>& mutable_enhancement() {
1766 return enhancement_;
1767 }
1768
1769 void set_enhancement(
1770 std::shared_ptr<E> value
1771 ) {
1772 enhancement_ = std::move(value);
1773 }
1774
1775 EnhancedSpecificAssetId(
1776 std::shared_ptr<types::ISpecificAssetId> instance,
1777 std::shared_ptr<E> enhancement
1778 ) :
1779 instance_(instance),
1780 enhancement_(enhancement) {
1781 // Intentionally empty.
1782 }
1783
1784 virtual ~EnhancedSpecificAssetId() = default;
1785
1786 private:
1787 std::shared_ptr<types::ISpecificAssetId> instance_;
1788 std::shared_ptr<E> enhancement_;
1789};
1790
1791template<class E>
1792class EnhancedSubmodel
1793 : virtual public types::ISubmodel,
1794 virtual public IEnhanced<E> {
1795 public:
1796 types::ModelType model_type() const override {
1798 }
1799
1800 const common::optional<
1801 std::vector<
1802 std::shared_ptr<types::IExtension>
1803 >
1804 >& extensions() const override {
1805 return instance_->extensions();
1806 }
1807
1808 common::optional<
1809 std::vector<
1810 std::shared_ptr<types::IExtension>
1811 >
1812 >& mutable_extensions() override {
1813 return instance_->mutable_extensions();
1814 }
1815
1816 void set_extensions(
1817 common::optional<
1818 std::vector<
1819 std::shared_ptr<types::IExtension>
1820 >
1821 > value
1822 ) override {
1823 instance_->set_extensions(value);
1824 }
1825
1826 const common::optional<std::wstring>& category() const override {
1827 return instance_->category();
1828 }
1829
1830 common::optional<std::wstring>& mutable_category() override {
1831 return instance_->mutable_category();
1832 }
1833
1834 void set_category(
1835 common::optional<std::wstring> value
1836 ) override {
1837 instance_->set_category(value);
1838 }
1839
1840 const common::optional<std::wstring>& id_short() const override {
1841 return instance_->id_short();
1842 }
1843
1844 common::optional<std::wstring>& mutable_id_short() override {
1845 return instance_->mutable_id_short();
1846 }
1847
1848 void set_id_short(
1849 common::optional<std::wstring> value
1850 ) override {
1851 instance_->set_id_short(value);
1852 }
1853
1854 const common::optional<
1855 std::vector<
1856 std::shared_ptr<types::ILangStringNameType>
1857 >
1858 >& display_name() const override {
1859 return instance_->display_name();
1860 }
1861
1862 common::optional<
1863 std::vector<
1864 std::shared_ptr<types::ILangStringNameType>
1865 >
1866 >& mutable_display_name() override {
1867 return instance_->mutable_display_name();
1868 }
1869
1870 void set_display_name(
1871 common::optional<
1872 std::vector<
1873 std::shared_ptr<types::ILangStringNameType>
1874 >
1875 > value
1876 ) override {
1877 instance_->set_display_name(value);
1878 }
1879
1880 const common::optional<
1881 std::vector<
1882 std::shared_ptr<types::ILangStringTextType>
1883 >
1884 >& description() const override {
1885 return instance_->description();
1886 }
1887
1888 common::optional<
1889 std::vector<
1890 std::shared_ptr<types::ILangStringTextType>
1891 >
1892 >& mutable_description() override {
1893 return instance_->mutable_description();
1894 }
1895
1896 void set_description(
1897 common::optional<
1898 std::vector<
1899 std::shared_ptr<types::ILangStringTextType>
1900 >
1901 > value
1902 ) override {
1903 instance_->set_description(value);
1904 }
1905
1906 const common::optional<
1907 std::shared_ptr<types::IAdministrativeInformation>
1908 >& administration() const override {
1909 return instance_->administration();
1910 }
1911
1912 common::optional<
1913 std::shared_ptr<types::IAdministrativeInformation>
1914 >& mutable_administration() override {
1915 return instance_->mutable_administration();
1916 }
1917
1918 void set_administration(
1919 common::optional<
1920 std::shared_ptr<types::IAdministrativeInformation>
1921 > value
1922 ) override {
1923 instance_->set_administration(value);
1924 }
1925
1926 const std::wstring& id() const override {
1927 return instance_->id();
1928 }
1929
1930 std::wstring& mutable_id() override {
1931 return instance_->mutable_id();
1932 }
1933
1934 void set_id(
1935 std::wstring value
1936 ) override {
1937 instance_->set_id(value);
1938 }
1939
1940 const common::optional<types::ModellingKind>& kind() const override {
1941 return instance_->kind();
1942 }
1943
1944 common::optional<types::ModellingKind>& mutable_kind() override {
1945 return instance_->mutable_kind();
1946 }
1947
1948 void set_kind(
1949 common::optional<types::ModellingKind> value
1950 ) override {
1951 instance_->set_kind(value);
1952 }
1953
1954 const common::optional<
1955 std::shared_ptr<types::IReference>
1956 >& semantic_id() const override {
1957 return instance_->semantic_id();
1958 }
1959
1960 common::optional<
1961 std::shared_ptr<types::IReference>
1962 >& mutable_semantic_id() override {
1963 return instance_->mutable_semantic_id();
1964 }
1965
1966 void set_semantic_id(
1967 common::optional<
1968 std::shared_ptr<types::IReference>
1969 > value
1970 ) override {
1971 instance_->set_semantic_id(value);
1972 }
1973
1974 const common::optional<
1975 std::vector<
1976 std::shared_ptr<types::IReference>
1977 >
1978 >& supplemental_semantic_ids() const override {
1979 return instance_->supplemental_semantic_ids();
1980 }
1981
1982 common::optional<
1983 std::vector<
1984 std::shared_ptr<types::IReference>
1985 >
1986 >& mutable_supplemental_semantic_ids() override {
1987 return instance_->mutable_supplemental_semantic_ids();
1988 }
1989
1990 void set_supplemental_semantic_ids(
1991 common::optional<
1992 std::vector<
1993 std::shared_ptr<types::IReference>
1994 >
1995 > value
1996 ) override {
1997 instance_->set_supplemental_semantic_ids(value);
1998 }
1999
2000 const common::optional<
2001 std::vector<
2002 std::shared_ptr<types::IQualifier>
2003 >
2004 >& qualifiers() const override {
2005 return instance_->qualifiers();
2006 }
2007
2008 common::optional<
2009 std::vector<
2010 std::shared_ptr<types::IQualifier>
2011 >
2012 >& mutable_qualifiers() override {
2013 return instance_->mutable_qualifiers();
2014 }
2015
2016 void set_qualifiers(
2017 common::optional<
2018 std::vector<
2019 std::shared_ptr<types::IQualifier>
2020 >
2021 > value
2022 ) override {
2023 instance_->set_qualifiers(value);
2024 }
2025
2026 const common::optional<
2027 std::vector<
2028 std::shared_ptr<types::IEmbeddedDataSpecification>
2029 >
2030 >& embedded_data_specifications() const override {
2031 return instance_->embedded_data_specifications();
2032 }
2033
2034 common::optional<
2035 std::vector<
2036 std::shared_ptr<types::IEmbeddedDataSpecification>
2037 >
2038 >& mutable_embedded_data_specifications() override {
2039 return instance_->mutable_embedded_data_specifications();
2040 }
2041
2042 void set_embedded_data_specifications(
2043 common::optional<
2044 std::vector<
2045 std::shared_ptr<types::IEmbeddedDataSpecification>
2046 >
2047 > value
2048 ) override {
2049 instance_->set_embedded_data_specifications(value);
2050 }
2051
2052 const common::optional<
2053 std::vector<
2054 std::shared_ptr<types::ISubmodelElement>
2055 >
2056 >& submodel_elements() const override {
2057 return instance_->submodel_elements();
2058 }
2059
2060 common::optional<
2061 std::vector<
2062 std::shared_ptr<types::ISubmodelElement>
2063 >
2064 >& mutable_submodel_elements() override {
2065 return instance_->mutable_submodel_elements();
2066 }
2067
2068 void set_submodel_elements(
2069 common::optional<
2070 std::vector<
2071 std::shared_ptr<types::ISubmodelElement>
2072 >
2073 > value
2074 ) override {
2075 instance_->set_submodel_elements(value);
2076 }
2077
2078 types::ModellingKind KindOrDefault() const override {
2079 return instance_->KindOrDefault();
2080 }
2081
2082 const std::shared_ptr<E>& enhancement() const {
2083 return enhancement_;
2084 }
2085
2086 std::shared_ptr<E>& mutable_enhancement() {
2087 return enhancement_;
2088 }
2089
2090 void set_enhancement(
2091 std::shared_ptr<E> value
2092 ) {
2093 enhancement_ = std::move(value);
2094 }
2095
2096 EnhancedSubmodel(
2097 std::shared_ptr<types::ISubmodel> instance,
2098 std::shared_ptr<E> enhancement
2099 ) :
2100 instance_(instance),
2101 enhancement_(enhancement) {
2102 // Intentionally empty.
2103 }
2104
2105 virtual ~EnhancedSubmodel() = default;
2106
2107 private:
2108 std::shared_ptr<types::ISubmodel> instance_;
2109 std::shared_ptr<E> enhancement_;
2110};
2111
2112template<class E>
2113class EnhancedRelationshipElement
2114 : virtual public types::IRelationshipElement,
2115 virtual public IEnhanced<E> {
2116 public:
2117 types::ModelType model_type() const override {
2119 }
2120
2121 const common::optional<
2122 std::vector<
2123 std::shared_ptr<types::IExtension>
2124 >
2125 >& extensions() const override {
2126 return instance_->extensions();
2127 }
2128
2129 common::optional<
2130 std::vector<
2131 std::shared_ptr<types::IExtension>
2132 >
2133 >& mutable_extensions() override {
2134 return instance_->mutable_extensions();
2135 }
2136
2137 void set_extensions(
2138 common::optional<
2139 std::vector<
2140 std::shared_ptr<types::IExtension>
2141 >
2142 > value
2143 ) override {
2144 instance_->set_extensions(value);
2145 }
2146
2147 const common::optional<std::wstring>& category() const override {
2148 return instance_->category();
2149 }
2150
2151 common::optional<std::wstring>& mutable_category() override {
2152 return instance_->mutable_category();
2153 }
2154
2155 void set_category(
2156 common::optional<std::wstring> value
2157 ) override {
2158 instance_->set_category(value);
2159 }
2160
2161 const common::optional<std::wstring>& id_short() const override {
2162 return instance_->id_short();
2163 }
2164
2165 common::optional<std::wstring>& mutable_id_short() override {
2166 return instance_->mutable_id_short();
2167 }
2168
2169 void set_id_short(
2170 common::optional<std::wstring> value
2171 ) override {
2172 instance_->set_id_short(value);
2173 }
2174
2175 const common::optional<
2176 std::vector<
2177 std::shared_ptr<types::ILangStringNameType>
2178 >
2179 >& display_name() const override {
2180 return instance_->display_name();
2181 }
2182
2183 common::optional<
2184 std::vector<
2185 std::shared_ptr<types::ILangStringNameType>
2186 >
2187 >& mutable_display_name() override {
2188 return instance_->mutable_display_name();
2189 }
2190
2191 void set_display_name(
2192 common::optional<
2193 std::vector<
2194 std::shared_ptr<types::ILangStringNameType>
2195 >
2196 > value
2197 ) override {
2198 instance_->set_display_name(value);
2199 }
2200
2201 const common::optional<
2202 std::vector<
2203 std::shared_ptr<types::ILangStringTextType>
2204 >
2205 >& description() const override {
2206 return instance_->description();
2207 }
2208
2209 common::optional<
2210 std::vector<
2211 std::shared_ptr<types::ILangStringTextType>
2212 >
2213 >& mutable_description() override {
2214 return instance_->mutable_description();
2215 }
2216
2217 void set_description(
2218 common::optional<
2219 std::vector<
2220 std::shared_ptr<types::ILangStringTextType>
2221 >
2222 > value
2223 ) override {
2224 instance_->set_description(value);
2225 }
2226
2227 const common::optional<
2228 std::shared_ptr<types::IReference>
2229 >& semantic_id() const override {
2230 return instance_->semantic_id();
2231 }
2232
2233 common::optional<
2234 std::shared_ptr<types::IReference>
2235 >& mutable_semantic_id() override {
2236 return instance_->mutable_semantic_id();
2237 }
2238
2239 void set_semantic_id(
2240 common::optional<
2241 std::shared_ptr<types::IReference>
2242 > value
2243 ) override {
2244 instance_->set_semantic_id(value);
2245 }
2246
2247 const common::optional<
2248 std::vector<
2249 std::shared_ptr<types::IReference>
2250 >
2251 >& supplemental_semantic_ids() const override {
2252 return instance_->supplemental_semantic_ids();
2253 }
2254
2255 common::optional<
2256 std::vector<
2257 std::shared_ptr<types::IReference>
2258 >
2259 >& mutable_supplemental_semantic_ids() override {
2260 return instance_->mutable_supplemental_semantic_ids();
2261 }
2262
2263 void set_supplemental_semantic_ids(
2264 common::optional<
2265 std::vector<
2266 std::shared_ptr<types::IReference>
2267 >
2268 > value
2269 ) override {
2270 instance_->set_supplemental_semantic_ids(value);
2271 }
2272
2273 const common::optional<
2274 std::vector<
2275 std::shared_ptr<types::IQualifier>
2276 >
2277 >& qualifiers() const override {
2278 return instance_->qualifiers();
2279 }
2280
2281 common::optional<
2282 std::vector<
2283 std::shared_ptr<types::IQualifier>
2284 >
2285 >& mutable_qualifiers() override {
2286 return instance_->mutable_qualifiers();
2287 }
2288
2289 void set_qualifiers(
2290 common::optional<
2291 std::vector<
2292 std::shared_ptr<types::IQualifier>
2293 >
2294 > value
2295 ) override {
2296 instance_->set_qualifiers(value);
2297 }
2298
2299 const common::optional<
2300 std::vector<
2301 std::shared_ptr<types::IEmbeddedDataSpecification>
2302 >
2303 >& embedded_data_specifications() const override {
2304 return instance_->embedded_data_specifications();
2305 }
2306
2307 common::optional<
2308 std::vector<
2309 std::shared_ptr<types::IEmbeddedDataSpecification>
2310 >
2311 >& mutable_embedded_data_specifications() override {
2312 return instance_->mutable_embedded_data_specifications();
2313 }
2314
2315 void set_embedded_data_specifications(
2316 common::optional<
2317 std::vector<
2318 std::shared_ptr<types::IEmbeddedDataSpecification>
2319 >
2320 > value
2321 ) override {
2322 instance_->set_embedded_data_specifications(value);
2323 }
2324
2325 const std::shared_ptr<types::IReference>& first() const override {
2326 return instance_->first();
2327 }
2328
2329 std::shared_ptr<types::IReference>& mutable_first() override {
2330 return instance_->mutable_first();
2331 }
2332
2333 void set_first(
2334 std::shared_ptr<types::IReference> value
2335 ) override {
2336 instance_->set_first(value);
2337 }
2338
2339 const std::shared_ptr<types::IReference>& second() const override {
2340 return instance_->second();
2341 }
2342
2343 std::shared_ptr<types::IReference>& mutable_second() override {
2344 return instance_->mutable_second();
2345 }
2346
2347 void set_second(
2348 std::shared_ptr<types::IReference> value
2349 ) override {
2350 instance_->set_second(value);
2351 }
2352
2353 const std::shared_ptr<E>& enhancement() const {
2354 return enhancement_;
2355 }
2356
2357 std::shared_ptr<E>& mutable_enhancement() {
2358 return enhancement_;
2359 }
2360
2361 void set_enhancement(
2362 std::shared_ptr<E> value
2363 ) {
2364 enhancement_ = std::move(value);
2365 }
2366
2367 EnhancedRelationshipElement(
2368 std::shared_ptr<types::IRelationshipElement> instance,
2369 std::shared_ptr<E> enhancement
2370 ) :
2371 instance_(instance),
2372 enhancement_(enhancement) {
2373 // Intentionally empty.
2374 }
2375
2376 virtual ~EnhancedRelationshipElement() = default;
2377
2378 private:
2379 std::shared_ptr<types::IRelationshipElement> instance_;
2380 std::shared_ptr<E> enhancement_;
2381};
2382
2383template<class E>
2384class EnhancedSubmodelElementList
2385 : virtual public types::ISubmodelElementList,
2386 virtual public IEnhanced<E> {
2387 public:
2388 types::ModelType model_type() const override {
2390 }
2391
2392 const common::optional<
2393 std::vector<
2394 std::shared_ptr<types::IExtension>
2395 >
2396 >& extensions() const override {
2397 return instance_->extensions();
2398 }
2399
2400 common::optional<
2401 std::vector<
2402 std::shared_ptr<types::IExtension>
2403 >
2404 >& mutable_extensions() override {
2405 return instance_->mutable_extensions();
2406 }
2407
2408 void set_extensions(
2409 common::optional<
2410 std::vector<
2411 std::shared_ptr<types::IExtension>
2412 >
2413 > value
2414 ) override {
2415 instance_->set_extensions(value);
2416 }
2417
2418 const common::optional<std::wstring>& category() const override {
2419 return instance_->category();
2420 }
2421
2422 common::optional<std::wstring>& mutable_category() override {
2423 return instance_->mutable_category();
2424 }
2425
2426 void set_category(
2427 common::optional<std::wstring> value
2428 ) override {
2429 instance_->set_category(value);
2430 }
2431
2432 const common::optional<std::wstring>& id_short() const override {
2433 return instance_->id_short();
2434 }
2435
2436 common::optional<std::wstring>& mutable_id_short() override {
2437 return instance_->mutable_id_short();
2438 }
2439
2440 void set_id_short(
2441 common::optional<std::wstring> value
2442 ) override {
2443 instance_->set_id_short(value);
2444 }
2445
2446 const common::optional<
2447 std::vector<
2448 std::shared_ptr<types::ILangStringNameType>
2449 >
2450 >& display_name() const override {
2451 return instance_->display_name();
2452 }
2453
2454 common::optional<
2455 std::vector<
2456 std::shared_ptr<types::ILangStringNameType>
2457 >
2458 >& mutable_display_name() override {
2459 return instance_->mutable_display_name();
2460 }
2461
2462 void set_display_name(
2463 common::optional<
2464 std::vector<
2465 std::shared_ptr<types::ILangStringNameType>
2466 >
2467 > value
2468 ) override {
2469 instance_->set_display_name(value);
2470 }
2471
2472 const common::optional<
2473 std::vector<
2474 std::shared_ptr<types::ILangStringTextType>
2475 >
2476 >& description() const override {
2477 return instance_->description();
2478 }
2479
2480 common::optional<
2481 std::vector<
2482 std::shared_ptr<types::ILangStringTextType>
2483 >
2484 >& mutable_description() override {
2485 return instance_->mutable_description();
2486 }
2487
2488 void set_description(
2489 common::optional<
2490 std::vector<
2491 std::shared_ptr<types::ILangStringTextType>
2492 >
2493 > value
2494 ) override {
2495 instance_->set_description(value);
2496 }
2497
2498 const common::optional<
2499 std::shared_ptr<types::IReference>
2500 >& semantic_id() const override {
2501 return instance_->semantic_id();
2502 }
2503
2504 common::optional<
2505 std::shared_ptr<types::IReference>
2506 >& mutable_semantic_id() override {
2507 return instance_->mutable_semantic_id();
2508 }
2509
2510 void set_semantic_id(
2511 common::optional<
2512 std::shared_ptr<types::IReference>
2513 > value
2514 ) override {
2515 instance_->set_semantic_id(value);
2516 }
2517
2518 const common::optional<
2519 std::vector<
2520 std::shared_ptr<types::IReference>
2521 >
2522 >& supplemental_semantic_ids() const override {
2523 return instance_->supplemental_semantic_ids();
2524 }
2525
2526 common::optional<
2527 std::vector<
2528 std::shared_ptr<types::IReference>
2529 >
2530 >& mutable_supplemental_semantic_ids() override {
2531 return instance_->mutable_supplemental_semantic_ids();
2532 }
2533
2534 void set_supplemental_semantic_ids(
2535 common::optional<
2536 std::vector<
2537 std::shared_ptr<types::IReference>
2538 >
2539 > value
2540 ) override {
2541 instance_->set_supplemental_semantic_ids(value);
2542 }
2543
2544 const common::optional<
2545 std::vector<
2546 std::shared_ptr<types::IQualifier>
2547 >
2548 >& qualifiers() const override {
2549 return instance_->qualifiers();
2550 }
2551
2552 common::optional<
2553 std::vector<
2554 std::shared_ptr<types::IQualifier>
2555 >
2556 >& mutable_qualifiers() override {
2557 return instance_->mutable_qualifiers();
2558 }
2559
2560 void set_qualifiers(
2561 common::optional<
2562 std::vector<
2563 std::shared_ptr<types::IQualifier>
2564 >
2565 > value
2566 ) override {
2567 instance_->set_qualifiers(value);
2568 }
2569
2570 const common::optional<
2571 std::vector<
2572 std::shared_ptr<types::IEmbeddedDataSpecification>
2573 >
2574 >& embedded_data_specifications() const override {
2575 return instance_->embedded_data_specifications();
2576 }
2577
2578 common::optional<
2579 std::vector<
2580 std::shared_ptr<types::IEmbeddedDataSpecification>
2581 >
2582 >& mutable_embedded_data_specifications() override {
2583 return instance_->mutable_embedded_data_specifications();
2584 }
2585
2586 void set_embedded_data_specifications(
2587 common::optional<
2588 std::vector<
2589 std::shared_ptr<types::IEmbeddedDataSpecification>
2590 >
2591 > value
2592 ) override {
2593 instance_->set_embedded_data_specifications(value);
2594 }
2595
2596 const common::optional<bool>& order_relevant() const override {
2597 return instance_->order_relevant();
2598 }
2599
2600 common::optional<bool>& mutable_order_relevant() override {
2601 return instance_->mutable_order_relevant();
2602 }
2603
2604 void set_order_relevant(
2605 common::optional<bool> value
2606 ) override {
2607 instance_->set_order_relevant(value);
2608 }
2609
2610 const common::optional<
2611 std::shared_ptr<types::IReference>
2612 >& semantic_id_list_element() const override {
2613 return instance_->semantic_id_list_element();
2614 }
2615
2616 common::optional<
2617 std::shared_ptr<types::IReference>
2618 >& mutable_semantic_id_list_element() override {
2619 return instance_->mutable_semantic_id_list_element();
2620 }
2621
2622 void set_semantic_id_list_element(
2623 common::optional<
2624 std::shared_ptr<types::IReference>
2625 > value
2626 ) override {
2627 instance_->set_semantic_id_list_element(value);
2628 }
2629
2630 types::AasSubmodelElements type_value_list_element() const override {
2631 return instance_->type_value_list_element();
2632 }
2633
2634 types::AasSubmodelElements& mutable_type_value_list_element() override {
2635 return instance_->mutable_type_value_list_element();
2636 }
2637
2638 void set_type_value_list_element(
2640 ) override {
2641 instance_->set_type_value_list_element(value);
2642 }
2643
2644 const common::optional<types::DataTypeDefXsd>& value_type_list_element() const override {
2645 return instance_->value_type_list_element();
2646 }
2647
2648 common::optional<types::DataTypeDefXsd>& mutable_value_type_list_element() override {
2649 return instance_->mutable_value_type_list_element();
2650 }
2651
2652 void set_value_type_list_element(
2653 common::optional<types::DataTypeDefXsd> value
2654 ) override {
2655 instance_->set_value_type_list_element(value);
2656 }
2657
2658 const common::optional<
2659 std::vector<
2660 std::shared_ptr<types::ISubmodelElement>
2661 >
2662 >& value() const override {
2663 return instance_->value();
2664 }
2665
2666 common::optional<
2667 std::vector<
2668 std::shared_ptr<types::ISubmodelElement>
2669 >
2670 >& mutable_value() override {
2671 return instance_->mutable_value();
2672 }
2673
2674 void set_value(
2675 common::optional<
2676 std::vector<
2677 std::shared_ptr<types::ISubmodelElement>
2678 >
2679 > value
2680 ) override {
2681 instance_->set_value(value);
2682 }
2683
2684 bool OrderRelevantOrDefault() const override {
2685 return instance_->OrderRelevantOrDefault();
2686 }
2687
2688 const std::shared_ptr<E>& enhancement() const {
2689 return enhancement_;
2690 }
2691
2692 std::shared_ptr<E>& mutable_enhancement() {
2693 return enhancement_;
2694 }
2695
2696 void set_enhancement(
2697 std::shared_ptr<E> value
2698 ) {
2699 enhancement_ = std::move(value);
2700 }
2701
2702 EnhancedSubmodelElementList(
2703 std::shared_ptr<types::ISubmodelElementList> instance,
2704 std::shared_ptr<E> enhancement
2705 ) :
2706 instance_(instance),
2707 enhancement_(enhancement) {
2708 // Intentionally empty.
2709 }
2710
2711 virtual ~EnhancedSubmodelElementList() = default;
2712
2713 private:
2714 std::shared_ptr<types::ISubmodelElementList> instance_;
2715 std::shared_ptr<E> enhancement_;
2716};
2717
2718template<class E>
2719class EnhancedSubmodelElementCollection
2720 : virtual public types::ISubmodelElementCollection,
2721 virtual public IEnhanced<E> {
2722 public:
2723 types::ModelType model_type() const override {
2725 }
2726
2727 const common::optional<
2728 std::vector<
2729 std::shared_ptr<types::IExtension>
2730 >
2731 >& extensions() const override {
2732 return instance_->extensions();
2733 }
2734
2735 common::optional<
2736 std::vector<
2737 std::shared_ptr<types::IExtension>
2738 >
2739 >& mutable_extensions() override {
2740 return instance_->mutable_extensions();
2741 }
2742
2743 void set_extensions(
2744 common::optional<
2745 std::vector<
2746 std::shared_ptr<types::IExtension>
2747 >
2748 > value
2749 ) override {
2750 instance_->set_extensions(value);
2751 }
2752
2753 const common::optional<std::wstring>& category() const override {
2754 return instance_->category();
2755 }
2756
2757 common::optional<std::wstring>& mutable_category() override {
2758 return instance_->mutable_category();
2759 }
2760
2761 void set_category(
2762 common::optional<std::wstring> value
2763 ) override {
2764 instance_->set_category(value);
2765 }
2766
2767 const common::optional<std::wstring>& id_short() const override {
2768 return instance_->id_short();
2769 }
2770
2771 common::optional<std::wstring>& mutable_id_short() override {
2772 return instance_->mutable_id_short();
2773 }
2774
2775 void set_id_short(
2776 common::optional<std::wstring> value
2777 ) override {
2778 instance_->set_id_short(value);
2779 }
2780
2781 const common::optional<
2782 std::vector<
2783 std::shared_ptr<types::ILangStringNameType>
2784 >
2785 >& display_name() const override {
2786 return instance_->display_name();
2787 }
2788
2789 common::optional<
2790 std::vector<
2791 std::shared_ptr<types::ILangStringNameType>
2792 >
2793 >& mutable_display_name() override {
2794 return instance_->mutable_display_name();
2795 }
2796
2797 void set_display_name(
2798 common::optional<
2799 std::vector<
2800 std::shared_ptr<types::ILangStringNameType>
2801 >
2802 > value
2803 ) override {
2804 instance_->set_display_name(value);
2805 }
2806
2807 const common::optional<
2808 std::vector<
2809 std::shared_ptr<types::ILangStringTextType>
2810 >
2811 >& description() const override {
2812 return instance_->description();
2813 }
2814
2815 common::optional<
2816 std::vector<
2817 std::shared_ptr<types::ILangStringTextType>
2818 >
2819 >& mutable_description() override {
2820 return instance_->mutable_description();
2821 }
2822
2823 void set_description(
2824 common::optional<
2825 std::vector<
2826 std::shared_ptr<types::ILangStringTextType>
2827 >
2828 > value
2829 ) override {
2830 instance_->set_description(value);
2831 }
2832
2833 const common::optional<
2834 std::shared_ptr<types::IReference>
2835 >& semantic_id() const override {
2836 return instance_->semantic_id();
2837 }
2838
2839 common::optional<
2840 std::shared_ptr<types::IReference>
2841 >& mutable_semantic_id() override {
2842 return instance_->mutable_semantic_id();
2843 }
2844
2845 void set_semantic_id(
2846 common::optional<
2847 std::shared_ptr<types::IReference>
2848 > value
2849 ) override {
2850 instance_->set_semantic_id(value);
2851 }
2852
2853 const common::optional<
2854 std::vector<
2855 std::shared_ptr<types::IReference>
2856 >
2857 >& supplemental_semantic_ids() const override {
2858 return instance_->supplemental_semantic_ids();
2859 }
2860
2861 common::optional<
2862 std::vector<
2863 std::shared_ptr<types::IReference>
2864 >
2865 >& mutable_supplemental_semantic_ids() override {
2866 return instance_->mutable_supplemental_semantic_ids();
2867 }
2868
2869 void set_supplemental_semantic_ids(
2870 common::optional<
2871 std::vector<
2872 std::shared_ptr<types::IReference>
2873 >
2874 > value
2875 ) override {
2876 instance_->set_supplemental_semantic_ids(value);
2877 }
2878
2879 const common::optional<
2880 std::vector<
2881 std::shared_ptr<types::IQualifier>
2882 >
2883 >& qualifiers() const override {
2884 return instance_->qualifiers();
2885 }
2886
2887 common::optional<
2888 std::vector<
2889 std::shared_ptr<types::IQualifier>
2890 >
2891 >& mutable_qualifiers() override {
2892 return instance_->mutable_qualifiers();
2893 }
2894
2895 void set_qualifiers(
2896 common::optional<
2897 std::vector<
2898 std::shared_ptr<types::IQualifier>
2899 >
2900 > value
2901 ) override {
2902 instance_->set_qualifiers(value);
2903 }
2904
2905 const common::optional<
2906 std::vector<
2907 std::shared_ptr<types::IEmbeddedDataSpecification>
2908 >
2909 >& embedded_data_specifications() const override {
2910 return instance_->embedded_data_specifications();
2911 }
2912
2913 common::optional<
2914 std::vector<
2915 std::shared_ptr<types::IEmbeddedDataSpecification>
2916 >
2917 >& mutable_embedded_data_specifications() override {
2918 return instance_->mutable_embedded_data_specifications();
2919 }
2920
2921 void set_embedded_data_specifications(
2922 common::optional<
2923 std::vector<
2924 std::shared_ptr<types::IEmbeddedDataSpecification>
2925 >
2926 > value
2927 ) override {
2928 instance_->set_embedded_data_specifications(value);
2929 }
2930
2931 const common::optional<
2932 std::vector<
2933 std::shared_ptr<types::ISubmodelElement>
2934 >
2935 >& value() const override {
2936 return instance_->value();
2937 }
2938
2939 common::optional<
2940 std::vector<
2941 std::shared_ptr<types::ISubmodelElement>
2942 >
2943 >& mutable_value() override {
2944 return instance_->mutable_value();
2945 }
2946
2947 void set_value(
2948 common::optional<
2949 std::vector<
2950 std::shared_ptr<types::ISubmodelElement>
2951 >
2952 > value
2953 ) override {
2954 instance_->set_value(value);
2955 }
2956
2957 const std::shared_ptr<E>& enhancement() const {
2958 return enhancement_;
2959 }
2960
2961 std::shared_ptr<E>& mutable_enhancement() {
2962 return enhancement_;
2963 }
2964
2965 void set_enhancement(
2966 std::shared_ptr<E> value
2967 ) {
2968 enhancement_ = std::move(value);
2969 }
2970
2971 EnhancedSubmodelElementCollection(
2972 std::shared_ptr<types::ISubmodelElementCollection> instance,
2973 std::shared_ptr<E> enhancement
2974 ) :
2975 instance_(instance),
2976 enhancement_(enhancement) {
2977 // Intentionally empty.
2978 }
2979
2980 virtual ~EnhancedSubmodelElementCollection() = default;
2981
2982 private:
2983 std::shared_ptr<types::ISubmodelElementCollection> instance_;
2984 std::shared_ptr<E> enhancement_;
2985};
2986
2987template<class E>
2988class EnhancedProperty
2989 : virtual public types::IProperty,
2990 virtual public IEnhanced<E> {
2991 public:
2992 types::ModelType model_type() const override {
2994 }
2995
2996 const common::optional<
2997 std::vector<
2998 std::shared_ptr<types::IExtension>
2999 >
3000 >& extensions() const override {
3001 return instance_->extensions();
3002 }
3003
3004 common::optional<
3005 std::vector<
3006 std::shared_ptr<types::IExtension>
3007 >
3008 >& mutable_extensions() override {
3009 return instance_->mutable_extensions();
3010 }
3011
3012 void set_extensions(
3013 common::optional<
3014 std::vector<
3015 std::shared_ptr<types::IExtension>
3016 >
3017 > value
3018 ) override {
3019 instance_->set_extensions(value);
3020 }
3021
3022 const common::optional<std::wstring>& category() const override {
3023 return instance_->category();
3024 }
3025
3026 common::optional<std::wstring>& mutable_category() override {
3027 return instance_->mutable_category();
3028 }
3029
3030 void set_category(
3031 common::optional<std::wstring> value
3032 ) override {
3033 instance_->set_category(value);
3034 }
3035
3036 const common::optional<std::wstring>& id_short() const override {
3037 return instance_->id_short();
3038 }
3039
3040 common::optional<std::wstring>& mutable_id_short() override {
3041 return instance_->mutable_id_short();
3042 }
3043
3044 void set_id_short(
3045 common::optional<std::wstring> value
3046 ) override {
3047 instance_->set_id_short(value);
3048 }
3049
3050 const common::optional<
3051 std::vector<
3052 std::shared_ptr<types::ILangStringNameType>
3053 >
3054 >& display_name() const override {
3055 return instance_->display_name();
3056 }
3057
3058 common::optional<
3059 std::vector<
3060 std::shared_ptr<types::ILangStringNameType>
3061 >
3062 >& mutable_display_name() override {
3063 return instance_->mutable_display_name();
3064 }
3065
3066 void set_display_name(
3067 common::optional<
3068 std::vector<
3069 std::shared_ptr<types::ILangStringNameType>
3070 >
3071 > value
3072 ) override {
3073 instance_->set_display_name(value);
3074 }
3075
3076 const common::optional<
3077 std::vector<
3078 std::shared_ptr<types::ILangStringTextType>
3079 >
3080 >& description() const override {
3081 return instance_->description();
3082 }
3083
3084 common::optional<
3085 std::vector<
3086 std::shared_ptr<types::ILangStringTextType>
3087 >
3088 >& mutable_description() override {
3089 return instance_->mutable_description();
3090 }
3091
3092 void set_description(
3093 common::optional<
3094 std::vector<
3095 std::shared_ptr<types::ILangStringTextType>
3096 >
3097 > value
3098 ) override {
3099 instance_->set_description(value);
3100 }
3101
3102 const common::optional<
3103 std::shared_ptr<types::IReference>
3104 >& semantic_id() const override {
3105 return instance_->semantic_id();
3106 }
3107
3108 common::optional<
3109 std::shared_ptr<types::IReference>
3110 >& mutable_semantic_id() override {
3111 return instance_->mutable_semantic_id();
3112 }
3113
3114 void set_semantic_id(
3115 common::optional<
3116 std::shared_ptr<types::IReference>
3117 > value
3118 ) override {
3119 instance_->set_semantic_id(value);
3120 }
3121
3122 const common::optional<
3123 std::vector<
3124 std::shared_ptr<types::IReference>
3125 >
3126 >& supplemental_semantic_ids() const override {
3127 return instance_->supplemental_semantic_ids();
3128 }
3129
3130 common::optional<
3131 std::vector<
3132 std::shared_ptr<types::IReference>
3133 >
3134 >& mutable_supplemental_semantic_ids() override {
3135 return instance_->mutable_supplemental_semantic_ids();
3136 }
3137
3138 void set_supplemental_semantic_ids(
3139 common::optional<
3140 std::vector<
3141 std::shared_ptr<types::IReference>
3142 >
3143 > value
3144 ) override {
3145 instance_->set_supplemental_semantic_ids(value);
3146 }
3147
3148 const common::optional<
3149 std::vector<
3150 std::shared_ptr<types::IQualifier>
3151 >
3152 >& qualifiers() const override {
3153 return instance_->qualifiers();
3154 }
3155
3156 common::optional<
3157 std::vector<
3158 std::shared_ptr<types::IQualifier>
3159 >
3160 >& mutable_qualifiers() override {
3161 return instance_->mutable_qualifiers();
3162 }
3163
3164 void set_qualifiers(
3165 common::optional<
3166 std::vector<
3167 std::shared_ptr<types::IQualifier>
3168 >
3169 > value
3170 ) override {
3171 instance_->set_qualifiers(value);
3172 }
3173
3174 const common::optional<
3175 std::vector<
3176 std::shared_ptr<types::IEmbeddedDataSpecification>
3177 >
3178 >& embedded_data_specifications() const override {
3179 return instance_->embedded_data_specifications();
3180 }
3181
3182 common::optional<
3183 std::vector<
3184 std::shared_ptr<types::IEmbeddedDataSpecification>
3185 >
3186 >& mutable_embedded_data_specifications() override {
3187 return instance_->mutable_embedded_data_specifications();
3188 }
3189
3190 void set_embedded_data_specifications(
3191 common::optional<
3192 std::vector<
3193 std::shared_ptr<types::IEmbeddedDataSpecification>
3194 >
3195 > value
3196 ) override {
3197 instance_->set_embedded_data_specifications(value);
3198 }
3199
3200 types::DataTypeDefXsd value_type() const override {
3201 return instance_->value_type();
3202 }
3203
3204 types::DataTypeDefXsd& mutable_value_type() override {
3205 return instance_->mutable_value_type();
3206 }
3207
3208 void set_value_type(
3210 ) override {
3211 instance_->set_value_type(value);
3212 }
3213
3214 const common::optional<std::wstring>& value() const override {
3215 return instance_->value();
3216 }
3217
3218 common::optional<std::wstring>& mutable_value() override {
3219 return instance_->mutable_value();
3220 }
3221
3222 void set_value(
3223 common::optional<std::wstring> value
3224 ) override {
3225 instance_->set_value(value);
3226 }
3227
3228 const common::optional<
3229 std::shared_ptr<types::IReference>
3230 >& value_id() const override {
3231 return instance_->value_id();
3232 }
3233
3234 common::optional<
3235 std::shared_ptr<types::IReference>
3236 >& mutable_value_id() override {
3237 return instance_->mutable_value_id();
3238 }
3239
3240 void set_value_id(
3241 common::optional<
3242 std::shared_ptr<types::IReference>
3243 > value
3244 ) override {
3245 instance_->set_value_id(value);
3246 }
3247
3248 std::wstring CategoryOrDefault() const override {
3249 return instance_->CategoryOrDefault();
3250 }
3251
3252 const std::shared_ptr<E>& enhancement() const {
3253 return enhancement_;
3254 }
3255
3256 std::shared_ptr<E>& mutable_enhancement() {
3257 return enhancement_;
3258 }
3259
3260 void set_enhancement(
3261 std::shared_ptr<E> value
3262 ) {
3263 enhancement_ = std::move(value);
3264 }
3265
3266 EnhancedProperty(
3267 std::shared_ptr<types::IProperty> instance,
3268 std::shared_ptr<E> enhancement
3269 ) :
3270 instance_(instance),
3271 enhancement_(enhancement) {
3272 // Intentionally empty.
3273 }
3274
3275 virtual ~EnhancedProperty() = default;
3276
3277 private:
3278 std::shared_ptr<types::IProperty> instance_;
3279 std::shared_ptr<E> enhancement_;
3280};
3281
3282template<class E>
3283class EnhancedMultiLanguageProperty
3284 : virtual public types::IMultiLanguageProperty,
3285 virtual public IEnhanced<E> {
3286 public:
3287 types::ModelType model_type() const override {
3289 }
3290
3291 const common::optional<
3292 std::vector<
3293 std::shared_ptr<types::IExtension>
3294 >
3295 >& extensions() const override {
3296 return instance_->extensions();
3297 }
3298
3299 common::optional<
3300 std::vector<
3301 std::shared_ptr<types::IExtension>
3302 >
3303 >& mutable_extensions() override {
3304 return instance_->mutable_extensions();
3305 }
3306
3307 void set_extensions(
3308 common::optional<
3309 std::vector<
3310 std::shared_ptr<types::IExtension>
3311 >
3312 > value
3313 ) override {
3314 instance_->set_extensions(value);
3315 }
3316
3317 const common::optional<std::wstring>& category() const override {
3318 return instance_->category();
3319 }
3320
3321 common::optional<std::wstring>& mutable_category() override {
3322 return instance_->mutable_category();
3323 }
3324
3325 void set_category(
3326 common::optional<std::wstring> value
3327 ) override {
3328 instance_->set_category(value);
3329 }
3330
3331 const common::optional<std::wstring>& id_short() const override {
3332 return instance_->id_short();
3333 }
3334
3335 common::optional<std::wstring>& mutable_id_short() override {
3336 return instance_->mutable_id_short();
3337 }
3338
3339 void set_id_short(
3340 common::optional<std::wstring> value
3341 ) override {
3342 instance_->set_id_short(value);
3343 }
3344
3345 const common::optional<
3346 std::vector<
3347 std::shared_ptr<types::ILangStringNameType>
3348 >
3349 >& display_name() const override {
3350 return instance_->display_name();
3351 }
3352
3353 common::optional<
3354 std::vector<
3355 std::shared_ptr<types::ILangStringNameType>
3356 >
3357 >& mutable_display_name() override {
3358 return instance_->mutable_display_name();
3359 }
3360
3361 void set_display_name(
3362 common::optional<
3363 std::vector<
3364 std::shared_ptr<types::ILangStringNameType>
3365 >
3366 > value
3367 ) override {
3368 instance_->set_display_name(value);
3369 }
3370
3371 const common::optional<
3372 std::vector<
3373 std::shared_ptr<types::ILangStringTextType>
3374 >
3375 >& description() const override {
3376 return instance_->description();
3377 }
3378
3379 common::optional<
3380 std::vector<
3381 std::shared_ptr<types::ILangStringTextType>
3382 >
3383 >& mutable_description() override {
3384 return instance_->mutable_description();
3385 }
3386
3387 void set_description(
3388 common::optional<
3389 std::vector<
3390 std::shared_ptr<types::ILangStringTextType>
3391 >
3392 > value
3393 ) override {
3394 instance_->set_description(value);
3395 }
3396
3397 const common::optional<
3398 std::shared_ptr<types::IReference>
3399 >& semantic_id() const override {
3400 return instance_->semantic_id();
3401 }
3402
3403 common::optional<
3404 std::shared_ptr<types::IReference>
3405 >& mutable_semantic_id() override {
3406 return instance_->mutable_semantic_id();
3407 }
3408
3409 void set_semantic_id(
3410 common::optional<
3411 std::shared_ptr<types::IReference>
3412 > value
3413 ) override {
3414 instance_->set_semantic_id(value);
3415 }
3416
3417 const common::optional<
3418 std::vector<
3419 std::shared_ptr<types::IReference>
3420 >
3421 >& supplemental_semantic_ids() const override {
3422 return instance_->supplemental_semantic_ids();
3423 }
3424
3425 common::optional<
3426 std::vector<
3427 std::shared_ptr<types::IReference>
3428 >
3429 >& mutable_supplemental_semantic_ids() override {
3430 return instance_->mutable_supplemental_semantic_ids();
3431 }
3432
3433 void set_supplemental_semantic_ids(
3434 common::optional<
3435 std::vector<
3436 std::shared_ptr<types::IReference>
3437 >
3438 > value
3439 ) override {
3440 instance_->set_supplemental_semantic_ids(value);
3441 }
3442
3443 const common::optional<
3444 std::vector<
3445 std::shared_ptr<types::IQualifier>
3446 >
3447 >& qualifiers() const override {
3448 return instance_->qualifiers();
3449 }
3450
3451 common::optional<
3452 std::vector<
3453 std::shared_ptr<types::IQualifier>
3454 >
3455 >& mutable_qualifiers() override {
3456 return instance_->mutable_qualifiers();
3457 }
3458
3459 void set_qualifiers(
3460 common::optional<
3461 std::vector<
3462 std::shared_ptr<types::IQualifier>
3463 >
3464 > value
3465 ) override {
3466 instance_->set_qualifiers(value);
3467 }
3468
3469 const common::optional<
3470 std::vector<
3471 std::shared_ptr<types::IEmbeddedDataSpecification>
3472 >
3473 >& embedded_data_specifications() const override {
3474 return instance_->embedded_data_specifications();
3475 }
3476
3477 common::optional<
3478 std::vector<
3479 std::shared_ptr<types::IEmbeddedDataSpecification>
3480 >
3481 >& mutable_embedded_data_specifications() override {
3482 return instance_->mutable_embedded_data_specifications();
3483 }
3484
3485 void set_embedded_data_specifications(
3486 common::optional<
3487 std::vector<
3488 std::shared_ptr<types::IEmbeddedDataSpecification>
3489 >
3490 > value
3491 ) override {
3492 instance_->set_embedded_data_specifications(value);
3493 }
3494
3495 const common::optional<
3496 std::vector<
3497 std::shared_ptr<types::ILangStringTextType>
3498 >
3499 >& value() const override {
3500 return instance_->value();
3501 }
3502
3503 common::optional<
3504 std::vector<
3505 std::shared_ptr<types::ILangStringTextType>
3506 >
3507 >& mutable_value() override {
3508 return instance_->mutable_value();
3509 }
3510
3511 void set_value(
3512 common::optional<
3513 std::vector<
3514 std::shared_ptr<types::ILangStringTextType>
3515 >
3516 > value
3517 ) override {
3518 instance_->set_value(value);
3519 }
3520
3521 const common::optional<
3522 std::shared_ptr<types::IReference>
3523 >& value_id() const override {
3524 return instance_->value_id();
3525 }
3526
3527 common::optional<
3528 std::shared_ptr<types::IReference>
3529 >& mutable_value_id() override {
3530 return instance_->mutable_value_id();
3531 }
3532
3533 void set_value_id(
3534 common::optional<
3535 std::shared_ptr<types::IReference>
3536 > value
3537 ) override {
3538 instance_->set_value_id(value);
3539 }
3540
3541 std::wstring CategoryOrDefault() const override {
3542 return instance_->CategoryOrDefault();
3543 }
3544
3545 const std::shared_ptr<E>& enhancement() const {
3546 return enhancement_;
3547 }
3548
3549 std::shared_ptr<E>& mutable_enhancement() {
3550 return enhancement_;
3551 }
3552
3553 void set_enhancement(
3554 std::shared_ptr<E> value
3555 ) {
3556 enhancement_ = std::move(value);
3557 }
3558
3559 EnhancedMultiLanguageProperty(
3560 std::shared_ptr<types::IMultiLanguageProperty> instance,
3561 std::shared_ptr<E> enhancement
3562 ) :
3563 instance_(instance),
3564 enhancement_(enhancement) {
3565 // Intentionally empty.
3566 }
3567
3568 virtual ~EnhancedMultiLanguageProperty() = default;
3569
3570 private:
3571 std::shared_ptr<types::IMultiLanguageProperty> instance_;
3572 std::shared_ptr<E> enhancement_;
3573};
3574
3575template<class E>
3576class EnhancedRange
3577 : virtual public types::IRange,
3578 virtual public IEnhanced<E> {
3579 public:
3580 types::ModelType model_type() const override {
3582 }
3583
3584 const common::optional<
3585 std::vector<
3586 std::shared_ptr<types::IExtension>
3587 >
3588 >& extensions() const override {
3589 return instance_->extensions();
3590 }
3591
3592 common::optional<
3593 std::vector<
3594 std::shared_ptr<types::IExtension>
3595 >
3596 >& mutable_extensions() override {
3597 return instance_->mutable_extensions();
3598 }
3599
3600 void set_extensions(
3601 common::optional<
3602 std::vector<
3603 std::shared_ptr<types::IExtension>
3604 >
3605 > value
3606 ) override {
3607 instance_->set_extensions(value);
3608 }
3609
3610 const common::optional<std::wstring>& category() const override {
3611 return instance_->category();
3612 }
3613
3614 common::optional<std::wstring>& mutable_category() override {
3615 return instance_->mutable_category();
3616 }
3617
3618 void set_category(
3619 common::optional<std::wstring> value
3620 ) override {
3621 instance_->set_category(value);
3622 }
3623
3624 const common::optional<std::wstring>& id_short() const override {
3625 return instance_->id_short();
3626 }
3627
3628 common::optional<std::wstring>& mutable_id_short() override {
3629 return instance_->mutable_id_short();
3630 }
3631
3632 void set_id_short(
3633 common::optional<std::wstring> value
3634 ) override {
3635 instance_->set_id_short(value);
3636 }
3637
3638 const common::optional<
3639 std::vector<
3640 std::shared_ptr<types::ILangStringNameType>
3641 >
3642 >& display_name() const override {
3643 return instance_->display_name();
3644 }
3645
3646 common::optional<
3647 std::vector<
3648 std::shared_ptr<types::ILangStringNameType>
3649 >
3650 >& mutable_display_name() override {
3651 return instance_->mutable_display_name();
3652 }
3653
3654 void set_display_name(
3655 common::optional<
3656 std::vector<
3657 std::shared_ptr<types::ILangStringNameType>
3658 >
3659 > value
3660 ) override {
3661 instance_->set_display_name(value);
3662 }
3663
3664 const common::optional<
3665 std::vector<
3666 std::shared_ptr<types::ILangStringTextType>
3667 >
3668 >& description() const override {
3669 return instance_->description();
3670 }
3671
3672 common::optional<
3673 std::vector<
3674 std::shared_ptr<types::ILangStringTextType>
3675 >
3676 >& mutable_description() override {
3677 return instance_->mutable_description();
3678 }
3679
3680 void set_description(
3681 common::optional<
3682 std::vector<
3683 std::shared_ptr<types::ILangStringTextType>
3684 >
3685 > value
3686 ) override {
3687 instance_->set_description(value);
3688 }
3689
3690 const common::optional<
3691 std::shared_ptr<types::IReference>
3692 >& semantic_id() const override {
3693 return instance_->semantic_id();
3694 }
3695
3696 common::optional<
3697 std::shared_ptr<types::IReference>
3698 >& mutable_semantic_id() override {
3699 return instance_->mutable_semantic_id();
3700 }
3701
3702 void set_semantic_id(
3703 common::optional<
3704 std::shared_ptr<types::IReference>
3705 > value
3706 ) override {
3707 instance_->set_semantic_id(value);
3708 }
3709
3710 const common::optional<
3711 std::vector<
3712 std::shared_ptr<types::IReference>
3713 >
3714 >& supplemental_semantic_ids() const override {
3715 return instance_->supplemental_semantic_ids();
3716 }
3717
3718 common::optional<
3719 std::vector<
3720 std::shared_ptr<types::IReference>
3721 >
3722 >& mutable_supplemental_semantic_ids() override {
3723 return instance_->mutable_supplemental_semantic_ids();
3724 }
3725
3726 void set_supplemental_semantic_ids(
3727 common::optional<
3728 std::vector<
3729 std::shared_ptr<types::IReference>
3730 >
3731 > value
3732 ) override {
3733 instance_->set_supplemental_semantic_ids(value);
3734 }
3735
3736 const common::optional<
3737 std::vector<
3738 std::shared_ptr<types::IQualifier>
3739 >
3740 >& qualifiers() const override {
3741 return instance_->qualifiers();
3742 }
3743
3744 common::optional<
3745 std::vector<
3746 std::shared_ptr<types::IQualifier>
3747 >
3748 >& mutable_qualifiers() override {
3749 return instance_->mutable_qualifiers();
3750 }
3751
3752 void set_qualifiers(
3753 common::optional<
3754 std::vector<
3755 std::shared_ptr<types::IQualifier>
3756 >
3757 > value
3758 ) override {
3759 instance_->set_qualifiers(value);
3760 }
3761
3762 const common::optional<
3763 std::vector<
3764 std::shared_ptr<types::IEmbeddedDataSpecification>
3765 >
3766 >& embedded_data_specifications() const override {
3767 return instance_->embedded_data_specifications();
3768 }
3769
3770 common::optional<
3771 std::vector<
3772 std::shared_ptr<types::IEmbeddedDataSpecification>
3773 >
3774 >& mutable_embedded_data_specifications() override {
3775 return instance_->mutable_embedded_data_specifications();
3776 }
3777
3778 void set_embedded_data_specifications(
3779 common::optional<
3780 std::vector<
3781 std::shared_ptr<types::IEmbeddedDataSpecification>
3782 >
3783 > value
3784 ) override {
3785 instance_->set_embedded_data_specifications(value);
3786 }
3787
3788 types::DataTypeDefXsd value_type() const override {
3789 return instance_->value_type();
3790 }
3791
3792 types::DataTypeDefXsd& mutable_value_type() override {
3793 return instance_->mutable_value_type();
3794 }
3795
3796 void set_value_type(
3798 ) override {
3799 instance_->set_value_type(value);
3800 }
3801
3802 const common::optional<std::wstring>& min() const override {
3803 return instance_->min();
3804 }
3805
3806 common::optional<std::wstring>& mutable_min() override {
3807 return instance_->mutable_min();
3808 }
3809
3810 void set_min(
3811 common::optional<std::wstring> value
3812 ) override {
3813 instance_->set_min(value);
3814 }
3815
3816 const common::optional<std::wstring>& max() const override {
3817 return instance_->max();
3818 }
3819
3820 common::optional<std::wstring>& mutable_max() override {
3821 return instance_->mutable_max();
3822 }
3823
3824 void set_max(
3825 common::optional<std::wstring> value
3826 ) override {
3827 instance_->set_max(value);
3828 }
3829
3830 std::wstring CategoryOrDefault() const override {
3831 return instance_->CategoryOrDefault();
3832 }
3833
3834 const std::shared_ptr<E>& enhancement() const {
3835 return enhancement_;
3836 }
3837
3838 std::shared_ptr<E>& mutable_enhancement() {
3839 return enhancement_;
3840 }
3841
3842 void set_enhancement(
3843 std::shared_ptr<E> value
3844 ) {
3845 enhancement_ = std::move(value);
3846 }
3847
3848 EnhancedRange(
3849 std::shared_ptr<types::IRange> instance,
3850 std::shared_ptr<E> enhancement
3851 ) :
3852 instance_(instance),
3853 enhancement_(enhancement) {
3854 // Intentionally empty.
3855 }
3856
3857 virtual ~EnhancedRange() = default;
3858
3859 private:
3860 std::shared_ptr<types::IRange> instance_;
3861 std::shared_ptr<E> enhancement_;
3862};
3863
3864template<class E>
3865class EnhancedReferenceElement
3866 : virtual public types::IReferenceElement,
3867 virtual public IEnhanced<E> {
3868 public:
3869 types::ModelType model_type() const override {
3871 }
3872
3873 const common::optional<
3874 std::vector<
3875 std::shared_ptr<types::IExtension>
3876 >
3877 >& extensions() const override {
3878 return instance_->extensions();
3879 }
3880
3881 common::optional<
3882 std::vector<
3883 std::shared_ptr<types::IExtension>
3884 >
3885 >& mutable_extensions() override {
3886 return instance_->mutable_extensions();
3887 }
3888
3889 void set_extensions(
3890 common::optional<
3891 std::vector<
3892 std::shared_ptr<types::IExtension>
3893 >
3894 > value
3895 ) override {
3896 instance_->set_extensions(value);
3897 }
3898
3899 const common::optional<std::wstring>& category() const override {
3900 return instance_->category();
3901 }
3902
3903 common::optional<std::wstring>& mutable_category() override {
3904 return instance_->mutable_category();
3905 }
3906
3907 void set_category(
3908 common::optional<std::wstring> value
3909 ) override {
3910 instance_->set_category(value);
3911 }
3912
3913 const common::optional<std::wstring>& id_short() const override {
3914 return instance_->id_short();
3915 }
3916
3917 common::optional<std::wstring>& mutable_id_short() override {
3918 return instance_->mutable_id_short();
3919 }
3920
3921 void set_id_short(
3922 common::optional<std::wstring> value
3923 ) override {
3924 instance_->set_id_short(value);
3925 }
3926
3927 const common::optional<
3928 std::vector<
3929 std::shared_ptr<types::ILangStringNameType>
3930 >
3931 >& display_name() const override {
3932 return instance_->display_name();
3933 }
3934
3935 common::optional<
3936 std::vector<
3937 std::shared_ptr<types::ILangStringNameType>
3938 >
3939 >& mutable_display_name() override {
3940 return instance_->mutable_display_name();
3941 }
3942
3943 void set_display_name(
3944 common::optional<
3945 std::vector<
3946 std::shared_ptr<types::ILangStringNameType>
3947 >
3948 > value
3949 ) override {
3950 instance_->set_display_name(value);
3951 }
3952
3953 const common::optional<
3954 std::vector<
3955 std::shared_ptr<types::ILangStringTextType>
3956 >
3957 >& description() const override {
3958 return instance_->description();
3959 }
3960
3961 common::optional<
3962 std::vector<
3963 std::shared_ptr<types::ILangStringTextType>
3964 >
3965 >& mutable_description() override {
3966 return instance_->mutable_description();
3967 }
3968
3969 void set_description(
3970 common::optional<
3971 std::vector<
3972 std::shared_ptr<types::ILangStringTextType>
3973 >
3974 > value
3975 ) override {
3976 instance_->set_description(value);
3977 }
3978
3979 const common::optional<
3980 std::shared_ptr<types::IReference>
3981 >& semantic_id() const override {
3982 return instance_->semantic_id();
3983 }
3984
3985 common::optional<
3986 std::shared_ptr<types::IReference>
3987 >& mutable_semantic_id() override {
3988 return instance_->mutable_semantic_id();
3989 }
3990
3991 void set_semantic_id(
3992 common::optional<
3993 std::shared_ptr<types::IReference>
3994 > value
3995 ) override {
3996 instance_->set_semantic_id(value);
3997 }
3998
3999 const common::optional<
4000 std::vector<
4001 std::shared_ptr<types::IReference>
4002 >
4003 >& supplemental_semantic_ids() const override {
4004 return instance_->supplemental_semantic_ids();
4005 }
4006
4007 common::optional<
4008 std::vector<
4009 std::shared_ptr<types::IReference>
4010 >
4011 >& mutable_supplemental_semantic_ids() override {
4012 return instance_->mutable_supplemental_semantic_ids();
4013 }
4014
4015 void set_supplemental_semantic_ids(
4016 common::optional<
4017 std::vector<
4018 std::shared_ptr<types::IReference>
4019 >
4020 > value
4021 ) override {
4022 instance_->set_supplemental_semantic_ids(value);
4023 }
4024
4025 const common::optional<
4026 std::vector<
4027 std::shared_ptr<types::IQualifier>
4028 >
4029 >& qualifiers() const override {
4030 return instance_->qualifiers();
4031 }
4032
4033 common::optional<
4034 std::vector<
4035 std::shared_ptr<types::IQualifier>
4036 >
4037 >& mutable_qualifiers() override {
4038 return instance_->mutable_qualifiers();
4039 }
4040
4041 void set_qualifiers(
4042 common::optional<
4043 std::vector<
4044 std::shared_ptr<types::IQualifier>
4045 >
4046 > value
4047 ) override {
4048 instance_->set_qualifiers(value);
4049 }
4050
4051 const common::optional<
4052 std::vector<
4053 std::shared_ptr<types::IEmbeddedDataSpecification>
4054 >
4055 >& embedded_data_specifications() const override {
4056 return instance_->embedded_data_specifications();
4057 }
4058
4059 common::optional<
4060 std::vector<
4061 std::shared_ptr<types::IEmbeddedDataSpecification>
4062 >
4063 >& mutable_embedded_data_specifications() override {
4064 return instance_->mutable_embedded_data_specifications();
4065 }
4066
4067 void set_embedded_data_specifications(
4068 common::optional<
4069 std::vector<
4070 std::shared_ptr<types::IEmbeddedDataSpecification>
4071 >
4072 > value
4073 ) override {
4074 instance_->set_embedded_data_specifications(value);
4075 }
4076
4077 const common::optional<
4078 std::shared_ptr<types::IReference>
4079 >& value() const override {
4080 return instance_->value();
4081 }
4082
4083 common::optional<
4084 std::shared_ptr<types::IReference>
4085 >& mutable_value() override {
4086 return instance_->mutable_value();
4087 }
4088
4089 void set_value(
4090 common::optional<
4091 std::shared_ptr<types::IReference>
4092 > value
4093 ) override {
4094 instance_->set_value(value);
4095 }
4096
4097 std::wstring CategoryOrDefault() const override {
4098 return instance_->CategoryOrDefault();
4099 }
4100
4101 const std::shared_ptr<E>& enhancement() const {
4102 return enhancement_;
4103 }
4104
4105 std::shared_ptr<E>& mutable_enhancement() {
4106 return enhancement_;
4107 }
4108
4109 void set_enhancement(
4110 std::shared_ptr<E> value
4111 ) {
4112 enhancement_ = std::move(value);
4113 }
4114
4115 EnhancedReferenceElement(
4116 std::shared_ptr<types::IReferenceElement> instance,
4117 std::shared_ptr<E> enhancement
4118 ) :
4119 instance_(instance),
4120 enhancement_(enhancement) {
4121 // Intentionally empty.
4122 }
4123
4124 virtual ~EnhancedReferenceElement() = default;
4125
4126 private:
4127 std::shared_ptr<types::IReferenceElement> instance_;
4128 std::shared_ptr<E> enhancement_;
4129};
4130
4131template<class E>
4132class EnhancedBlob
4133 : virtual public types::IBlob,
4134 virtual public IEnhanced<E> {
4135 public:
4136 types::ModelType model_type() const override {
4138 }
4139
4140 const common::optional<
4141 std::vector<
4142 std::shared_ptr<types::IExtension>
4143 >
4144 >& extensions() const override {
4145 return instance_->extensions();
4146 }
4147
4148 common::optional<
4149 std::vector<
4150 std::shared_ptr<types::IExtension>
4151 >
4152 >& mutable_extensions() override {
4153 return instance_->mutable_extensions();
4154 }
4155
4156 void set_extensions(
4157 common::optional<
4158 std::vector<
4159 std::shared_ptr<types::IExtension>
4160 >
4161 > value
4162 ) override {
4163 instance_->set_extensions(value);
4164 }
4165
4166 const common::optional<std::wstring>& category() const override {
4167 return instance_->category();
4168 }
4169
4170 common::optional<std::wstring>& mutable_category() override {
4171 return instance_->mutable_category();
4172 }
4173
4174 void set_category(
4175 common::optional<std::wstring> value
4176 ) override {
4177 instance_->set_category(value);
4178 }
4179
4180 const common::optional<std::wstring>& id_short() const override {
4181 return instance_->id_short();
4182 }
4183
4184 common::optional<std::wstring>& mutable_id_short() override {
4185 return instance_->mutable_id_short();
4186 }
4187
4188 void set_id_short(
4189 common::optional<std::wstring> value
4190 ) override {
4191 instance_->set_id_short(value);
4192 }
4193
4194 const common::optional<
4195 std::vector<
4196 std::shared_ptr<types::ILangStringNameType>
4197 >
4198 >& display_name() const override {
4199 return instance_->display_name();
4200 }
4201
4202 common::optional<
4203 std::vector<
4204 std::shared_ptr<types::ILangStringNameType>
4205 >
4206 >& mutable_display_name() override {
4207 return instance_->mutable_display_name();
4208 }
4209
4210 void set_display_name(
4211 common::optional<
4212 std::vector<
4213 std::shared_ptr<types::ILangStringNameType>
4214 >
4215 > value
4216 ) override {
4217 instance_->set_display_name(value);
4218 }
4219
4220 const common::optional<
4221 std::vector<
4222 std::shared_ptr<types::ILangStringTextType>
4223 >
4224 >& description() const override {
4225 return instance_->description();
4226 }
4227
4228 common::optional<
4229 std::vector<
4230 std::shared_ptr<types::ILangStringTextType>
4231 >
4232 >& mutable_description() override {
4233 return instance_->mutable_description();
4234 }
4235
4236 void set_description(
4237 common::optional<
4238 std::vector<
4239 std::shared_ptr<types::ILangStringTextType>
4240 >
4241 > value
4242 ) override {
4243 instance_->set_description(value);
4244 }
4245
4246 const common::optional<
4247 std::shared_ptr<types::IReference>
4248 >& semantic_id() const override {
4249 return instance_->semantic_id();
4250 }
4251
4252 common::optional<
4253 std::shared_ptr<types::IReference>
4254 >& mutable_semantic_id() override {
4255 return instance_->mutable_semantic_id();
4256 }
4257
4258 void set_semantic_id(
4259 common::optional<
4260 std::shared_ptr<types::IReference>
4261 > value
4262 ) override {
4263 instance_->set_semantic_id(value);
4264 }
4265
4266 const common::optional<
4267 std::vector<
4268 std::shared_ptr<types::IReference>
4269 >
4270 >& supplemental_semantic_ids() const override {
4271 return instance_->supplemental_semantic_ids();
4272 }
4273
4274 common::optional<
4275 std::vector<
4276 std::shared_ptr<types::IReference>
4277 >
4278 >& mutable_supplemental_semantic_ids() override {
4279 return instance_->mutable_supplemental_semantic_ids();
4280 }
4281
4282 void set_supplemental_semantic_ids(
4283 common::optional<
4284 std::vector<
4285 std::shared_ptr<types::IReference>
4286 >
4287 > value
4288 ) override {
4289 instance_->set_supplemental_semantic_ids(value);
4290 }
4291
4292 const common::optional<
4293 std::vector<
4294 std::shared_ptr<types::IQualifier>
4295 >
4296 >& qualifiers() const override {
4297 return instance_->qualifiers();
4298 }
4299
4300 common::optional<
4301 std::vector<
4302 std::shared_ptr<types::IQualifier>
4303 >
4304 >& mutable_qualifiers() override {
4305 return instance_->mutable_qualifiers();
4306 }
4307
4308 void set_qualifiers(
4309 common::optional<
4310 std::vector<
4311 std::shared_ptr<types::IQualifier>
4312 >
4313 > value
4314 ) override {
4315 instance_->set_qualifiers(value);
4316 }
4317
4318 const common::optional<
4319 std::vector<
4320 std::shared_ptr<types::IEmbeddedDataSpecification>
4321 >
4322 >& embedded_data_specifications() const override {
4323 return instance_->embedded_data_specifications();
4324 }
4325
4326 common::optional<
4327 std::vector<
4328 std::shared_ptr<types::IEmbeddedDataSpecification>
4329 >
4330 >& mutable_embedded_data_specifications() override {
4331 return instance_->mutable_embedded_data_specifications();
4332 }
4333
4334 void set_embedded_data_specifications(
4335 common::optional<
4336 std::vector<
4337 std::shared_ptr<types::IEmbeddedDataSpecification>
4338 >
4339 > value
4340 ) override {
4341 instance_->set_embedded_data_specifications(value);
4342 }
4343
4344 const common::optional<
4345 std::vector<std::uint8_t>
4346 >& value() const override {
4347 return instance_->value();
4348 }
4349
4350 common::optional<
4351 std::vector<std::uint8_t>
4352 >& mutable_value() override {
4353 return instance_->mutable_value();
4354 }
4355
4356 void set_value(
4357 common::optional<
4358 std::vector<std::uint8_t>
4359 > value
4360 ) override {
4361 instance_->set_value(value);
4362 }
4363
4364 const std::wstring& content_type() const override {
4365 return instance_->content_type();
4366 }
4367
4368 std::wstring& mutable_content_type() override {
4369 return instance_->mutable_content_type();
4370 }
4371
4372 void set_content_type(
4373 std::wstring value
4374 ) override {
4375 instance_->set_content_type(value);
4376 }
4377
4378 std::wstring CategoryOrDefault() const override {
4379 return instance_->CategoryOrDefault();
4380 }
4381
4382 const std::shared_ptr<E>& enhancement() const {
4383 return enhancement_;
4384 }
4385
4386 std::shared_ptr<E>& mutable_enhancement() {
4387 return enhancement_;
4388 }
4389
4390 void set_enhancement(
4391 std::shared_ptr<E> value
4392 ) {
4393 enhancement_ = std::move(value);
4394 }
4395
4396 EnhancedBlob(
4397 std::shared_ptr<types::IBlob> instance,
4398 std::shared_ptr<E> enhancement
4399 ) :
4400 instance_(instance),
4401 enhancement_(enhancement) {
4402 // Intentionally empty.
4403 }
4404
4405 virtual ~EnhancedBlob() = default;
4406
4407 private:
4408 std::shared_ptr<types::IBlob> instance_;
4409 std::shared_ptr<E> enhancement_;
4410};
4411
4412template<class E>
4413class EnhancedFile
4414 : virtual public types::IFile,
4415 virtual public IEnhanced<E> {
4416 public:
4417 types::ModelType model_type() const override {
4419 }
4420
4421 const common::optional<
4422 std::vector<
4423 std::shared_ptr<types::IExtension>
4424 >
4425 >& extensions() const override {
4426 return instance_->extensions();
4427 }
4428
4429 common::optional<
4430 std::vector<
4431 std::shared_ptr<types::IExtension>
4432 >
4433 >& mutable_extensions() override {
4434 return instance_->mutable_extensions();
4435 }
4436
4437 void set_extensions(
4438 common::optional<
4439 std::vector<
4440 std::shared_ptr<types::IExtension>
4441 >
4442 > value
4443 ) override {
4444 instance_->set_extensions(value);
4445 }
4446
4447 const common::optional<std::wstring>& category() const override {
4448 return instance_->category();
4449 }
4450
4451 common::optional<std::wstring>& mutable_category() override {
4452 return instance_->mutable_category();
4453 }
4454
4455 void set_category(
4456 common::optional<std::wstring> value
4457 ) override {
4458 instance_->set_category(value);
4459 }
4460
4461 const common::optional<std::wstring>& id_short() const override {
4462 return instance_->id_short();
4463 }
4464
4465 common::optional<std::wstring>& mutable_id_short() override {
4466 return instance_->mutable_id_short();
4467 }
4468
4469 void set_id_short(
4470 common::optional<std::wstring> value
4471 ) override {
4472 instance_->set_id_short(value);
4473 }
4474
4475 const common::optional<
4476 std::vector<
4477 std::shared_ptr<types::ILangStringNameType>
4478 >
4479 >& display_name() const override {
4480 return instance_->display_name();
4481 }
4482
4483 common::optional<
4484 std::vector<
4485 std::shared_ptr<types::ILangStringNameType>
4486 >
4487 >& mutable_display_name() override {
4488 return instance_->mutable_display_name();
4489 }
4490
4491 void set_display_name(
4492 common::optional<
4493 std::vector<
4494 std::shared_ptr<types::ILangStringNameType>
4495 >
4496 > value
4497 ) override {
4498 instance_->set_display_name(value);
4499 }
4500
4501 const common::optional<
4502 std::vector<
4503 std::shared_ptr<types::ILangStringTextType>
4504 >
4505 >& description() const override {
4506 return instance_->description();
4507 }
4508
4509 common::optional<
4510 std::vector<
4511 std::shared_ptr<types::ILangStringTextType>
4512 >
4513 >& mutable_description() override {
4514 return instance_->mutable_description();
4515 }
4516
4517 void set_description(
4518 common::optional<
4519 std::vector<
4520 std::shared_ptr<types::ILangStringTextType>
4521 >
4522 > value
4523 ) override {
4524 instance_->set_description(value);
4525 }
4526
4527 const common::optional<
4528 std::shared_ptr<types::IReference>
4529 >& semantic_id() const override {
4530 return instance_->semantic_id();
4531 }
4532
4533 common::optional<
4534 std::shared_ptr<types::IReference>
4535 >& mutable_semantic_id() override {
4536 return instance_->mutable_semantic_id();
4537 }
4538
4539 void set_semantic_id(
4540 common::optional<
4541 std::shared_ptr<types::IReference>
4542 > value
4543 ) override {
4544 instance_->set_semantic_id(value);
4545 }
4546
4547 const common::optional<
4548 std::vector<
4549 std::shared_ptr<types::IReference>
4550 >
4551 >& supplemental_semantic_ids() const override {
4552 return instance_->supplemental_semantic_ids();
4553 }
4554
4555 common::optional<
4556 std::vector<
4557 std::shared_ptr<types::IReference>
4558 >
4559 >& mutable_supplemental_semantic_ids() override {
4560 return instance_->mutable_supplemental_semantic_ids();
4561 }
4562
4563 void set_supplemental_semantic_ids(
4564 common::optional<
4565 std::vector<
4566 std::shared_ptr<types::IReference>
4567 >
4568 > value
4569 ) override {
4570 instance_->set_supplemental_semantic_ids(value);
4571 }
4572
4573 const common::optional<
4574 std::vector<
4575 std::shared_ptr<types::IQualifier>
4576 >
4577 >& qualifiers() const override {
4578 return instance_->qualifiers();
4579 }
4580
4581 common::optional<
4582 std::vector<
4583 std::shared_ptr<types::IQualifier>
4584 >
4585 >& mutable_qualifiers() override {
4586 return instance_->mutable_qualifiers();
4587 }
4588
4589 void set_qualifiers(
4590 common::optional<
4591 std::vector<
4592 std::shared_ptr<types::IQualifier>
4593 >
4594 > value
4595 ) override {
4596 instance_->set_qualifiers(value);
4597 }
4598
4599 const common::optional<
4600 std::vector<
4601 std::shared_ptr<types::IEmbeddedDataSpecification>
4602 >
4603 >& embedded_data_specifications() const override {
4604 return instance_->embedded_data_specifications();
4605 }
4606
4607 common::optional<
4608 std::vector<
4609 std::shared_ptr<types::IEmbeddedDataSpecification>
4610 >
4611 >& mutable_embedded_data_specifications() override {
4612 return instance_->mutable_embedded_data_specifications();
4613 }
4614
4615 void set_embedded_data_specifications(
4616 common::optional<
4617 std::vector<
4618 std::shared_ptr<types::IEmbeddedDataSpecification>
4619 >
4620 > value
4621 ) override {
4622 instance_->set_embedded_data_specifications(value);
4623 }
4624
4625 const common::optional<std::wstring>& value() const override {
4626 return instance_->value();
4627 }
4628
4629 common::optional<std::wstring>& mutable_value() override {
4630 return instance_->mutable_value();
4631 }
4632
4633 void set_value(
4634 common::optional<std::wstring> value
4635 ) override {
4636 instance_->set_value(value);
4637 }
4638
4639 const std::wstring& content_type() const override {
4640 return instance_->content_type();
4641 }
4642
4643 std::wstring& mutable_content_type() override {
4644 return instance_->mutable_content_type();
4645 }
4646
4647 void set_content_type(
4648 std::wstring value
4649 ) override {
4650 instance_->set_content_type(value);
4651 }
4652
4653 std::wstring CategoryOrDefault() const override {
4654 return instance_->CategoryOrDefault();
4655 }
4656
4657 const std::shared_ptr<E>& enhancement() const {
4658 return enhancement_;
4659 }
4660
4661 std::shared_ptr<E>& mutable_enhancement() {
4662 return enhancement_;
4663 }
4664
4665 void set_enhancement(
4666 std::shared_ptr<E> value
4667 ) {
4668 enhancement_ = std::move(value);
4669 }
4670
4671 EnhancedFile(
4672 std::shared_ptr<types::IFile> instance,
4673 std::shared_ptr<E> enhancement
4674 ) :
4675 instance_(instance),
4676 enhancement_(enhancement) {
4677 // Intentionally empty.
4678 }
4679
4680 virtual ~EnhancedFile() = default;
4681
4682 private:
4683 std::shared_ptr<types::IFile> instance_;
4684 std::shared_ptr<E> enhancement_;
4685};
4686
4687template<class E>
4688class EnhancedAnnotatedRelationshipElement
4689 : virtual public types::IAnnotatedRelationshipElement,
4690 virtual public IEnhanced<E> {
4691 public:
4692 types::ModelType model_type() const override {
4694 }
4695
4696 const common::optional<
4697 std::vector<
4698 std::shared_ptr<types::IExtension>
4699 >
4700 >& extensions() const override {
4701 return instance_->extensions();
4702 }
4703
4704 common::optional<
4705 std::vector<
4706 std::shared_ptr<types::IExtension>
4707 >
4708 >& mutable_extensions() override {
4709 return instance_->mutable_extensions();
4710 }
4711
4712 void set_extensions(
4713 common::optional<
4714 std::vector<
4715 std::shared_ptr<types::IExtension>
4716 >
4717 > value
4718 ) override {
4719 instance_->set_extensions(value);
4720 }
4721
4722 const common::optional<std::wstring>& category() const override {
4723 return instance_->category();
4724 }
4725
4726 common::optional<std::wstring>& mutable_category() override {
4727 return instance_->mutable_category();
4728 }
4729
4730 void set_category(
4731 common::optional<std::wstring> value
4732 ) override {
4733 instance_->set_category(value);
4734 }
4735
4736 const common::optional<std::wstring>& id_short() const override {
4737 return instance_->id_short();
4738 }
4739
4740 common::optional<std::wstring>& mutable_id_short() override {
4741 return instance_->mutable_id_short();
4742 }
4743
4744 void set_id_short(
4745 common::optional<std::wstring> value
4746 ) override {
4747 instance_->set_id_short(value);
4748 }
4749
4750 const common::optional<
4751 std::vector<
4752 std::shared_ptr<types::ILangStringNameType>
4753 >
4754 >& display_name() const override {
4755 return instance_->display_name();
4756 }
4757
4758 common::optional<
4759 std::vector<
4760 std::shared_ptr<types::ILangStringNameType>
4761 >
4762 >& mutable_display_name() override {
4763 return instance_->mutable_display_name();
4764 }
4765
4766 void set_display_name(
4767 common::optional<
4768 std::vector<
4769 std::shared_ptr<types::ILangStringNameType>
4770 >
4771 > value
4772 ) override {
4773 instance_->set_display_name(value);
4774 }
4775
4776 const common::optional<
4777 std::vector<
4778 std::shared_ptr<types::ILangStringTextType>
4779 >
4780 >& description() const override {
4781 return instance_->description();
4782 }
4783
4784 common::optional<
4785 std::vector<
4786 std::shared_ptr<types::ILangStringTextType>
4787 >
4788 >& mutable_description() override {
4789 return instance_->mutable_description();
4790 }
4791
4792 void set_description(
4793 common::optional<
4794 std::vector<
4795 std::shared_ptr<types::ILangStringTextType>
4796 >
4797 > value
4798 ) override {
4799 instance_->set_description(value);
4800 }
4801
4802 const common::optional<
4803 std::shared_ptr<types::IReference>
4804 >& semantic_id() const override {
4805 return instance_->semantic_id();
4806 }
4807
4808 common::optional<
4809 std::shared_ptr<types::IReference>
4810 >& mutable_semantic_id() override {
4811 return instance_->mutable_semantic_id();
4812 }
4813
4814 void set_semantic_id(
4815 common::optional<
4816 std::shared_ptr<types::IReference>
4817 > value
4818 ) override {
4819 instance_->set_semantic_id(value);
4820 }
4821
4822 const common::optional<
4823 std::vector<
4824 std::shared_ptr<types::IReference>
4825 >
4826 >& supplemental_semantic_ids() const override {
4827 return instance_->supplemental_semantic_ids();
4828 }
4829
4830 common::optional<
4831 std::vector<
4832 std::shared_ptr<types::IReference>
4833 >
4834 >& mutable_supplemental_semantic_ids() override {
4835 return instance_->mutable_supplemental_semantic_ids();
4836 }
4837
4838 void set_supplemental_semantic_ids(
4839 common::optional<
4840 std::vector<
4841 std::shared_ptr<types::IReference>
4842 >
4843 > value
4844 ) override {
4845 instance_->set_supplemental_semantic_ids(value);
4846 }
4847
4848 const common::optional<
4849 std::vector<
4850 std::shared_ptr<types::IQualifier>
4851 >
4852 >& qualifiers() const override {
4853 return instance_->qualifiers();
4854 }
4855
4856 common::optional<
4857 std::vector<
4858 std::shared_ptr<types::IQualifier>
4859 >
4860 >& mutable_qualifiers() override {
4861 return instance_->mutable_qualifiers();
4862 }
4863
4864 void set_qualifiers(
4865 common::optional<
4866 std::vector<
4867 std::shared_ptr<types::IQualifier>
4868 >
4869 > value
4870 ) override {
4871 instance_->set_qualifiers(value);
4872 }
4873
4874 const common::optional<
4875 std::vector<
4876 std::shared_ptr<types::IEmbeddedDataSpecification>
4877 >
4878 >& embedded_data_specifications() const override {
4879 return instance_->embedded_data_specifications();
4880 }
4881
4882 common::optional<
4883 std::vector<
4884 std::shared_ptr<types::IEmbeddedDataSpecification>
4885 >
4886 >& mutable_embedded_data_specifications() override {
4887 return instance_->mutable_embedded_data_specifications();
4888 }
4889
4890 void set_embedded_data_specifications(
4891 common::optional<
4892 std::vector<
4893 std::shared_ptr<types::IEmbeddedDataSpecification>
4894 >
4895 > value
4896 ) override {
4897 instance_->set_embedded_data_specifications(value);
4898 }
4899
4900 const std::shared_ptr<types::IReference>& first() const override {
4901 return instance_->first();
4902 }
4903
4904 std::shared_ptr<types::IReference>& mutable_first() override {
4905 return instance_->mutable_first();
4906 }
4907
4908 void set_first(
4909 std::shared_ptr<types::IReference> value
4910 ) override {
4911 instance_->set_first(value);
4912 }
4913
4914 const std::shared_ptr<types::IReference>& second() const override {
4915 return instance_->second();
4916 }
4917
4918 std::shared_ptr<types::IReference>& mutable_second() override {
4919 return instance_->mutable_second();
4920 }
4921
4922 void set_second(
4923 std::shared_ptr<types::IReference> value
4924 ) override {
4925 instance_->set_second(value);
4926 }
4927
4928 const common::optional<
4929 std::vector<
4930 std::shared_ptr<types::IDataElement>
4931 >
4932 >& annotations() const override {
4933 return instance_->annotations();
4934 }
4935
4936 common::optional<
4937 std::vector<
4938 std::shared_ptr<types::IDataElement>
4939 >
4940 >& mutable_annotations() override {
4941 return instance_->mutable_annotations();
4942 }
4943
4944 void set_annotations(
4945 common::optional<
4946 std::vector<
4947 std::shared_ptr<types::IDataElement>
4948 >
4949 > value
4950 ) override {
4951 instance_->set_annotations(value);
4952 }
4953
4954 const std::shared_ptr<E>& enhancement() const {
4955 return enhancement_;
4956 }
4957
4958 std::shared_ptr<E>& mutable_enhancement() {
4959 return enhancement_;
4960 }
4961
4962 void set_enhancement(
4963 std::shared_ptr<E> value
4964 ) {
4965 enhancement_ = std::move(value);
4966 }
4967
4968 EnhancedAnnotatedRelationshipElement(
4969 std::shared_ptr<types::IAnnotatedRelationshipElement> instance,
4970 std::shared_ptr<E> enhancement
4971 ) :
4972 instance_(instance),
4973 enhancement_(enhancement) {
4974 // Intentionally empty.
4975 }
4976
4977 virtual ~EnhancedAnnotatedRelationshipElement() = default;
4978
4979 private:
4980 std::shared_ptr<types::IAnnotatedRelationshipElement> instance_;
4981 std::shared_ptr<E> enhancement_;
4982};
4983
4984template<class E>
4985class EnhancedEntity
4986 : virtual public types::IEntity,
4987 virtual public IEnhanced<E> {
4988 public:
4989 types::ModelType model_type() const override {
4991 }
4992
4993 const common::optional<
4994 std::vector<
4995 std::shared_ptr<types::IExtension>
4996 >
4997 >& extensions() const override {
4998 return instance_->extensions();
4999 }
5000
5001 common::optional<
5002 std::vector<
5003 std::shared_ptr<types::IExtension>
5004 >
5005 >& mutable_extensions() override {
5006 return instance_->mutable_extensions();
5007 }
5008
5009 void set_extensions(
5010 common::optional<
5011 std::vector<
5012 std::shared_ptr<types::IExtension>
5013 >
5014 > value
5015 ) override {
5016 instance_->set_extensions(value);
5017 }
5018
5019 const common::optional<std::wstring>& category() const override {
5020 return instance_->category();
5021 }
5022
5023 common::optional<std::wstring>& mutable_category() override {
5024 return instance_->mutable_category();
5025 }
5026
5027 void set_category(
5028 common::optional<std::wstring> value
5029 ) override {
5030 instance_->set_category(value);
5031 }
5032
5033 const common::optional<std::wstring>& id_short() const override {
5034 return instance_->id_short();
5035 }
5036
5037 common::optional<std::wstring>& mutable_id_short() override {
5038 return instance_->mutable_id_short();
5039 }
5040
5041 void set_id_short(
5042 common::optional<std::wstring> value
5043 ) override {
5044 instance_->set_id_short(value);
5045 }
5046
5047 const common::optional<
5048 std::vector<
5049 std::shared_ptr<types::ILangStringNameType>
5050 >
5051 >& display_name() const override {
5052 return instance_->display_name();
5053 }
5054
5055 common::optional<
5056 std::vector<
5057 std::shared_ptr<types::ILangStringNameType>
5058 >
5059 >& mutable_display_name() override {
5060 return instance_->mutable_display_name();
5061 }
5062
5063 void set_display_name(
5064 common::optional<
5065 std::vector<
5066 std::shared_ptr<types::ILangStringNameType>
5067 >
5068 > value
5069 ) override {
5070 instance_->set_display_name(value);
5071 }
5072
5073 const common::optional<
5074 std::vector<
5075 std::shared_ptr<types::ILangStringTextType>
5076 >
5077 >& description() const override {
5078 return instance_->description();
5079 }
5080
5081 common::optional<
5082 std::vector<
5083 std::shared_ptr<types::ILangStringTextType>
5084 >
5085 >& mutable_description() override {
5086 return instance_->mutable_description();
5087 }
5088
5089 void set_description(
5090 common::optional<
5091 std::vector<
5092 std::shared_ptr<types::ILangStringTextType>
5093 >
5094 > value
5095 ) override {
5096 instance_->set_description(value);
5097 }
5098
5099 const common::optional<
5100 std::shared_ptr<types::IReference>
5101 >& semantic_id() const override {
5102 return instance_->semantic_id();
5103 }
5104
5105 common::optional<
5106 std::shared_ptr<types::IReference>
5107 >& mutable_semantic_id() override {
5108 return instance_->mutable_semantic_id();
5109 }
5110
5111 void set_semantic_id(
5112 common::optional<
5113 std::shared_ptr<types::IReference>
5114 > value
5115 ) override {
5116 instance_->set_semantic_id(value);
5117 }
5118
5119 const common::optional<
5120 std::vector<
5121 std::shared_ptr<types::IReference>
5122 >
5123 >& supplemental_semantic_ids() const override {
5124 return instance_->supplemental_semantic_ids();
5125 }
5126
5127 common::optional<
5128 std::vector<
5129 std::shared_ptr<types::IReference>
5130 >
5131 >& mutable_supplemental_semantic_ids() override {
5132 return instance_->mutable_supplemental_semantic_ids();
5133 }
5134
5135 void set_supplemental_semantic_ids(
5136 common::optional<
5137 std::vector<
5138 std::shared_ptr<types::IReference>
5139 >
5140 > value
5141 ) override {
5142 instance_->set_supplemental_semantic_ids(value);
5143 }
5144
5145 const common::optional<
5146 std::vector<
5147 std::shared_ptr<types::IQualifier>
5148 >
5149 >& qualifiers() const override {
5150 return instance_->qualifiers();
5151 }
5152
5153 common::optional<
5154 std::vector<
5155 std::shared_ptr<types::IQualifier>
5156 >
5157 >& mutable_qualifiers() override {
5158 return instance_->mutable_qualifiers();
5159 }
5160
5161 void set_qualifiers(
5162 common::optional<
5163 std::vector<
5164 std::shared_ptr<types::IQualifier>
5165 >
5166 > value
5167 ) override {
5168 instance_->set_qualifiers(value);
5169 }
5170
5171 const common::optional<
5172 std::vector<
5173 std::shared_ptr<types::IEmbeddedDataSpecification>
5174 >
5175 >& embedded_data_specifications() const override {
5176 return instance_->embedded_data_specifications();
5177 }
5178
5179 common::optional<
5180 std::vector<
5181 std::shared_ptr<types::IEmbeddedDataSpecification>
5182 >
5183 >& mutable_embedded_data_specifications() override {
5184 return instance_->mutable_embedded_data_specifications();
5185 }
5186
5187 void set_embedded_data_specifications(
5188 common::optional<
5189 std::vector<
5190 std::shared_ptr<types::IEmbeddedDataSpecification>
5191 >
5192 > value
5193 ) override {
5194 instance_->set_embedded_data_specifications(value);
5195 }
5196
5197 const common::optional<
5198 std::vector<
5199 std::shared_ptr<types::ISubmodelElement>
5200 >
5201 >& statements() const override {
5202 return instance_->statements();
5203 }
5204
5205 common::optional<
5206 std::vector<
5207 std::shared_ptr<types::ISubmodelElement>
5208 >
5209 >& mutable_statements() override {
5210 return instance_->mutable_statements();
5211 }
5212
5213 void set_statements(
5214 common::optional<
5215 std::vector<
5216 std::shared_ptr<types::ISubmodelElement>
5217 >
5218 > value
5219 ) override {
5220 instance_->set_statements(value);
5221 }
5222
5223 types::EntityType entity_type() const override {
5224 return instance_->entity_type();
5225 }
5226
5227 types::EntityType& mutable_entity_type() override {
5228 return instance_->mutable_entity_type();
5229 }
5230
5231 void set_entity_type(
5232 types::EntityType value
5233 ) override {
5234 instance_->set_entity_type(value);
5235 }
5236
5237 const common::optional<std::wstring>& global_asset_id() const override {
5238 return instance_->global_asset_id();
5239 }
5240
5241 common::optional<std::wstring>& mutable_global_asset_id() override {
5242 return instance_->mutable_global_asset_id();
5243 }
5244
5245 void set_global_asset_id(
5246 common::optional<std::wstring> value
5247 ) override {
5248 instance_->set_global_asset_id(value);
5249 }
5250
5251 const common::optional<
5252 std::vector<
5253 std::shared_ptr<types::ISpecificAssetId>
5254 >
5255 >& specific_asset_ids() const override {
5256 return instance_->specific_asset_ids();
5257 }
5258
5259 common::optional<
5260 std::vector<
5261 std::shared_ptr<types::ISpecificAssetId>
5262 >
5263 >& mutable_specific_asset_ids() override {
5264 return instance_->mutable_specific_asset_ids();
5265 }
5266
5267 void set_specific_asset_ids(
5268 common::optional<
5269 std::vector<
5270 std::shared_ptr<types::ISpecificAssetId>
5271 >
5272 > value
5273 ) override {
5274 instance_->set_specific_asset_ids(value);
5275 }
5276
5277 const std::shared_ptr<E>& enhancement() const {
5278 return enhancement_;
5279 }
5280
5281 std::shared_ptr<E>& mutable_enhancement() {
5282 return enhancement_;
5283 }
5284
5285 void set_enhancement(
5286 std::shared_ptr<E> value
5287 ) {
5288 enhancement_ = std::move(value);
5289 }
5290
5291 EnhancedEntity(
5292 std::shared_ptr<types::IEntity> instance,
5293 std::shared_ptr<E> enhancement
5294 ) :
5295 instance_(instance),
5296 enhancement_(enhancement) {
5297 // Intentionally empty.
5298 }
5299
5300 virtual ~EnhancedEntity() = default;
5301
5302 private:
5303 std::shared_ptr<types::IEntity> instance_;
5304 std::shared_ptr<E> enhancement_;
5305};
5306
5307template<class E>
5308class EnhancedEventPayload
5309 : virtual public types::IEventPayload,
5310 virtual public IEnhanced<E> {
5311 public:
5312 types::ModelType model_type() const override {
5314 }
5315
5316 const std::shared_ptr<types::IReference>& source() const override {
5317 return instance_->source();
5318 }
5319
5320 std::shared_ptr<types::IReference>& mutable_source() override {
5321 return instance_->mutable_source();
5322 }
5323
5324 void set_source(
5325 std::shared_ptr<types::IReference> value
5326 ) override {
5327 instance_->set_source(value);
5328 }
5329
5330 const common::optional<
5331 std::shared_ptr<types::IReference>
5332 >& source_semantic_id() const override {
5333 return instance_->source_semantic_id();
5334 }
5335
5336 common::optional<
5337 std::shared_ptr<types::IReference>
5338 >& mutable_source_semantic_id() override {
5339 return instance_->mutable_source_semantic_id();
5340 }
5341
5342 void set_source_semantic_id(
5343 common::optional<
5344 std::shared_ptr<types::IReference>
5345 > value
5346 ) override {
5347 instance_->set_source_semantic_id(value);
5348 }
5349
5350 const std::shared_ptr<types::IReference>& observable_reference() const override {
5351 return instance_->observable_reference();
5352 }
5353
5354 std::shared_ptr<types::IReference>& mutable_observable_reference() override {
5355 return instance_->mutable_observable_reference();
5356 }
5357
5358 void set_observable_reference(
5359 std::shared_ptr<types::IReference> value
5360 ) override {
5361 instance_->set_observable_reference(value);
5362 }
5363
5364 const common::optional<
5365 std::shared_ptr<types::IReference>
5366 >& observable_semantic_id() const override {
5367 return instance_->observable_semantic_id();
5368 }
5369
5370 common::optional<
5371 std::shared_ptr<types::IReference>
5372 >& mutable_observable_semantic_id() override {
5373 return instance_->mutable_observable_semantic_id();
5374 }
5375
5376 void set_observable_semantic_id(
5377 common::optional<
5378 std::shared_ptr<types::IReference>
5379 > value
5380 ) override {
5381 instance_->set_observable_semantic_id(value);
5382 }
5383
5384 const common::optional<std::wstring>& topic() const override {
5385 return instance_->topic();
5386 }
5387
5388 common::optional<std::wstring>& mutable_topic() override {
5389 return instance_->mutable_topic();
5390 }
5391
5392 void set_topic(
5393 common::optional<std::wstring> value
5394 ) override {
5395 instance_->set_topic(value);
5396 }
5397
5398 const common::optional<
5399 std::shared_ptr<types::IReference>
5400 >& subject_id() const override {
5401 return instance_->subject_id();
5402 }
5403
5404 common::optional<
5405 std::shared_ptr<types::IReference>
5406 >& mutable_subject_id() override {
5407 return instance_->mutable_subject_id();
5408 }
5409
5410 void set_subject_id(
5411 common::optional<
5412 std::shared_ptr<types::IReference>
5413 > value
5414 ) override {
5415 instance_->set_subject_id(value);
5416 }
5417
5418 const std::wstring& time_stamp() const override {
5419 return instance_->time_stamp();
5420 }
5421
5422 std::wstring& mutable_time_stamp() override {
5423 return instance_->mutable_time_stamp();
5424 }
5425
5426 void set_time_stamp(
5427 std::wstring value
5428 ) override {
5429 instance_->set_time_stamp(value);
5430 }
5431
5432 const common::optional<
5433 std::vector<std::uint8_t>
5434 >& payload() const override {
5435 return instance_->payload();
5436 }
5437
5438 common::optional<
5439 std::vector<std::uint8_t>
5440 >& mutable_payload() override {
5441 return instance_->mutable_payload();
5442 }
5443
5444 void set_payload(
5445 common::optional<
5446 std::vector<std::uint8_t>
5447 > value
5448 ) override {
5449 instance_->set_payload(value);
5450 }
5451
5452 const std::shared_ptr<E>& enhancement() const {
5453 return enhancement_;
5454 }
5455
5456 std::shared_ptr<E>& mutable_enhancement() {
5457 return enhancement_;
5458 }
5459
5460 void set_enhancement(
5461 std::shared_ptr<E> value
5462 ) {
5463 enhancement_ = std::move(value);
5464 }
5465
5466 EnhancedEventPayload(
5467 std::shared_ptr<types::IEventPayload> instance,
5468 std::shared_ptr<E> enhancement
5469 ) :
5470 instance_(instance),
5471 enhancement_(enhancement) {
5472 // Intentionally empty.
5473 }
5474
5475 virtual ~EnhancedEventPayload() = default;
5476
5477 private:
5478 std::shared_ptr<types::IEventPayload> instance_;
5479 std::shared_ptr<E> enhancement_;
5480};
5481
5482template<class E>
5483class EnhancedBasicEventElement
5484 : virtual public types::IBasicEventElement,
5485 virtual public IEnhanced<E> {
5486 public:
5487 types::ModelType model_type() const override {
5489 }
5490
5491 const common::optional<
5492 std::vector<
5493 std::shared_ptr<types::IExtension>
5494 >
5495 >& extensions() const override {
5496 return instance_->extensions();
5497 }
5498
5499 common::optional<
5500 std::vector<
5501 std::shared_ptr<types::IExtension>
5502 >
5503 >& mutable_extensions() override {
5504 return instance_->mutable_extensions();
5505 }
5506
5507 void set_extensions(
5508 common::optional<
5509 std::vector<
5510 std::shared_ptr<types::IExtension>
5511 >
5512 > value
5513 ) override {
5514 instance_->set_extensions(value);
5515 }
5516
5517 const common::optional<std::wstring>& category() const override {
5518 return instance_->category();
5519 }
5520
5521 common::optional<std::wstring>& mutable_category() override {
5522 return instance_->mutable_category();
5523 }
5524
5525 void set_category(
5526 common::optional<std::wstring> value
5527 ) override {
5528 instance_->set_category(value);
5529 }
5530
5531 const common::optional<std::wstring>& id_short() const override {
5532 return instance_->id_short();
5533 }
5534
5535 common::optional<std::wstring>& mutable_id_short() override {
5536 return instance_->mutable_id_short();
5537 }
5538
5539 void set_id_short(
5540 common::optional<std::wstring> value
5541 ) override {
5542 instance_->set_id_short(value);
5543 }
5544
5545 const common::optional<
5546 std::vector<
5547 std::shared_ptr<types::ILangStringNameType>
5548 >
5549 >& display_name() const override {
5550 return instance_->display_name();
5551 }
5552
5553 common::optional<
5554 std::vector<
5555 std::shared_ptr<types::ILangStringNameType>
5556 >
5557 >& mutable_display_name() override {
5558 return instance_->mutable_display_name();
5559 }
5560
5561 void set_display_name(
5562 common::optional<
5563 std::vector<
5564 std::shared_ptr<types::ILangStringNameType>
5565 >
5566 > value
5567 ) override {
5568 instance_->set_display_name(value);
5569 }
5570
5571 const common::optional<
5572 std::vector<
5573 std::shared_ptr<types::ILangStringTextType>
5574 >
5575 >& description() const override {
5576 return instance_->description();
5577 }
5578
5579 common::optional<
5580 std::vector<
5581 std::shared_ptr<types::ILangStringTextType>
5582 >
5583 >& mutable_description() override {
5584 return instance_->mutable_description();
5585 }
5586
5587 void set_description(
5588 common::optional<
5589 std::vector<
5590 std::shared_ptr<types::ILangStringTextType>
5591 >
5592 > value
5593 ) override {
5594 instance_->set_description(value);
5595 }
5596
5597 const common::optional<
5598 std::shared_ptr<types::IReference>
5599 >& semantic_id() const override {
5600 return instance_->semantic_id();
5601 }
5602
5603 common::optional<
5604 std::shared_ptr<types::IReference>
5605 >& mutable_semantic_id() override {
5606 return instance_->mutable_semantic_id();
5607 }
5608
5609 void set_semantic_id(
5610 common::optional<
5611 std::shared_ptr<types::IReference>
5612 > value
5613 ) override {
5614 instance_->set_semantic_id(value);
5615 }
5616
5617 const common::optional<
5618 std::vector<
5619 std::shared_ptr<types::IReference>
5620 >
5621 >& supplemental_semantic_ids() const override {
5622 return instance_->supplemental_semantic_ids();
5623 }
5624
5625 common::optional<
5626 std::vector<
5627 std::shared_ptr<types::IReference>
5628 >
5629 >& mutable_supplemental_semantic_ids() override {
5630 return instance_->mutable_supplemental_semantic_ids();
5631 }
5632
5633 void set_supplemental_semantic_ids(
5634 common::optional<
5635 std::vector<
5636 std::shared_ptr<types::IReference>
5637 >
5638 > value
5639 ) override {
5640 instance_->set_supplemental_semantic_ids(value);
5641 }
5642
5643 const common::optional<
5644 std::vector<
5645 std::shared_ptr<types::IQualifier>
5646 >
5647 >& qualifiers() const override {
5648 return instance_->qualifiers();
5649 }
5650
5651 common::optional<
5652 std::vector<
5653 std::shared_ptr<types::IQualifier>
5654 >
5655 >& mutable_qualifiers() override {
5656 return instance_->mutable_qualifiers();
5657 }
5658
5659 void set_qualifiers(
5660 common::optional<
5661 std::vector<
5662 std::shared_ptr<types::IQualifier>
5663 >
5664 > value
5665 ) override {
5666 instance_->set_qualifiers(value);
5667 }
5668
5669 const common::optional<
5670 std::vector<
5671 std::shared_ptr<types::IEmbeddedDataSpecification>
5672 >
5673 >& embedded_data_specifications() const override {
5674 return instance_->embedded_data_specifications();
5675 }
5676
5677 common::optional<
5678 std::vector<
5679 std::shared_ptr<types::IEmbeddedDataSpecification>
5680 >
5681 >& mutable_embedded_data_specifications() override {
5682 return instance_->mutable_embedded_data_specifications();
5683 }
5684
5685 void set_embedded_data_specifications(
5686 common::optional<
5687 std::vector<
5688 std::shared_ptr<types::IEmbeddedDataSpecification>
5689 >
5690 > value
5691 ) override {
5692 instance_->set_embedded_data_specifications(value);
5693 }
5694
5695 const std::shared_ptr<types::IReference>& observed() const override {
5696 return instance_->observed();
5697 }
5698
5699 std::shared_ptr<types::IReference>& mutable_observed() override {
5700 return instance_->mutable_observed();
5701 }
5702
5703 void set_observed(
5704 std::shared_ptr<types::IReference> value
5705 ) override {
5706 instance_->set_observed(value);
5707 }
5708
5709 types::Direction direction() const override {
5710 return instance_->direction();
5711 }
5712
5713 types::Direction& mutable_direction() override {
5714 return instance_->mutable_direction();
5715 }
5716
5717 void set_direction(
5718 types::Direction value
5719 ) override {
5720 instance_->set_direction(value);
5721 }
5722
5723 types::StateOfEvent state() const override {
5724 return instance_->state();
5725 }
5726
5727 types::StateOfEvent& mutable_state() override {
5728 return instance_->mutable_state();
5729 }
5730
5731 void set_state(
5733 ) override {
5734 instance_->set_state(value);
5735 }
5736
5737 const common::optional<std::wstring>& message_topic() const override {
5738 return instance_->message_topic();
5739 }
5740
5741 common::optional<std::wstring>& mutable_message_topic() override {
5742 return instance_->mutable_message_topic();
5743 }
5744
5745 void set_message_topic(
5746 common::optional<std::wstring> value
5747 ) override {
5748 instance_->set_message_topic(value);
5749 }
5750
5751 const common::optional<
5752 std::shared_ptr<types::IReference>
5753 >& message_broker() const override {
5754 return instance_->message_broker();
5755 }
5756
5757 common::optional<
5758 std::shared_ptr<types::IReference>
5759 >& mutable_message_broker() override {
5760 return instance_->mutable_message_broker();
5761 }
5762
5763 void set_message_broker(
5764 common::optional<
5765 std::shared_ptr<types::IReference>
5766 > value
5767 ) override {
5768 instance_->set_message_broker(value);
5769 }
5770
5771 const common::optional<std::wstring>& last_update() const override {
5772 return instance_->last_update();
5773 }
5774
5775 common::optional<std::wstring>& mutable_last_update() override {
5776 return instance_->mutable_last_update();
5777 }
5778
5779 void set_last_update(
5780 common::optional<std::wstring> value
5781 ) override {
5782 instance_->set_last_update(value);
5783 }
5784
5785 const common::optional<std::wstring>& min_interval() const override {
5786 return instance_->min_interval();
5787 }
5788
5789 common::optional<std::wstring>& mutable_min_interval() override {
5790 return instance_->mutable_min_interval();
5791 }
5792
5793 void set_min_interval(
5794 common::optional<std::wstring> value
5795 ) override {
5796 instance_->set_min_interval(value);
5797 }
5798
5799 const common::optional<std::wstring>& max_interval() const override {
5800 return instance_->max_interval();
5801 }
5802
5803 common::optional<std::wstring>& mutable_max_interval() override {
5804 return instance_->mutable_max_interval();
5805 }
5806
5807 void set_max_interval(
5808 common::optional<std::wstring> value
5809 ) override {
5810 instance_->set_max_interval(value);
5811 }
5812
5813 const std::shared_ptr<E>& enhancement() const {
5814 return enhancement_;
5815 }
5816
5817 std::shared_ptr<E>& mutable_enhancement() {
5818 return enhancement_;
5819 }
5820
5821 void set_enhancement(
5822 std::shared_ptr<E> value
5823 ) {
5824 enhancement_ = std::move(value);
5825 }
5826
5827 EnhancedBasicEventElement(
5828 std::shared_ptr<types::IBasicEventElement> instance,
5829 std::shared_ptr<E> enhancement
5830 ) :
5831 instance_(instance),
5832 enhancement_(enhancement) {
5833 // Intentionally empty.
5834 }
5835
5836 virtual ~EnhancedBasicEventElement() = default;
5837
5838 private:
5839 std::shared_ptr<types::IBasicEventElement> instance_;
5840 std::shared_ptr<E> enhancement_;
5841};
5842
5843template<class E>
5844class EnhancedOperation
5845 : virtual public types::IOperation,
5846 virtual public IEnhanced<E> {
5847 public:
5848 types::ModelType model_type() const override {
5850 }
5851
5852 const common::optional<
5853 std::vector<
5854 std::shared_ptr<types::IExtension>
5855 >
5856 >& extensions() const override {
5857 return instance_->extensions();
5858 }
5859
5860 common::optional<
5861 std::vector<
5862 std::shared_ptr<types::IExtension>
5863 >
5864 >& mutable_extensions() override {
5865 return instance_->mutable_extensions();
5866 }
5867
5868 void set_extensions(
5869 common::optional<
5870 std::vector<
5871 std::shared_ptr<types::IExtension>
5872 >
5873 > value
5874 ) override {
5875 instance_->set_extensions(value);
5876 }
5877
5878 const common::optional<std::wstring>& category() const override {
5879 return instance_->category();
5880 }
5881
5882 common::optional<std::wstring>& mutable_category() override {
5883 return instance_->mutable_category();
5884 }
5885
5886 void set_category(
5887 common::optional<std::wstring> value
5888 ) override {
5889 instance_->set_category(value);
5890 }
5891
5892 const common::optional<std::wstring>& id_short() const override {
5893 return instance_->id_short();
5894 }
5895
5896 common::optional<std::wstring>& mutable_id_short() override {
5897 return instance_->mutable_id_short();
5898 }
5899
5900 void set_id_short(
5901 common::optional<std::wstring> value
5902 ) override {
5903 instance_->set_id_short(value);
5904 }
5905
5906 const common::optional<
5907 std::vector<
5908 std::shared_ptr<types::ILangStringNameType>
5909 >
5910 >& display_name() const override {
5911 return instance_->display_name();
5912 }
5913
5914 common::optional<
5915 std::vector<
5916 std::shared_ptr<types::ILangStringNameType>
5917 >
5918 >& mutable_display_name() override {
5919 return instance_->mutable_display_name();
5920 }
5921
5922 void set_display_name(
5923 common::optional<
5924 std::vector<
5925 std::shared_ptr<types::ILangStringNameType>
5926 >
5927 > value
5928 ) override {
5929 instance_->set_display_name(value);
5930 }
5931
5932 const common::optional<
5933 std::vector<
5934 std::shared_ptr<types::ILangStringTextType>
5935 >
5936 >& description() const override {
5937 return instance_->description();
5938 }
5939
5940 common::optional<
5941 std::vector<
5942 std::shared_ptr<types::ILangStringTextType>
5943 >
5944 >& mutable_description() override {
5945 return instance_->mutable_description();
5946 }
5947
5948 void set_description(
5949 common::optional<
5950 std::vector<
5951 std::shared_ptr<types::ILangStringTextType>
5952 >
5953 > value
5954 ) override {
5955 instance_->set_description(value);
5956 }
5957
5958 const common::optional<
5959 std::shared_ptr<types::IReference>
5960 >& semantic_id() const override {
5961 return instance_->semantic_id();
5962 }
5963
5964 common::optional<
5965 std::shared_ptr<types::IReference>
5966 >& mutable_semantic_id() override {
5967 return instance_->mutable_semantic_id();
5968 }
5969
5970 void set_semantic_id(
5971 common::optional<
5972 std::shared_ptr<types::IReference>
5973 > value
5974 ) override {
5975 instance_->set_semantic_id(value);
5976 }
5977
5978 const common::optional<
5979 std::vector<
5980 std::shared_ptr<types::IReference>
5981 >
5982 >& supplemental_semantic_ids() const override {
5983 return instance_->supplemental_semantic_ids();
5984 }
5985
5986 common::optional<
5987 std::vector<
5988 std::shared_ptr<types::IReference>
5989 >
5990 >& mutable_supplemental_semantic_ids() override {
5991 return instance_->mutable_supplemental_semantic_ids();
5992 }
5993
5994 void set_supplemental_semantic_ids(
5995 common::optional<
5996 std::vector<
5997 std::shared_ptr<types::IReference>
5998 >
5999 > value
6000 ) override {
6001 instance_->set_supplemental_semantic_ids(value);
6002 }
6003
6004 const common::optional<
6005 std::vector<
6006 std::shared_ptr<types::IQualifier>
6007 >
6008 >& qualifiers() const override {
6009 return instance_->qualifiers();
6010 }
6011
6012 common::optional<
6013 std::vector<
6014 std::shared_ptr<types::IQualifier>
6015 >
6016 >& mutable_qualifiers() override {
6017 return instance_->mutable_qualifiers();
6018 }
6019
6020 void set_qualifiers(
6021 common::optional<
6022 std::vector<
6023 std::shared_ptr<types::IQualifier>
6024 >
6025 > value
6026 ) override {
6027 instance_->set_qualifiers(value);
6028 }
6029
6030 const common::optional<
6031 std::vector<
6032 std::shared_ptr<types::IEmbeddedDataSpecification>
6033 >
6034 >& embedded_data_specifications() const override {
6035 return instance_->embedded_data_specifications();
6036 }
6037
6038 common::optional<
6039 std::vector<
6040 std::shared_ptr<types::IEmbeddedDataSpecification>
6041 >
6042 >& mutable_embedded_data_specifications() override {
6043 return instance_->mutable_embedded_data_specifications();
6044 }
6045
6046 void set_embedded_data_specifications(
6047 common::optional<
6048 std::vector<
6049 std::shared_ptr<types::IEmbeddedDataSpecification>
6050 >
6051 > value
6052 ) override {
6053 instance_->set_embedded_data_specifications(value);
6054 }
6055
6056 const common::optional<
6057 std::vector<
6058 std::shared_ptr<types::IOperationVariable>
6059 >
6060 >& input_variables() const override {
6061 return instance_->input_variables();
6062 }
6063
6064 common::optional<
6065 std::vector<
6066 std::shared_ptr<types::IOperationVariable>
6067 >
6068 >& mutable_input_variables() override {
6069 return instance_->mutable_input_variables();
6070 }
6071
6072 void set_input_variables(
6073 common::optional<
6074 std::vector<
6075 std::shared_ptr<types::IOperationVariable>
6076 >
6077 > value
6078 ) override {
6079 instance_->set_input_variables(value);
6080 }
6081
6082 const common::optional<
6083 std::vector<
6084 std::shared_ptr<types::IOperationVariable>
6085 >
6086 >& output_variables() const override {
6087 return instance_->output_variables();
6088 }
6089
6090 common::optional<
6091 std::vector<
6092 std::shared_ptr<types::IOperationVariable>
6093 >
6094 >& mutable_output_variables() override {
6095 return instance_->mutable_output_variables();
6096 }
6097
6098 void set_output_variables(
6099 common::optional<
6100 std::vector<
6101 std::shared_ptr<types::IOperationVariable>
6102 >
6103 > value
6104 ) override {
6105 instance_->set_output_variables(value);
6106 }
6107
6108 const common::optional<
6109 std::vector<
6110 std::shared_ptr<types::IOperationVariable>
6111 >
6112 >& inoutput_variables() const override {
6113 return instance_->inoutput_variables();
6114 }
6115
6116 common::optional<
6117 std::vector<
6118 std::shared_ptr<types::IOperationVariable>
6119 >
6120 >& mutable_inoutput_variables() override {
6121 return instance_->mutable_inoutput_variables();
6122 }
6123
6124 void set_inoutput_variables(
6125 common::optional<
6126 std::vector<
6127 std::shared_ptr<types::IOperationVariable>
6128 >
6129 > value
6130 ) override {
6131 instance_->set_inoutput_variables(value);
6132 }
6133
6134 const std::shared_ptr<E>& enhancement() const {
6135 return enhancement_;
6136 }
6137
6138 std::shared_ptr<E>& mutable_enhancement() {
6139 return enhancement_;
6140 }
6141
6142 void set_enhancement(
6143 std::shared_ptr<E> value
6144 ) {
6145 enhancement_ = std::move(value);
6146 }
6147
6148 EnhancedOperation(
6149 std::shared_ptr<types::IOperation> instance,
6150 std::shared_ptr<E> enhancement
6151 ) :
6152 instance_(instance),
6153 enhancement_(enhancement) {
6154 // Intentionally empty.
6155 }
6156
6157 virtual ~EnhancedOperation() = default;
6158
6159 private:
6160 std::shared_ptr<types::IOperation> instance_;
6161 std::shared_ptr<E> enhancement_;
6162};
6163
6164template<class E>
6165class EnhancedOperationVariable
6166 : virtual public types::IOperationVariable,
6167 virtual public IEnhanced<E> {
6168 public:
6169 types::ModelType model_type() const override {
6171 }
6172
6173 const std::shared_ptr<types::ISubmodelElement>& value() const override {
6174 return instance_->value();
6175 }
6176
6177 std::shared_ptr<types::ISubmodelElement>& mutable_value() override {
6178 return instance_->mutable_value();
6179 }
6180
6181 void set_value(
6182 std::shared_ptr<types::ISubmodelElement> value
6183 ) override {
6184 instance_->set_value(value);
6185 }
6186
6187 const std::shared_ptr<E>& enhancement() const {
6188 return enhancement_;
6189 }
6190
6191 std::shared_ptr<E>& mutable_enhancement() {
6192 return enhancement_;
6193 }
6194
6195 void set_enhancement(
6196 std::shared_ptr<E> value
6197 ) {
6198 enhancement_ = std::move(value);
6199 }
6200
6201 EnhancedOperationVariable(
6202 std::shared_ptr<types::IOperationVariable> instance,
6203 std::shared_ptr<E> enhancement
6204 ) :
6205 instance_(instance),
6206 enhancement_(enhancement) {
6207 // Intentionally empty.
6208 }
6209
6210 virtual ~EnhancedOperationVariable() = default;
6211
6212 private:
6213 std::shared_ptr<types::IOperationVariable> instance_;
6214 std::shared_ptr<E> enhancement_;
6215};
6216
6217template<class E>
6218class EnhancedCapability
6219 : virtual public types::ICapability,
6220 virtual public IEnhanced<E> {
6221 public:
6222 types::ModelType model_type() const override {
6224 }
6225
6226 const common::optional<
6227 std::vector<
6228 std::shared_ptr<types::IExtension>
6229 >
6230 >& extensions() const override {
6231 return instance_->extensions();
6232 }
6233
6234 common::optional<
6235 std::vector<
6236 std::shared_ptr<types::IExtension>
6237 >
6238 >& mutable_extensions() override {
6239 return instance_->mutable_extensions();
6240 }
6241
6242 void set_extensions(
6243 common::optional<
6244 std::vector<
6245 std::shared_ptr<types::IExtension>
6246 >
6247 > value
6248 ) override {
6249 instance_->set_extensions(value);
6250 }
6251
6252 const common::optional<std::wstring>& category() const override {
6253 return instance_->category();
6254 }
6255
6256 common::optional<std::wstring>& mutable_category() override {
6257 return instance_->mutable_category();
6258 }
6259
6260 void set_category(
6261 common::optional<std::wstring> value
6262 ) override {
6263 instance_->set_category(value);
6264 }
6265
6266 const common::optional<std::wstring>& id_short() const override {
6267 return instance_->id_short();
6268 }
6269
6270 common::optional<std::wstring>& mutable_id_short() override {
6271 return instance_->mutable_id_short();
6272 }
6273
6274 void set_id_short(
6275 common::optional<std::wstring> value
6276 ) override {
6277 instance_->set_id_short(value);
6278 }
6279
6280 const common::optional<
6281 std::vector<
6282 std::shared_ptr<types::ILangStringNameType>
6283 >
6284 >& display_name() const override {
6285 return instance_->display_name();
6286 }
6287
6288 common::optional<
6289 std::vector<
6290 std::shared_ptr<types::ILangStringNameType>
6291 >
6292 >& mutable_display_name() override {
6293 return instance_->mutable_display_name();
6294 }
6295
6296 void set_display_name(
6297 common::optional<
6298 std::vector<
6299 std::shared_ptr<types::ILangStringNameType>
6300 >
6301 > value
6302 ) override {
6303 instance_->set_display_name(value);
6304 }
6305
6306 const common::optional<
6307 std::vector<
6308 std::shared_ptr<types::ILangStringTextType>
6309 >
6310 >& description() const override {
6311 return instance_->description();
6312 }
6313
6314 common::optional<
6315 std::vector<
6316 std::shared_ptr<types::ILangStringTextType>
6317 >
6318 >& mutable_description() override {
6319 return instance_->mutable_description();
6320 }
6321
6322 void set_description(
6323 common::optional<
6324 std::vector<
6325 std::shared_ptr<types::ILangStringTextType>
6326 >
6327 > value
6328 ) override {
6329 instance_->set_description(value);
6330 }
6331
6332 const common::optional<
6333 std::shared_ptr<types::IReference>
6334 >& semantic_id() const override {
6335 return instance_->semantic_id();
6336 }
6337
6338 common::optional<
6339 std::shared_ptr<types::IReference>
6340 >& mutable_semantic_id() override {
6341 return instance_->mutable_semantic_id();
6342 }
6343
6344 void set_semantic_id(
6345 common::optional<
6346 std::shared_ptr<types::IReference>
6347 > value
6348 ) override {
6349 instance_->set_semantic_id(value);
6350 }
6351
6352 const common::optional<
6353 std::vector<
6354 std::shared_ptr<types::IReference>
6355 >
6356 >& supplemental_semantic_ids() const override {
6357 return instance_->supplemental_semantic_ids();
6358 }
6359
6360 common::optional<
6361 std::vector<
6362 std::shared_ptr<types::IReference>
6363 >
6364 >& mutable_supplemental_semantic_ids() override {
6365 return instance_->mutable_supplemental_semantic_ids();
6366 }
6367
6368 void set_supplemental_semantic_ids(
6369 common::optional<
6370 std::vector<
6371 std::shared_ptr<types::IReference>
6372 >
6373 > value
6374 ) override {
6375 instance_->set_supplemental_semantic_ids(value);
6376 }
6377
6378 const common::optional<
6379 std::vector<
6380 std::shared_ptr<types::IQualifier>
6381 >
6382 >& qualifiers() const override {
6383 return instance_->qualifiers();
6384 }
6385
6386 common::optional<
6387 std::vector<
6388 std::shared_ptr<types::IQualifier>
6389 >
6390 >& mutable_qualifiers() override {
6391 return instance_->mutable_qualifiers();
6392 }
6393
6394 void set_qualifiers(
6395 common::optional<
6396 std::vector<
6397 std::shared_ptr<types::IQualifier>
6398 >
6399 > value
6400 ) override {
6401 instance_->set_qualifiers(value);
6402 }
6403
6404 const common::optional<
6405 std::vector<
6406 std::shared_ptr<types::IEmbeddedDataSpecification>
6407 >
6408 >& embedded_data_specifications() const override {
6409 return instance_->embedded_data_specifications();
6410 }
6411
6412 common::optional<
6413 std::vector<
6414 std::shared_ptr<types::IEmbeddedDataSpecification>
6415 >
6416 >& mutable_embedded_data_specifications() override {
6417 return instance_->mutable_embedded_data_specifications();
6418 }
6419
6420 void set_embedded_data_specifications(
6421 common::optional<
6422 std::vector<
6423 std::shared_ptr<types::IEmbeddedDataSpecification>
6424 >
6425 > value
6426 ) override {
6427 instance_->set_embedded_data_specifications(value);
6428 }
6429
6430 const std::shared_ptr<E>& enhancement() const {
6431 return enhancement_;
6432 }
6433
6434 std::shared_ptr<E>& mutable_enhancement() {
6435 return enhancement_;
6436 }
6437
6438 void set_enhancement(
6439 std::shared_ptr<E> value
6440 ) {
6441 enhancement_ = std::move(value);
6442 }
6443
6444 EnhancedCapability(
6445 std::shared_ptr<types::ICapability> instance,
6446 std::shared_ptr<E> enhancement
6447 ) :
6448 instance_(instance),
6449 enhancement_(enhancement) {
6450 // Intentionally empty.
6451 }
6452
6453 virtual ~EnhancedCapability() = default;
6454
6455 private:
6456 std::shared_ptr<types::ICapability> instance_;
6457 std::shared_ptr<E> enhancement_;
6458};
6459
6460template<class E>
6461class EnhancedConceptDescription
6462 : virtual public types::IConceptDescription,
6463 virtual public IEnhanced<E> {
6464 public:
6465 types::ModelType model_type() const override {
6467 }
6468
6469 const common::optional<
6470 std::vector<
6471 std::shared_ptr<types::IExtension>
6472 >
6473 >& extensions() const override {
6474 return instance_->extensions();
6475 }
6476
6477 common::optional<
6478 std::vector<
6479 std::shared_ptr<types::IExtension>
6480 >
6481 >& mutable_extensions() override {
6482 return instance_->mutable_extensions();
6483 }
6484
6485 void set_extensions(
6486 common::optional<
6487 std::vector<
6488 std::shared_ptr<types::IExtension>
6489 >
6490 > value
6491 ) override {
6492 instance_->set_extensions(value);
6493 }
6494
6495 const common::optional<std::wstring>& category() const override {
6496 return instance_->category();
6497 }
6498
6499 common::optional<std::wstring>& mutable_category() override {
6500 return instance_->mutable_category();
6501 }
6502
6503 void set_category(
6504 common::optional<std::wstring> value
6505 ) override {
6506 instance_->set_category(value);
6507 }
6508
6509 const common::optional<std::wstring>& id_short() const override {
6510 return instance_->id_short();
6511 }
6512
6513 common::optional<std::wstring>& mutable_id_short() override {
6514 return instance_->mutable_id_short();
6515 }
6516
6517 void set_id_short(
6518 common::optional<std::wstring> value
6519 ) override {
6520 instance_->set_id_short(value);
6521 }
6522
6523 const common::optional<
6524 std::vector<
6525 std::shared_ptr<types::ILangStringNameType>
6526 >
6527 >& display_name() const override {
6528 return instance_->display_name();
6529 }
6530
6531 common::optional<
6532 std::vector<
6533 std::shared_ptr<types::ILangStringNameType>
6534 >
6535 >& mutable_display_name() override {
6536 return instance_->mutable_display_name();
6537 }
6538
6539 void set_display_name(
6540 common::optional<
6541 std::vector<
6542 std::shared_ptr<types::ILangStringNameType>
6543 >
6544 > value
6545 ) override {
6546 instance_->set_display_name(value);
6547 }
6548
6549 const common::optional<
6550 std::vector<
6551 std::shared_ptr<types::ILangStringTextType>
6552 >
6553 >& description() const override {
6554 return instance_->description();
6555 }
6556
6557 common::optional<
6558 std::vector<
6559 std::shared_ptr<types::ILangStringTextType>
6560 >
6561 >& mutable_description() override {
6562 return instance_->mutable_description();
6563 }
6564
6565 void set_description(
6566 common::optional<
6567 std::vector<
6568 std::shared_ptr<types::ILangStringTextType>
6569 >
6570 > value
6571 ) override {
6572 instance_->set_description(value);
6573 }
6574
6575 const common::optional<
6576 std::shared_ptr<types::IAdministrativeInformation>
6577 >& administration() const override {
6578 return instance_->administration();
6579 }
6580
6581 common::optional<
6582 std::shared_ptr<types::IAdministrativeInformation>
6583 >& mutable_administration() override {
6584 return instance_->mutable_administration();
6585 }
6586
6587 void set_administration(
6588 common::optional<
6589 std::shared_ptr<types::IAdministrativeInformation>
6590 > value
6591 ) override {
6592 instance_->set_administration(value);
6593 }
6594
6595 const std::wstring& id() const override {
6596 return instance_->id();
6597 }
6598
6599 std::wstring& mutable_id() override {
6600 return instance_->mutable_id();
6601 }
6602
6603 void set_id(
6604 std::wstring value
6605 ) override {
6606 instance_->set_id(value);
6607 }
6608
6609 const common::optional<
6610 std::vector<
6611 std::shared_ptr<types::IEmbeddedDataSpecification>
6612 >
6613 >& embedded_data_specifications() const override {
6614 return instance_->embedded_data_specifications();
6615 }
6616
6617 common::optional<
6618 std::vector<
6619 std::shared_ptr<types::IEmbeddedDataSpecification>
6620 >
6621 >& mutable_embedded_data_specifications() override {
6622 return instance_->mutable_embedded_data_specifications();
6623 }
6624
6625 void set_embedded_data_specifications(
6626 common::optional<
6627 std::vector<
6628 std::shared_ptr<types::IEmbeddedDataSpecification>
6629 >
6630 > value
6631 ) override {
6632 instance_->set_embedded_data_specifications(value);
6633 }
6634
6635 const common::optional<
6636 std::vector<
6637 std::shared_ptr<types::IReference>
6638 >
6639 >& is_case_of() const override {
6640 return instance_->is_case_of();
6641 }
6642
6643 common::optional<
6644 std::vector<
6645 std::shared_ptr<types::IReference>
6646 >
6647 >& mutable_is_case_of() override {
6648 return instance_->mutable_is_case_of();
6649 }
6650
6651 void set_is_case_of(
6652 common::optional<
6653 std::vector<
6654 std::shared_ptr<types::IReference>
6655 >
6656 > value
6657 ) override {
6658 instance_->set_is_case_of(value);
6659 }
6660
6661 const std::shared_ptr<E>& enhancement() const {
6662 return enhancement_;
6663 }
6664
6665 std::shared_ptr<E>& mutable_enhancement() {
6666 return enhancement_;
6667 }
6668
6669 void set_enhancement(
6670 std::shared_ptr<E> value
6671 ) {
6672 enhancement_ = std::move(value);
6673 }
6674
6675 EnhancedConceptDescription(
6676 std::shared_ptr<types::IConceptDescription> instance,
6677 std::shared_ptr<E> enhancement
6678 ) :
6679 instance_(instance),
6680 enhancement_(enhancement) {
6681 // Intentionally empty.
6682 }
6683
6684 virtual ~EnhancedConceptDescription() = default;
6685
6686 private:
6687 std::shared_ptr<types::IConceptDescription> instance_;
6688 std::shared_ptr<E> enhancement_;
6689};
6690
6691template<class E>
6692class EnhancedReference
6693 : virtual public types::IReference,
6694 virtual public IEnhanced<E> {
6695 public:
6696 types::ModelType model_type() const override {
6698 }
6699
6700 types::ReferenceTypes type() const override {
6701 return instance_->type();
6702 }
6703
6704 types::ReferenceTypes& mutable_type() override {
6705 return instance_->mutable_type();
6706 }
6707
6708 void set_type(
6710 ) override {
6711 instance_->set_type(value);
6712 }
6713
6714 const common::optional<
6715 std::shared_ptr<types::IReference>
6716 >& referred_semantic_id() const override {
6717 return instance_->referred_semantic_id();
6718 }
6719
6720 common::optional<
6721 std::shared_ptr<types::IReference>
6722 >& mutable_referred_semantic_id() override {
6723 return instance_->mutable_referred_semantic_id();
6724 }
6725
6726 void set_referred_semantic_id(
6727 common::optional<
6728 std::shared_ptr<types::IReference>
6729 > value
6730 ) override {
6731 instance_->set_referred_semantic_id(value);
6732 }
6733
6734 const std::vector<
6735 std::shared_ptr<types::IKey>
6736 >& keys() const override {
6737 return instance_->keys();
6738 }
6739
6740 std::vector<
6741 std::shared_ptr<types::IKey>
6742 >& mutable_keys() override {
6743 return instance_->mutable_keys();
6744 }
6745
6746 void set_keys(
6747 std::vector<
6748 std::shared_ptr<types::IKey>
6749 > value
6750 ) override {
6751 instance_->set_keys(value);
6752 }
6753
6754 const std::shared_ptr<E>& enhancement() const {
6755 return enhancement_;
6756 }
6757
6758 std::shared_ptr<E>& mutable_enhancement() {
6759 return enhancement_;
6760 }
6761
6762 void set_enhancement(
6763 std::shared_ptr<E> value
6764 ) {
6765 enhancement_ = std::move(value);
6766 }
6767
6768 EnhancedReference(
6769 std::shared_ptr<types::IReference> instance,
6770 std::shared_ptr<E> enhancement
6771 ) :
6772 instance_(instance),
6773 enhancement_(enhancement) {
6774 // Intentionally empty.
6775 }
6776
6777 virtual ~EnhancedReference() = default;
6778
6779 private:
6780 std::shared_ptr<types::IReference> instance_;
6781 std::shared_ptr<E> enhancement_;
6782};
6783
6784template<class E>
6785class EnhancedKey
6786 : virtual public types::IKey,
6787 virtual public IEnhanced<E> {
6788 public:
6789 types::ModelType model_type() const override {
6791 }
6792
6793 types::KeyTypes type() const override {
6794 return instance_->type();
6795 }
6796
6797 types::KeyTypes& mutable_type() override {
6798 return instance_->mutable_type();
6799 }
6800
6801 void set_type(
6802 types::KeyTypes value
6803 ) override {
6804 instance_->set_type(value);
6805 }
6806
6807 const std::wstring& value() const override {
6808 return instance_->value();
6809 }
6810
6811 std::wstring& mutable_value() override {
6812 return instance_->mutable_value();
6813 }
6814
6815 void set_value(
6816 std::wstring value
6817 ) override {
6818 instance_->set_value(value);
6819 }
6820
6821 const std::shared_ptr<E>& enhancement() const {
6822 return enhancement_;
6823 }
6824
6825 std::shared_ptr<E>& mutable_enhancement() {
6826 return enhancement_;
6827 }
6828
6829 void set_enhancement(
6830 std::shared_ptr<E> value
6831 ) {
6832 enhancement_ = std::move(value);
6833 }
6834
6835 EnhancedKey(
6836 std::shared_ptr<types::IKey> instance,
6837 std::shared_ptr<E> enhancement
6838 ) :
6839 instance_(instance),
6840 enhancement_(enhancement) {
6841 // Intentionally empty.
6842 }
6843
6844 virtual ~EnhancedKey() = default;
6845
6846 private:
6847 std::shared_ptr<types::IKey> instance_;
6848 std::shared_ptr<E> enhancement_;
6849};
6850
6851template<class E>
6852class EnhancedLangStringNameType
6853 : virtual public types::ILangStringNameType,
6854 virtual public IEnhanced<E> {
6855 public:
6856 types::ModelType model_type() const override {
6858 }
6859
6860 const std::wstring& language() const override {
6861 return instance_->language();
6862 }
6863
6864 std::wstring& mutable_language() override {
6865 return instance_->mutable_language();
6866 }
6867
6868 void set_language(
6869 std::wstring value
6870 ) override {
6871 instance_->set_language(value);
6872 }
6873
6874 const std::wstring& text() const override {
6875 return instance_->text();
6876 }
6877
6878 std::wstring& mutable_text() override {
6879 return instance_->mutable_text();
6880 }
6881
6882 void set_text(
6883 std::wstring value
6884 ) override {
6885 instance_->set_text(value);
6886 }
6887
6888 const std::shared_ptr<E>& enhancement() const {
6889 return enhancement_;
6890 }
6891
6892 std::shared_ptr<E>& mutable_enhancement() {
6893 return enhancement_;
6894 }
6895
6896 void set_enhancement(
6897 std::shared_ptr<E> value
6898 ) {
6899 enhancement_ = std::move(value);
6900 }
6901
6902 EnhancedLangStringNameType(
6903 std::shared_ptr<types::ILangStringNameType> instance,
6904 std::shared_ptr<E> enhancement
6905 ) :
6906 instance_(instance),
6907 enhancement_(enhancement) {
6908 // Intentionally empty.
6909 }
6910
6911 virtual ~EnhancedLangStringNameType() = default;
6912
6913 private:
6914 std::shared_ptr<types::ILangStringNameType> instance_;
6915 std::shared_ptr<E> enhancement_;
6916};
6917
6918template<class E>
6919class EnhancedLangStringTextType
6920 : virtual public types::ILangStringTextType,
6921 virtual public IEnhanced<E> {
6922 public:
6923 types::ModelType model_type() const override {
6925 }
6926
6927 const std::wstring& language() const override {
6928 return instance_->language();
6929 }
6930
6931 std::wstring& mutable_language() override {
6932 return instance_->mutable_language();
6933 }
6934
6935 void set_language(
6936 std::wstring value
6937 ) override {
6938 instance_->set_language(value);
6939 }
6940
6941 const std::wstring& text() const override {
6942 return instance_->text();
6943 }
6944
6945 std::wstring& mutable_text() override {
6946 return instance_->mutable_text();
6947 }
6948
6949 void set_text(
6950 std::wstring value
6951 ) override {
6952 instance_->set_text(value);
6953 }
6954
6955 const std::shared_ptr<E>& enhancement() const {
6956 return enhancement_;
6957 }
6958
6959 std::shared_ptr<E>& mutable_enhancement() {
6960 return enhancement_;
6961 }
6962
6963 void set_enhancement(
6964 std::shared_ptr<E> value
6965 ) {
6966 enhancement_ = std::move(value);
6967 }
6968
6969 EnhancedLangStringTextType(
6970 std::shared_ptr<types::ILangStringTextType> instance,
6971 std::shared_ptr<E> enhancement
6972 ) :
6973 instance_(instance),
6974 enhancement_(enhancement) {
6975 // Intentionally empty.
6976 }
6977
6978 virtual ~EnhancedLangStringTextType() = default;
6979
6980 private:
6981 std::shared_ptr<types::ILangStringTextType> instance_;
6982 std::shared_ptr<E> enhancement_;
6983};
6984
6985template<class E>
6986class EnhancedEnvironment
6987 : virtual public types::IEnvironment,
6988 virtual public IEnhanced<E> {
6989 public:
6990 types::ModelType model_type() const override {
6992 }
6993
6994 const common::optional<
6995 std::vector<
6996 std::shared_ptr<types::IAssetAdministrationShell>
6997 >
6998 >& asset_administration_shells() const override {
6999 return instance_->asset_administration_shells();
7000 }
7001
7002 common::optional<
7003 std::vector<
7004 std::shared_ptr<types::IAssetAdministrationShell>
7005 >
7006 >& mutable_asset_administration_shells() override {
7007 return instance_->mutable_asset_administration_shells();
7008 }
7009
7010 void set_asset_administration_shells(
7011 common::optional<
7012 std::vector<
7013 std::shared_ptr<types::IAssetAdministrationShell>
7014 >
7015 > value
7016 ) override {
7017 instance_->set_asset_administration_shells(value);
7018 }
7019
7020 const common::optional<
7021 std::vector<
7022 std::shared_ptr<types::ISubmodel>
7023 >
7024 >& submodels() const override {
7025 return instance_->submodels();
7026 }
7027
7028 common::optional<
7029 std::vector<
7030 std::shared_ptr<types::ISubmodel>
7031 >
7032 >& mutable_submodels() override {
7033 return instance_->mutable_submodels();
7034 }
7035
7036 void set_submodels(
7037 common::optional<
7038 std::vector<
7039 std::shared_ptr<types::ISubmodel>
7040 >
7041 > value
7042 ) override {
7043 instance_->set_submodels(value);
7044 }
7045
7046 const common::optional<
7047 std::vector<
7048 std::shared_ptr<types::IConceptDescription>
7049 >
7050 >& concept_descriptions() const override {
7051 return instance_->concept_descriptions();
7052 }
7053
7054 common::optional<
7055 std::vector<
7056 std::shared_ptr<types::IConceptDescription>
7057 >
7058 >& mutable_concept_descriptions() override {
7059 return instance_->mutable_concept_descriptions();
7060 }
7061
7062 void set_concept_descriptions(
7063 common::optional<
7064 std::vector<
7065 std::shared_ptr<types::IConceptDescription>
7066 >
7067 > value
7068 ) override {
7069 instance_->set_concept_descriptions(value);
7070 }
7071
7072 const std::shared_ptr<E>& enhancement() const {
7073 return enhancement_;
7074 }
7075
7076 std::shared_ptr<E>& mutable_enhancement() {
7077 return enhancement_;
7078 }
7079
7080 void set_enhancement(
7081 std::shared_ptr<E> value
7082 ) {
7083 enhancement_ = std::move(value);
7084 }
7085
7086 EnhancedEnvironment(
7087 std::shared_ptr<types::IEnvironment> instance,
7088 std::shared_ptr<E> enhancement
7089 ) :
7090 instance_(instance),
7091 enhancement_(enhancement) {
7092 // Intentionally empty.
7093 }
7094
7095 virtual ~EnhancedEnvironment() = default;
7096
7097 private:
7098 std::shared_ptr<types::IEnvironment> instance_;
7099 std::shared_ptr<E> enhancement_;
7100};
7101
7102template<class E>
7103class EnhancedEmbeddedDataSpecification
7104 : virtual public types::IEmbeddedDataSpecification,
7105 virtual public IEnhanced<E> {
7106 public:
7107 types::ModelType model_type() const override {
7109 }
7110
7111 const std::shared_ptr<types::IReference>& data_specification() const override {
7112 return instance_->data_specification();
7113 }
7114
7115 std::shared_ptr<types::IReference>& mutable_data_specification() override {
7116 return instance_->mutable_data_specification();
7117 }
7118
7119 void set_data_specification(
7120 std::shared_ptr<types::IReference> value
7121 ) override {
7122 instance_->set_data_specification(value);
7123 }
7124
7125 const std::shared_ptr<types::IDataSpecificationContent>& data_specification_content() const override {
7126 return instance_->data_specification_content();
7127 }
7128
7129 std::shared_ptr<types::IDataSpecificationContent>& mutable_data_specification_content() override {
7130 return instance_->mutable_data_specification_content();
7131 }
7132
7133 void set_data_specification_content(
7134 std::shared_ptr<types::IDataSpecificationContent> value
7135 ) override {
7136 instance_->set_data_specification_content(value);
7137 }
7138
7139 const std::shared_ptr<E>& enhancement() const {
7140 return enhancement_;
7141 }
7142
7143 std::shared_ptr<E>& mutable_enhancement() {
7144 return enhancement_;
7145 }
7146
7147 void set_enhancement(
7148 std::shared_ptr<E> value
7149 ) {
7150 enhancement_ = std::move(value);
7151 }
7152
7153 EnhancedEmbeddedDataSpecification(
7154 std::shared_ptr<types::IEmbeddedDataSpecification> instance,
7155 std::shared_ptr<E> enhancement
7156 ) :
7157 instance_(instance),
7158 enhancement_(enhancement) {
7159 // Intentionally empty.
7160 }
7161
7162 virtual ~EnhancedEmbeddedDataSpecification() = default;
7163
7164 private:
7165 std::shared_ptr<types::IEmbeddedDataSpecification> instance_;
7166 std::shared_ptr<E> enhancement_;
7167};
7168
7169template<class E>
7170class EnhancedLevelType
7171 : virtual public types::ILevelType,
7172 virtual public IEnhanced<E> {
7173 public:
7174 types::ModelType model_type() const override {
7176 }
7177
7178 bool min() const override {
7179 return instance_->min();
7180 }
7181
7182 bool& mutable_min() override {
7183 return instance_->mutable_min();
7184 }
7185
7186 void set_min(
7187 bool value
7188 ) override {
7189 instance_->set_min(value);
7190 }
7191
7192 bool nom() const override {
7193 return instance_->nom();
7194 }
7195
7196 bool& mutable_nom() override {
7197 return instance_->mutable_nom();
7198 }
7199
7200 void set_nom(
7201 bool value
7202 ) override {
7203 instance_->set_nom(value);
7204 }
7205
7206 bool typ() const override {
7207 return instance_->typ();
7208 }
7209
7210 bool& mutable_typ() override {
7211 return instance_->mutable_typ();
7212 }
7213
7214 void set_typ(
7215 bool value
7216 ) override {
7217 instance_->set_typ(value);
7218 }
7219
7220 bool max() const override {
7221 return instance_->max();
7222 }
7223
7224 bool& mutable_max() override {
7225 return instance_->mutable_max();
7226 }
7227
7228 void set_max(
7229 bool value
7230 ) override {
7231 instance_->set_max(value);
7232 }
7233
7234 const std::shared_ptr<E>& enhancement() const {
7235 return enhancement_;
7236 }
7237
7238 std::shared_ptr<E>& mutable_enhancement() {
7239 return enhancement_;
7240 }
7241
7242 void set_enhancement(
7243 std::shared_ptr<E> value
7244 ) {
7245 enhancement_ = std::move(value);
7246 }
7247
7248 EnhancedLevelType(
7249 std::shared_ptr<types::ILevelType> instance,
7250 std::shared_ptr<E> enhancement
7251 ) :
7252 instance_(instance),
7253 enhancement_(enhancement) {
7254 // Intentionally empty.
7255 }
7256
7257 virtual ~EnhancedLevelType() = default;
7258
7259 private:
7260 std::shared_ptr<types::ILevelType> instance_;
7261 std::shared_ptr<E> enhancement_;
7262};
7263
7264template<class E>
7265class EnhancedValueReferencePair
7266 : virtual public types::IValueReferencePair,
7267 virtual public IEnhanced<E> {
7268 public:
7269 types::ModelType model_type() const override {
7271 }
7272
7273 const std::wstring& value() const override {
7274 return instance_->value();
7275 }
7276
7277 std::wstring& mutable_value() override {
7278 return instance_->mutable_value();
7279 }
7280
7281 void set_value(
7282 std::wstring value
7283 ) override {
7284 instance_->set_value(value);
7285 }
7286
7287 const std::shared_ptr<types::IReference>& value_id() const override {
7288 return instance_->value_id();
7289 }
7290
7291 std::shared_ptr<types::IReference>& mutable_value_id() override {
7292 return instance_->mutable_value_id();
7293 }
7294
7295 void set_value_id(
7296 std::shared_ptr<types::IReference> value
7297 ) override {
7298 instance_->set_value_id(value);
7299 }
7300
7301 const std::shared_ptr<E>& enhancement() const {
7302 return enhancement_;
7303 }
7304
7305 std::shared_ptr<E>& mutable_enhancement() {
7306 return enhancement_;
7307 }
7308
7309 void set_enhancement(
7310 std::shared_ptr<E> value
7311 ) {
7312 enhancement_ = std::move(value);
7313 }
7314
7315 EnhancedValueReferencePair(
7316 std::shared_ptr<types::IValueReferencePair> instance,
7317 std::shared_ptr<E> enhancement
7318 ) :
7319 instance_(instance),
7320 enhancement_(enhancement) {
7321 // Intentionally empty.
7322 }
7323
7324 virtual ~EnhancedValueReferencePair() = default;
7325
7326 private:
7327 std::shared_ptr<types::IValueReferencePair> instance_;
7328 std::shared_ptr<E> enhancement_;
7329};
7330
7331template<class E>
7332class EnhancedValueList
7333 : virtual public types::IValueList,
7334 virtual public IEnhanced<E> {
7335 public:
7336 types::ModelType model_type() const override {
7338 }
7339
7340 const std::vector<
7341 std::shared_ptr<types::IValueReferencePair>
7342 >& value_reference_pairs() const override {
7343 return instance_->value_reference_pairs();
7344 }
7345
7346 std::vector<
7347 std::shared_ptr<types::IValueReferencePair>
7348 >& mutable_value_reference_pairs() override {
7349 return instance_->mutable_value_reference_pairs();
7350 }
7351
7352 void set_value_reference_pairs(
7353 std::vector<
7354 std::shared_ptr<types::IValueReferencePair>
7355 > value
7356 ) override {
7357 instance_->set_value_reference_pairs(value);
7358 }
7359
7360 const std::shared_ptr<E>& enhancement() const {
7361 return enhancement_;
7362 }
7363
7364 std::shared_ptr<E>& mutable_enhancement() {
7365 return enhancement_;
7366 }
7367
7368 void set_enhancement(
7369 std::shared_ptr<E> value
7370 ) {
7371 enhancement_ = std::move(value);
7372 }
7373
7374 EnhancedValueList(
7375 std::shared_ptr<types::IValueList> instance,
7376 std::shared_ptr<E> enhancement
7377 ) :
7378 instance_(instance),
7379 enhancement_(enhancement) {
7380 // Intentionally empty.
7381 }
7382
7383 virtual ~EnhancedValueList() = default;
7384
7385 private:
7386 std::shared_ptr<types::IValueList> instance_;
7387 std::shared_ptr<E> enhancement_;
7388};
7389
7390template<class E>
7391class EnhancedLangStringPreferredNameTypeIec61360
7393 virtual public IEnhanced<E> {
7394 public:
7395 types::ModelType model_type() const override {
7397 }
7398
7399 const std::wstring& language() const override {
7400 return instance_->language();
7401 }
7402
7403 std::wstring& mutable_language() override {
7404 return instance_->mutable_language();
7405 }
7406
7407 void set_language(
7408 std::wstring value
7409 ) override {
7410 instance_->set_language(value);
7411 }
7412
7413 const std::wstring& text() const override {
7414 return instance_->text();
7415 }
7416
7417 std::wstring& mutable_text() override {
7418 return instance_->mutable_text();
7419 }
7420
7421 void set_text(
7422 std::wstring value
7423 ) override {
7424 instance_->set_text(value);
7425 }
7426
7427 const std::shared_ptr<E>& enhancement() const {
7428 return enhancement_;
7429 }
7430
7431 std::shared_ptr<E>& mutable_enhancement() {
7432 return enhancement_;
7433 }
7434
7435 void set_enhancement(
7436 std::shared_ptr<E> value
7437 ) {
7438 enhancement_ = std::move(value);
7439 }
7440
7441 EnhancedLangStringPreferredNameTypeIec61360(
7442 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> instance,
7443 std::shared_ptr<E> enhancement
7444 ) :
7445 instance_(instance),
7446 enhancement_(enhancement) {
7447 // Intentionally empty.
7448 }
7449
7450 virtual ~EnhancedLangStringPreferredNameTypeIec61360() = default;
7451
7452 private:
7453 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> instance_;
7454 std::shared_ptr<E> enhancement_;
7455};
7456
7457template<class E>
7458class EnhancedLangStringShortNameTypeIec61360
7460 virtual public IEnhanced<E> {
7461 public:
7462 types::ModelType model_type() const override {
7464 }
7465
7466 const std::wstring& language() const override {
7467 return instance_->language();
7468 }
7469
7470 std::wstring& mutable_language() override {
7471 return instance_->mutable_language();
7472 }
7473
7474 void set_language(
7475 std::wstring value
7476 ) override {
7477 instance_->set_language(value);
7478 }
7479
7480 const std::wstring& text() const override {
7481 return instance_->text();
7482 }
7483
7484 std::wstring& mutable_text() override {
7485 return instance_->mutable_text();
7486 }
7487
7488 void set_text(
7489 std::wstring value
7490 ) override {
7491 instance_->set_text(value);
7492 }
7493
7494 const std::shared_ptr<E>& enhancement() const {
7495 return enhancement_;
7496 }
7497
7498 std::shared_ptr<E>& mutable_enhancement() {
7499 return enhancement_;
7500 }
7501
7502 void set_enhancement(
7503 std::shared_ptr<E> value
7504 ) {
7505 enhancement_ = std::move(value);
7506 }
7507
7508 EnhancedLangStringShortNameTypeIec61360(
7509 std::shared_ptr<types::ILangStringShortNameTypeIec61360> instance,
7510 std::shared_ptr<E> enhancement
7511 ) :
7512 instance_(instance),
7513 enhancement_(enhancement) {
7514 // Intentionally empty.
7515 }
7516
7517 virtual ~EnhancedLangStringShortNameTypeIec61360() = default;
7518
7519 private:
7520 std::shared_ptr<types::ILangStringShortNameTypeIec61360> instance_;
7521 std::shared_ptr<E> enhancement_;
7522};
7523
7524template<class E>
7525class EnhancedLangStringDefinitionTypeIec61360
7527 virtual public IEnhanced<E> {
7528 public:
7529 types::ModelType model_type() const override {
7531 }
7532
7533 const std::wstring& language() const override {
7534 return instance_->language();
7535 }
7536
7537 std::wstring& mutable_language() override {
7538 return instance_->mutable_language();
7539 }
7540
7541 void set_language(
7542 std::wstring value
7543 ) override {
7544 instance_->set_language(value);
7545 }
7546
7547 const std::wstring& text() const override {
7548 return instance_->text();
7549 }
7550
7551 std::wstring& mutable_text() override {
7552 return instance_->mutable_text();
7553 }
7554
7555 void set_text(
7556 std::wstring value
7557 ) override {
7558 instance_->set_text(value);
7559 }
7560
7561 const std::shared_ptr<E>& enhancement() const {
7562 return enhancement_;
7563 }
7564
7565 std::shared_ptr<E>& mutable_enhancement() {
7566 return enhancement_;
7567 }
7568
7569 void set_enhancement(
7570 std::shared_ptr<E> value
7571 ) {
7572 enhancement_ = std::move(value);
7573 }
7574
7575 EnhancedLangStringDefinitionTypeIec61360(
7576 std::shared_ptr<types::ILangStringDefinitionTypeIec61360> instance,
7577 std::shared_ptr<E> enhancement
7578 ) :
7579 instance_(instance),
7580 enhancement_(enhancement) {
7581 // Intentionally empty.
7582 }
7583
7584 virtual ~EnhancedLangStringDefinitionTypeIec61360() = default;
7585
7586 private:
7587 std::shared_ptr<types::ILangStringDefinitionTypeIec61360> instance_;
7588 std::shared_ptr<E> enhancement_;
7589};
7590
7591template<class E>
7592class EnhancedDataSpecificationIec61360
7593 : virtual public types::IDataSpecificationIec61360,
7594 virtual public IEnhanced<E> {
7595 public:
7596 types::ModelType model_type() const override {
7598 }
7599
7600 const std::vector<
7601 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7602 >& preferred_name() const override {
7603 return instance_->preferred_name();
7604 }
7605
7606 std::vector<
7607 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7608 >& mutable_preferred_name() override {
7609 return instance_->mutable_preferred_name();
7610 }
7611
7612 void set_preferred_name(
7613 std::vector<
7614 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7615 > value
7616 ) override {
7617 instance_->set_preferred_name(value);
7618 }
7619
7620 const common::optional<
7621 std::vector<
7622 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7623 >
7624 >& short_name() const override {
7625 return instance_->short_name();
7626 }
7627
7628 common::optional<
7629 std::vector<
7630 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7631 >
7632 >& mutable_short_name() override {
7633 return instance_->mutable_short_name();
7634 }
7635
7636 void set_short_name(
7637 common::optional<
7638 std::vector<
7639 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7640 >
7641 > value
7642 ) override {
7643 instance_->set_short_name(value);
7644 }
7645
7646 const common::optional<std::wstring>& unit() const override {
7647 return instance_->unit();
7648 }
7649
7650 common::optional<std::wstring>& mutable_unit() override {
7651 return instance_->mutable_unit();
7652 }
7653
7654 void set_unit(
7655 common::optional<std::wstring> value
7656 ) override {
7657 instance_->set_unit(value);
7658 }
7659
7660 const common::optional<
7661 std::shared_ptr<types::IReference>
7662 >& unit_id() const override {
7663 return instance_->unit_id();
7664 }
7665
7666 common::optional<
7667 std::shared_ptr<types::IReference>
7668 >& mutable_unit_id() override {
7669 return instance_->mutable_unit_id();
7670 }
7671
7672 void set_unit_id(
7673 common::optional<
7674 std::shared_ptr<types::IReference>
7675 > value
7676 ) override {
7677 instance_->set_unit_id(value);
7678 }
7679
7680 const common::optional<std::wstring>& source_of_definition() const override {
7681 return instance_->source_of_definition();
7682 }
7683
7684 common::optional<std::wstring>& mutable_source_of_definition() override {
7685 return instance_->mutable_source_of_definition();
7686 }
7687
7688 void set_source_of_definition(
7689 common::optional<std::wstring> value
7690 ) override {
7691 instance_->set_source_of_definition(value);
7692 }
7693
7694 const common::optional<std::wstring>& symbol() const override {
7695 return instance_->symbol();
7696 }
7697
7698 common::optional<std::wstring>& mutable_symbol() override {
7699 return instance_->mutable_symbol();
7700 }
7701
7702 void set_symbol(
7703 common::optional<std::wstring> value
7704 ) override {
7705 instance_->set_symbol(value);
7706 }
7707
7708 const common::optional<types::DataTypeIec61360>& data_type() const override {
7709 return instance_->data_type();
7710 }
7711
7712 common::optional<types::DataTypeIec61360>& mutable_data_type() override {
7713 return instance_->mutable_data_type();
7714 }
7715
7716 void set_data_type(
7717 common::optional<types::DataTypeIec61360> value
7718 ) override {
7719 instance_->set_data_type(value);
7720 }
7721
7722 const common::optional<
7723 std::vector<
7724 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7725 >
7726 >& definition() const override {
7727 return instance_->definition();
7728 }
7729
7730 common::optional<
7731 std::vector<
7732 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7733 >
7734 >& mutable_definition() override {
7735 return instance_->mutable_definition();
7736 }
7737
7738 void set_definition(
7739 common::optional<
7740 std::vector<
7741 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7742 >
7743 > value
7744 ) override {
7745 instance_->set_definition(value);
7746 }
7747
7748 const common::optional<std::wstring>& value_format() const override {
7749 return instance_->value_format();
7750 }
7751
7752 common::optional<std::wstring>& mutable_value_format() override {
7753 return instance_->mutable_value_format();
7754 }
7755
7756 void set_value_format(
7757 common::optional<std::wstring> value
7758 ) override {
7759 instance_->set_value_format(value);
7760 }
7761
7762 const common::optional<
7763 std::shared_ptr<types::IValueList>
7764 >& value_list() const override {
7765 return instance_->value_list();
7766 }
7767
7768 common::optional<
7769 std::shared_ptr<types::IValueList>
7770 >& mutable_value_list() override {
7771 return instance_->mutable_value_list();
7772 }
7773
7774 void set_value_list(
7775 common::optional<
7776 std::shared_ptr<types::IValueList>
7777 > value
7778 ) override {
7779 instance_->set_value_list(value);
7780 }
7781
7782 const common::optional<std::wstring>& value() const override {
7783 return instance_->value();
7784 }
7785
7786 common::optional<std::wstring>& mutable_value() override {
7787 return instance_->mutable_value();
7788 }
7789
7790 void set_value(
7791 common::optional<std::wstring> value
7792 ) override {
7793 instance_->set_value(value);
7794 }
7795
7796 const common::optional<
7797 std::shared_ptr<types::ILevelType>
7798 >& level_type() const override {
7799 return instance_->level_type();
7800 }
7801
7802 common::optional<
7803 std::shared_ptr<types::ILevelType>
7804 >& mutable_level_type() override {
7805 return instance_->mutable_level_type();
7806 }
7807
7808 void set_level_type(
7809 common::optional<
7810 std::shared_ptr<types::ILevelType>
7811 > value
7812 ) override {
7813 instance_->set_level_type(value);
7814 }
7815
7816 const std::shared_ptr<E>& enhancement() const {
7817 return enhancement_;
7818 }
7819
7820 std::shared_ptr<E>& mutable_enhancement() {
7821 return enhancement_;
7822 }
7823
7824 void set_enhancement(
7825 std::shared_ptr<E> value
7826 ) {
7827 enhancement_ = std::move(value);
7828 }
7829
7830 EnhancedDataSpecificationIec61360(
7831 std::shared_ptr<types::IDataSpecificationIec61360> instance,
7832 std::shared_ptr<E> enhancement
7833 ) :
7834 instance_(instance),
7835 enhancement_(enhancement) {
7836 // Intentionally empty.
7837 }
7838
7839 virtual ~EnhancedDataSpecificationIec61360() = default;
7840
7841 private:
7842 std::shared_ptr<types::IDataSpecificationIec61360> instance_;
7843 std::shared_ptr<E> enhancement_;
7844};
7845
7855template<typename E>
7856std::shared_ptr<types::IExtension> WrapExtension(
7857 const std::shared_ptr<types::IExtension>& that,
7858 const std::function<
7859 std::shared_ptr<E>(
7860 const std::shared_ptr<types::IClass>&
7861 )
7862 >& factory
7863) {
7864 // We assume that we already checked whether `that` has been enhanced
7865 // in the caller.
7866
7867 if (that->semantic_id().has_value()) {
7868 const std::shared_ptr<types::IReference>& value(
7869 that->semantic_id().value()
7870 );
7871
7872 std::shared_ptr<
7874 > wrapped(
7875 Wrap<E>(
7876 value,
7877 factory
7878 )
7879 );
7880
7881 that->set_semantic_id(
7882 common::make_optional(
7883 std::move(wrapped)
7884 )
7885 );
7886 }
7887
7888 if (that->supplemental_semantic_ids().has_value()) {
7889 const std::vector<
7890 std::shared_ptr<types::IReference>
7891 >& value(
7892 that->supplemental_semantic_ids().value()
7893 );
7894 const std::size_t size = value.size();
7895
7896 std::vector<
7897 std::shared_ptr<types::IReference>
7898 > wrapped;
7899 wrapped.reserve(size);
7900
7901 for (
7902 const std::shared_ptr<types::IReference>& item
7903 : value
7904 ) {
7905 wrapped.emplace_back(
7906 Wrap<E>(
7907 item,
7908 factory
7909 )
7910 );
7911 }
7912
7913 that->set_supplemental_semantic_ids(
7914 common::make_optional(
7915 std::move(wrapped)
7916 )
7917 );
7918 }
7919
7920 if (that->refers_to().has_value()) {
7921 const std::vector<
7922 std::shared_ptr<types::IReference>
7923 >& value(
7924 that->refers_to().value()
7925 );
7926 const std::size_t size = value.size();
7927
7928 std::vector<
7929 std::shared_ptr<types::IReference>
7930 > wrapped;
7931 wrapped.reserve(size);
7932
7933 for (
7934 const std::shared_ptr<types::IReference>& item
7935 : value
7936 ) {
7937 wrapped.emplace_back(
7938 Wrap<E>(
7939 item,
7940 factory
7941 )
7942 );
7943 }
7944
7945 that->set_refers_to(
7946 common::make_optional(
7947 std::move(wrapped)
7948 )
7949 );
7950 }
7951
7952 std::shared_ptr<E> enh(
7953 factory(that)
7954 );
7955 return (enh == nullptr)
7956 ? that
7957 : std::shared_ptr<types::IExtension>(
7958 new EnhancedExtension<E>(
7959 that,
7960 enh
7961 )
7962 );
7963}
7964
7974template<typename E>
7975std::shared_ptr<types::IAdministrativeInformation> WrapAdministrativeInformation(
7976 const std::shared_ptr<types::IAdministrativeInformation>& that,
7977 const std::function<
7978 std::shared_ptr<E>(
7979 const std::shared_ptr<types::IClass>&
7980 )
7981 >& factory
7982) {
7983 // We assume that we already checked whether `that` has been enhanced
7984 // in the caller.
7985
7986 if (that->embedded_data_specifications().has_value()) {
7987 const std::vector<
7988 std::shared_ptr<types::IEmbeddedDataSpecification>
7989 >& value(
7990 that->embedded_data_specifications().value()
7991 );
7992 const std::size_t size = value.size();
7993
7994 std::vector<
7995 std::shared_ptr<types::IEmbeddedDataSpecification>
7996 > wrapped;
7997 wrapped.reserve(size);
7998
7999 for (
8000 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
8001 : value
8002 ) {
8003 wrapped.emplace_back(
8004 Wrap<E>(
8005 item,
8006 factory
8007 )
8008 );
8009 }
8010
8011 that->set_embedded_data_specifications(
8012 common::make_optional(
8013 std::move(wrapped)
8014 )
8015 );
8016 }
8017
8018 if (that->creator().has_value()) {
8019 const std::shared_ptr<types::IReference>& value(
8020 that->creator().value()
8021 );
8022
8023 std::shared_ptr<
8025 > wrapped(
8026 Wrap<E>(
8027 value,
8028 factory
8029 )
8030 );
8031
8032 that->set_creator(
8033 common::make_optional(
8034 std::move(wrapped)
8035 )
8036 );
8037 }
8038
8039 std::shared_ptr<E> enh(
8040 factory(that)
8041 );
8042 return (enh == nullptr)
8043 ? that
8044 : std::shared_ptr<types::IAdministrativeInformation>(
8045 new EnhancedAdministrativeInformation<E>(
8046 that,
8047 enh
8048 )
8049 );
8050}
8051
8061template<typename E>
8062std::shared_ptr<types::IQualifier> WrapQualifier(
8063 const std::shared_ptr<types::IQualifier>& that,
8064 const std::function<
8065 std::shared_ptr<E>(
8066 const std::shared_ptr<types::IClass>&
8067 )
8068 >& factory
8069) {
8070 // We assume that we already checked whether `that` has been enhanced
8071 // in the caller.
8072
8073 if (that->semantic_id().has_value()) {
8074 const std::shared_ptr<types::IReference>& value(
8075 that->semantic_id().value()
8076 );
8077
8078 std::shared_ptr<
8080 > wrapped(
8081 Wrap<E>(
8082 value,
8083 factory
8084 )
8085 );
8086
8087 that->set_semantic_id(
8088 common::make_optional(
8089 std::move(wrapped)
8090 )
8091 );
8092 }
8093
8094 if (that->supplemental_semantic_ids().has_value()) {
8095 const std::vector<
8096 std::shared_ptr<types::IReference>
8097 >& value(
8098 that->supplemental_semantic_ids().value()
8099 );
8100 const std::size_t size = value.size();
8101
8102 std::vector<
8103 std::shared_ptr<types::IReference>
8104 > wrapped;
8105 wrapped.reserve(size);
8106
8107 for (
8108 const std::shared_ptr<types::IReference>& item
8109 : value
8110 ) {
8111 wrapped.emplace_back(
8112 Wrap<E>(
8113 item,
8114 factory
8115 )
8116 );
8117 }
8118
8119 that->set_supplemental_semantic_ids(
8120 common::make_optional(
8121 std::move(wrapped)
8122 )
8123 );
8124 }
8125
8126 if (that->value_id().has_value()) {
8127 const std::shared_ptr<types::IReference>& value(
8128 that->value_id().value()
8129 );
8130
8131 std::shared_ptr<
8133 > wrapped(
8134 Wrap<E>(
8135 value,
8136 factory
8137 )
8138 );
8139
8140 that->set_value_id(
8141 common::make_optional(
8142 std::move(wrapped)
8143 )
8144 );
8145 }
8146
8147 std::shared_ptr<E> enh(
8148 factory(that)
8149 );
8150 return (enh == nullptr)
8151 ? that
8152 : std::shared_ptr<types::IQualifier>(
8153 new EnhancedQualifier<E>(
8154 that,
8155 enh
8156 )
8157 );
8158}
8159
8169template<typename E>
8170std::shared_ptr<types::IAssetAdministrationShell> WrapAssetAdministrationShell(
8171 const std::shared_ptr<types::IAssetAdministrationShell>& that,
8172 const std::function<
8173 std::shared_ptr<E>(
8174 const std::shared_ptr<types::IClass>&
8175 )
8176 >& factory
8177) {
8178 // We assume that we already checked whether `that` has been enhanced
8179 // in the caller.
8180
8181 if (that->extensions().has_value()) {
8182 const std::vector<
8183 std::shared_ptr<types::IExtension>
8184 >& value(
8185 that->extensions().value()
8186 );
8187 const std::size_t size = value.size();
8188
8189 std::vector<
8190 std::shared_ptr<types::IExtension>
8191 > wrapped;
8192 wrapped.reserve(size);
8193
8194 for (
8195 const std::shared_ptr<types::IExtension>& item
8196 : value
8197 ) {
8198 wrapped.emplace_back(
8199 Wrap<E>(
8200 item,
8201 factory
8202 )
8203 );
8204 }
8205
8206 that->set_extensions(
8207 common::make_optional(
8208 std::move(wrapped)
8209 )
8210 );
8211 }
8212
8213 if (that->display_name().has_value()) {
8214 const std::vector<
8215 std::shared_ptr<types::ILangStringNameType>
8216 >& value(
8217 that->display_name().value()
8218 );
8219 const std::size_t size = value.size();
8220
8221 std::vector<
8222 std::shared_ptr<types::ILangStringNameType>
8223 > wrapped;
8224 wrapped.reserve(size);
8225
8226 for (
8227 const std::shared_ptr<types::ILangStringNameType>& item
8228 : value
8229 ) {
8230 wrapped.emplace_back(
8231 Wrap<E>(
8232 item,
8233 factory
8234 )
8235 );
8236 }
8237
8238 that->set_display_name(
8239 common::make_optional(
8240 std::move(wrapped)
8241 )
8242 );
8243 }
8244
8245 if (that->description().has_value()) {
8246 const std::vector<
8247 std::shared_ptr<types::ILangStringTextType>
8248 >& value(
8249 that->description().value()
8250 );
8251 const std::size_t size = value.size();
8252
8253 std::vector<
8254 std::shared_ptr<types::ILangStringTextType>
8255 > wrapped;
8256 wrapped.reserve(size);
8257
8258 for (
8259 const std::shared_ptr<types::ILangStringTextType>& item
8260 : value
8261 ) {
8262 wrapped.emplace_back(
8263 Wrap<E>(
8264 item,
8265 factory
8266 )
8267 );
8268 }
8269
8270 that->set_description(
8271 common::make_optional(
8272 std::move(wrapped)
8273 )
8274 );
8275 }
8276
8277 if (that->administration().has_value()) {
8278 const std::shared_ptr<types::IAdministrativeInformation>& value(
8279 that->administration().value()
8280 );
8281
8282 std::shared_ptr<
8284 > wrapped(
8285 Wrap<E>(
8286 value,
8287 factory
8288 )
8289 );
8290
8291 that->set_administration(
8292 common::make_optional(
8293 std::move(wrapped)
8294 )
8295 );
8296 }
8297
8298 if (that->embedded_data_specifications().has_value()) {
8299 const std::vector<
8300 std::shared_ptr<types::IEmbeddedDataSpecification>
8301 >& value(
8302 that->embedded_data_specifications().value()
8303 );
8304 const std::size_t size = value.size();
8305
8306 std::vector<
8307 std::shared_ptr<types::IEmbeddedDataSpecification>
8308 > wrapped;
8309 wrapped.reserve(size);
8310
8311 for (
8312 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
8313 : value
8314 ) {
8315 wrapped.emplace_back(
8316 Wrap<E>(
8317 item,
8318 factory
8319 )
8320 );
8321 }
8322
8323 that->set_embedded_data_specifications(
8324 common::make_optional(
8325 std::move(wrapped)
8326 )
8327 );
8328 }
8329
8330 if (that->derived_from().has_value()) {
8331 const std::shared_ptr<types::IReference>& value(
8332 that->derived_from().value()
8333 );
8334
8335 std::shared_ptr<
8337 > wrapped(
8338 Wrap<E>(
8339 value,
8340 factory
8341 )
8342 );
8343
8344 that->set_derived_from(
8345 common::make_optional(
8346 std::move(wrapped)
8347 )
8348 );
8349 }
8350
8351 that->set_asset_information(
8352 Wrap<E>(
8353 that->asset_information(),
8354 factory
8355 )
8356 );
8357
8358 if (that->submodels().has_value()) {
8359 const std::vector<
8360 std::shared_ptr<types::IReference>
8361 >& value(
8362 that->submodels().value()
8363 );
8364 const std::size_t size = value.size();
8365
8366 std::vector<
8367 std::shared_ptr<types::IReference>
8368 > wrapped;
8369 wrapped.reserve(size);
8370
8371 for (
8372 const std::shared_ptr<types::IReference>& item
8373 : value
8374 ) {
8375 wrapped.emplace_back(
8376 Wrap<E>(
8377 item,
8378 factory
8379 )
8380 );
8381 }
8382
8383 that->set_submodels(
8384 common::make_optional(
8385 std::move(wrapped)
8386 )
8387 );
8388 }
8389
8390 std::shared_ptr<E> enh(
8391 factory(that)
8392 );
8393 return (enh == nullptr)
8394 ? that
8395 : std::shared_ptr<types::IAssetAdministrationShell>(
8396 new EnhancedAssetAdministrationShell<E>(
8397 that,
8398 enh
8399 )
8400 );
8401}
8402
8412template<typename E>
8413std::shared_ptr<types::IAssetInformation> WrapAssetInformation(
8414 const std::shared_ptr<types::IAssetInformation>& that,
8415 const std::function<
8416 std::shared_ptr<E>(
8417 const std::shared_ptr<types::IClass>&
8418 )
8419 >& factory
8420) {
8421 // We assume that we already checked whether `that` has been enhanced
8422 // in the caller.
8423
8424 if (that->specific_asset_ids().has_value()) {
8425 const std::vector<
8426 std::shared_ptr<types::ISpecificAssetId>
8427 >& value(
8428 that->specific_asset_ids().value()
8429 );
8430 const std::size_t size = value.size();
8431
8432 std::vector<
8433 std::shared_ptr<types::ISpecificAssetId>
8434 > wrapped;
8435 wrapped.reserve(size);
8436
8437 for (
8438 const std::shared_ptr<types::ISpecificAssetId>& item
8439 : value
8440 ) {
8441 wrapped.emplace_back(
8442 Wrap<E>(
8443 item,
8444 factory
8445 )
8446 );
8447 }
8448
8449 that->set_specific_asset_ids(
8450 common::make_optional(
8451 std::move(wrapped)
8452 )
8453 );
8454 }
8455
8456 if (that->default_thumbnail().has_value()) {
8457 const std::shared_ptr<types::IResource>& value(
8458 that->default_thumbnail().value()
8459 );
8460
8461 std::shared_ptr<
8463 > wrapped(
8464 Wrap<E>(
8465 value,
8466 factory
8467 )
8468 );
8469
8470 that->set_default_thumbnail(
8471 common::make_optional(
8472 std::move(wrapped)
8473 )
8474 );
8475 }
8476
8477 std::shared_ptr<E> enh(
8478 factory(that)
8479 );
8480 return (enh == nullptr)
8481 ? that
8482 : std::shared_ptr<types::IAssetInformation>(
8483 new EnhancedAssetInformation<E>(
8484 that,
8485 enh
8486 )
8487 );
8488}
8489
8499template<typename E>
8500std::shared_ptr<types::IResource> WrapResource(
8501 const std::shared_ptr<types::IResource>& that,
8502 const std::function<
8503 std::shared_ptr<E>(
8504 const std::shared_ptr<types::IClass>&
8505 )
8506 >& factory
8507) {
8508 // We assume that we already checked whether `that` has been enhanced
8509 // in the caller.
8510
8511 // No properties to be recursively enhanced.
8512
8513 std::shared_ptr<E> enh(
8514 factory(that)
8515 );
8516 return (enh == nullptr)
8517 ? that
8518 : std::shared_ptr<types::IResource>(
8519 new EnhancedResource<E>(
8520 that,
8521 enh
8522 )
8523 );
8524}
8525
8535template<typename E>
8536std::shared_ptr<types::ISpecificAssetId> WrapSpecificAssetId(
8537 const std::shared_ptr<types::ISpecificAssetId>& that,
8538 const std::function<
8539 std::shared_ptr<E>(
8540 const std::shared_ptr<types::IClass>&
8541 )
8542 >& factory
8543) {
8544 // We assume that we already checked whether `that` has been enhanced
8545 // in the caller.
8546
8547 if (that->semantic_id().has_value()) {
8548 const std::shared_ptr<types::IReference>& value(
8549 that->semantic_id().value()
8550 );
8551
8552 std::shared_ptr<
8554 > wrapped(
8555 Wrap<E>(
8556 value,
8557 factory
8558 )
8559 );
8560
8561 that->set_semantic_id(
8562 common::make_optional(
8563 std::move(wrapped)
8564 )
8565 );
8566 }
8567
8568 if (that->supplemental_semantic_ids().has_value()) {
8569 const std::vector<
8570 std::shared_ptr<types::IReference>
8571 >& value(
8572 that->supplemental_semantic_ids().value()
8573 );
8574 const std::size_t size = value.size();
8575
8576 std::vector<
8577 std::shared_ptr<types::IReference>
8578 > wrapped;
8579 wrapped.reserve(size);
8580
8581 for (
8582 const std::shared_ptr<types::IReference>& item
8583 : value
8584 ) {
8585 wrapped.emplace_back(
8586 Wrap<E>(
8587 item,
8588 factory
8589 )
8590 );
8591 }
8592
8593 that->set_supplemental_semantic_ids(
8594 common::make_optional(
8595 std::move(wrapped)
8596 )
8597 );
8598 }
8599
8600 if (that->external_subject_id().has_value()) {
8601 const std::shared_ptr<types::IReference>& value(
8602 that->external_subject_id().value()
8603 );
8604
8605 std::shared_ptr<
8607 > wrapped(
8608 Wrap<E>(
8609 value,
8610 factory
8611 )
8612 );
8613
8614 that->set_external_subject_id(
8615 common::make_optional(
8616 std::move(wrapped)
8617 )
8618 );
8619 }
8620
8621 std::shared_ptr<E> enh(
8622 factory(that)
8623 );
8624 return (enh == nullptr)
8625 ? that
8626 : std::shared_ptr<types::ISpecificAssetId>(
8627 new EnhancedSpecificAssetId<E>(
8628 that,
8629 enh
8630 )
8631 );
8632}
8633
8643template<typename E>
8644std::shared_ptr<types::ISubmodel> WrapSubmodel(
8645 const std::shared_ptr<types::ISubmodel>& that,
8646 const std::function<
8647 std::shared_ptr<E>(
8648 const std::shared_ptr<types::IClass>&
8649 )
8650 >& factory
8651) {
8652 // We assume that we already checked whether `that` has been enhanced
8653 // in the caller.
8654
8655 if (that->extensions().has_value()) {
8656 const std::vector<
8657 std::shared_ptr<types::IExtension>
8658 >& value(
8659 that->extensions().value()
8660 );
8661 const std::size_t size = value.size();
8662
8663 std::vector<
8664 std::shared_ptr<types::IExtension>
8665 > wrapped;
8666 wrapped.reserve(size);
8667
8668 for (
8669 const std::shared_ptr<types::IExtension>& item
8670 : value
8671 ) {
8672 wrapped.emplace_back(
8673 Wrap<E>(
8674 item,
8675 factory
8676 )
8677 );
8678 }
8679
8680 that->set_extensions(
8681 common::make_optional(
8682 std::move(wrapped)
8683 )
8684 );
8685 }
8686
8687 if (that->display_name().has_value()) {
8688 const std::vector<
8689 std::shared_ptr<types::ILangStringNameType>
8690 >& value(
8691 that->display_name().value()
8692 );
8693 const std::size_t size = value.size();
8694
8695 std::vector<
8696 std::shared_ptr<types::ILangStringNameType>
8697 > wrapped;
8698 wrapped.reserve(size);
8699
8700 for (
8701 const std::shared_ptr<types::ILangStringNameType>& item
8702 : value
8703 ) {
8704 wrapped.emplace_back(
8705 Wrap<E>(
8706 item,
8707 factory
8708 )
8709 );
8710 }
8711
8712 that->set_display_name(
8713 common::make_optional(
8714 std::move(wrapped)
8715 )
8716 );
8717 }
8718
8719 if (that->description().has_value()) {
8720 const std::vector<
8721 std::shared_ptr<types::ILangStringTextType>
8722 >& value(
8723 that->description().value()
8724 );
8725 const std::size_t size = value.size();
8726
8727 std::vector<
8728 std::shared_ptr<types::ILangStringTextType>
8729 > wrapped;
8730 wrapped.reserve(size);
8731
8732 for (
8733 const std::shared_ptr<types::ILangStringTextType>& item
8734 : value
8735 ) {
8736 wrapped.emplace_back(
8737 Wrap<E>(
8738 item,
8739 factory
8740 )
8741 );
8742 }
8743
8744 that->set_description(
8745 common::make_optional(
8746 std::move(wrapped)
8747 )
8748 );
8749 }
8750
8751 if (that->administration().has_value()) {
8752 const std::shared_ptr<types::IAdministrativeInformation>& value(
8753 that->administration().value()
8754 );
8755
8756 std::shared_ptr<
8758 > wrapped(
8759 Wrap<E>(
8760 value,
8761 factory
8762 )
8763 );
8764
8765 that->set_administration(
8766 common::make_optional(
8767 std::move(wrapped)
8768 )
8769 );
8770 }
8771
8772 if (that->semantic_id().has_value()) {
8773 const std::shared_ptr<types::IReference>& value(
8774 that->semantic_id().value()
8775 );
8776
8777 std::shared_ptr<
8779 > wrapped(
8780 Wrap<E>(
8781 value,
8782 factory
8783 )
8784 );
8785
8786 that->set_semantic_id(
8787 common::make_optional(
8788 std::move(wrapped)
8789 )
8790 );
8791 }
8792
8793 if (that->supplemental_semantic_ids().has_value()) {
8794 const std::vector<
8795 std::shared_ptr<types::IReference>
8796 >& value(
8797 that->supplemental_semantic_ids().value()
8798 );
8799 const std::size_t size = value.size();
8800
8801 std::vector<
8802 std::shared_ptr<types::IReference>
8803 > wrapped;
8804 wrapped.reserve(size);
8805
8806 for (
8807 const std::shared_ptr<types::IReference>& item
8808 : value
8809 ) {
8810 wrapped.emplace_back(
8811 Wrap<E>(
8812 item,
8813 factory
8814 )
8815 );
8816 }
8817
8818 that->set_supplemental_semantic_ids(
8819 common::make_optional(
8820 std::move(wrapped)
8821 )
8822 );
8823 }
8824
8825 if (that->qualifiers().has_value()) {
8826 const std::vector<
8827 std::shared_ptr<types::IQualifier>
8828 >& value(
8829 that->qualifiers().value()
8830 );
8831 const std::size_t size = value.size();
8832
8833 std::vector<
8834 std::shared_ptr<types::IQualifier>
8835 > wrapped;
8836 wrapped.reserve(size);
8837
8838 for (
8839 const std::shared_ptr<types::IQualifier>& item
8840 : value
8841 ) {
8842 wrapped.emplace_back(
8843 Wrap<E>(
8844 item,
8845 factory
8846 )
8847 );
8848 }
8849
8850 that->set_qualifiers(
8851 common::make_optional(
8852 std::move(wrapped)
8853 )
8854 );
8855 }
8856
8857 if (that->embedded_data_specifications().has_value()) {
8858 const std::vector<
8859 std::shared_ptr<types::IEmbeddedDataSpecification>
8860 >& value(
8861 that->embedded_data_specifications().value()
8862 );
8863 const std::size_t size = value.size();
8864
8865 std::vector<
8866 std::shared_ptr<types::IEmbeddedDataSpecification>
8867 > wrapped;
8868 wrapped.reserve(size);
8869
8870 for (
8871 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
8872 : value
8873 ) {
8874 wrapped.emplace_back(
8875 Wrap<E>(
8876 item,
8877 factory
8878 )
8879 );
8880 }
8881
8882 that->set_embedded_data_specifications(
8883 common::make_optional(
8884 std::move(wrapped)
8885 )
8886 );
8887 }
8888
8889 if (that->submodel_elements().has_value()) {
8890 const std::vector<
8891 std::shared_ptr<types::ISubmodelElement>
8892 >& value(
8893 that->submodel_elements().value()
8894 );
8895 const std::size_t size = value.size();
8896
8897 std::vector<
8898 std::shared_ptr<types::ISubmodelElement>
8899 > wrapped;
8900 wrapped.reserve(size);
8901
8902 for (
8903 const std::shared_ptr<types::ISubmodelElement>& item
8904 : value
8905 ) {
8906 wrapped.emplace_back(
8907 Wrap<E>(
8908 item,
8909 factory
8910 )
8911 );
8912 }
8913
8914 that->set_submodel_elements(
8915 common::make_optional(
8916 std::move(wrapped)
8917 )
8918 );
8919 }
8920
8921 std::shared_ptr<E> enh(
8922 factory(that)
8923 );
8924 return (enh == nullptr)
8925 ? that
8926 : std::shared_ptr<types::ISubmodel>(
8927 new EnhancedSubmodel<E>(
8928 that,
8929 enh
8930 )
8931 );
8932}
8933
8943template<typename E>
8944std::shared_ptr<types::IRelationshipElement> WrapRelationshipElement(
8945 const std::shared_ptr<types::IRelationshipElement>& that,
8946 const std::function<
8947 std::shared_ptr<E>(
8948 const std::shared_ptr<types::IClass>&
8949 )
8950 >& factory
8951) {
8952 // We assume that we already checked whether `that` has been enhanced
8953 // in the caller.
8954
8955 if (that->extensions().has_value()) {
8956 const std::vector<
8957 std::shared_ptr<types::IExtension>
8958 >& value(
8959 that->extensions().value()
8960 );
8961 const std::size_t size = value.size();
8962
8963 std::vector<
8964 std::shared_ptr<types::IExtension>
8965 > wrapped;
8966 wrapped.reserve(size);
8967
8968 for (
8969 const std::shared_ptr<types::IExtension>& item
8970 : value
8971 ) {
8972 wrapped.emplace_back(
8973 Wrap<E>(
8974 item,
8975 factory
8976 )
8977 );
8978 }
8979
8980 that->set_extensions(
8981 common::make_optional(
8982 std::move(wrapped)
8983 )
8984 );
8985 }
8986
8987 if (that->display_name().has_value()) {
8988 const std::vector<
8989 std::shared_ptr<types::ILangStringNameType>
8990 >& value(
8991 that->display_name().value()
8992 );
8993 const std::size_t size = value.size();
8994
8995 std::vector<
8996 std::shared_ptr<types::ILangStringNameType>
8997 > wrapped;
8998 wrapped.reserve(size);
8999
9000 for (
9001 const std::shared_ptr<types::ILangStringNameType>& item
9002 : value
9003 ) {
9004 wrapped.emplace_back(
9005 Wrap<E>(
9006 item,
9007 factory
9008 )
9009 );
9010 }
9011
9012 that->set_display_name(
9013 common::make_optional(
9014 std::move(wrapped)
9015 )
9016 );
9017 }
9018
9019 if (that->description().has_value()) {
9020 const std::vector<
9021 std::shared_ptr<types::ILangStringTextType>
9022 >& value(
9023 that->description().value()
9024 );
9025 const std::size_t size = value.size();
9026
9027 std::vector<
9028 std::shared_ptr<types::ILangStringTextType>
9029 > wrapped;
9030 wrapped.reserve(size);
9031
9032 for (
9033 const std::shared_ptr<types::ILangStringTextType>& item
9034 : value
9035 ) {
9036 wrapped.emplace_back(
9037 Wrap<E>(
9038 item,
9039 factory
9040 )
9041 );
9042 }
9043
9044 that->set_description(
9045 common::make_optional(
9046 std::move(wrapped)
9047 )
9048 );
9049 }
9050
9051 if (that->semantic_id().has_value()) {
9052 const std::shared_ptr<types::IReference>& value(
9053 that->semantic_id().value()
9054 );
9055
9056 std::shared_ptr<
9058 > wrapped(
9059 Wrap<E>(
9060 value,
9061 factory
9062 )
9063 );
9064
9065 that->set_semantic_id(
9066 common::make_optional(
9067 std::move(wrapped)
9068 )
9069 );
9070 }
9071
9072 if (that->supplemental_semantic_ids().has_value()) {
9073 const std::vector<
9074 std::shared_ptr<types::IReference>
9075 >& value(
9076 that->supplemental_semantic_ids().value()
9077 );
9078 const std::size_t size = value.size();
9079
9080 std::vector<
9081 std::shared_ptr<types::IReference>
9082 > wrapped;
9083 wrapped.reserve(size);
9084
9085 for (
9086 const std::shared_ptr<types::IReference>& item
9087 : value
9088 ) {
9089 wrapped.emplace_back(
9090 Wrap<E>(
9091 item,
9092 factory
9093 )
9094 );
9095 }
9096
9097 that->set_supplemental_semantic_ids(
9098 common::make_optional(
9099 std::move(wrapped)
9100 )
9101 );
9102 }
9103
9104 if (that->qualifiers().has_value()) {
9105 const std::vector<
9106 std::shared_ptr<types::IQualifier>
9107 >& value(
9108 that->qualifiers().value()
9109 );
9110 const std::size_t size = value.size();
9111
9112 std::vector<
9113 std::shared_ptr<types::IQualifier>
9114 > wrapped;
9115 wrapped.reserve(size);
9116
9117 for (
9118 const std::shared_ptr<types::IQualifier>& item
9119 : value
9120 ) {
9121 wrapped.emplace_back(
9122 Wrap<E>(
9123 item,
9124 factory
9125 )
9126 );
9127 }
9128
9129 that->set_qualifiers(
9130 common::make_optional(
9131 std::move(wrapped)
9132 )
9133 );
9134 }
9135
9136 if (that->embedded_data_specifications().has_value()) {
9137 const std::vector<
9138 std::shared_ptr<types::IEmbeddedDataSpecification>
9139 >& value(
9140 that->embedded_data_specifications().value()
9141 );
9142 const std::size_t size = value.size();
9143
9144 std::vector<
9145 std::shared_ptr<types::IEmbeddedDataSpecification>
9146 > wrapped;
9147 wrapped.reserve(size);
9148
9149 for (
9150 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9151 : value
9152 ) {
9153 wrapped.emplace_back(
9154 Wrap<E>(
9155 item,
9156 factory
9157 )
9158 );
9159 }
9160
9161 that->set_embedded_data_specifications(
9162 common::make_optional(
9163 std::move(wrapped)
9164 )
9165 );
9166 }
9167
9168 that->set_first(
9169 Wrap<E>(
9170 that->first(),
9171 factory
9172 )
9173 );
9174
9175 that->set_second(
9176 Wrap<E>(
9177 that->second(),
9178 factory
9179 )
9180 );
9181
9182 std::shared_ptr<E> enh(
9183 factory(that)
9184 );
9185 return (enh == nullptr)
9186 ? that
9187 : std::shared_ptr<types::IRelationshipElement>(
9188 new EnhancedRelationshipElement<E>(
9189 that,
9190 enh
9191 )
9192 );
9193}
9194
9204template<typename E>
9205std::shared_ptr<types::ISubmodelElementList> WrapSubmodelElementList(
9206 const std::shared_ptr<types::ISubmodelElementList>& that,
9207 const std::function<
9208 std::shared_ptr<E>(
9209 const std::shared_ptr<types::IClass>&
9210 )
9211 >& factory
9212) {
9213 // We assume that we already checked whether `that` has been enhanced
9214 // in the caller.
9215
9216 if (that->extensions().has_value()) {
9217 const std::vector<
9218 std::shared_ptr<types::IExtension>
9219 >& value(
9220 that->extensions().value()
9221 );
9222 const std::size_t size = value.size();
9223
9224 std::vector<
9225 std::shared_ptr<types::IExtension>
9226 > wrapped;
9227 wrapped.reserve(size);
9228
9229 for (
9230 const std::shared_ptr<types::IExtension>& item
9231 : value
9232 ) {
9233 wrapped.emplace_back(
9234 Wrap<E>(
9235 item,
9236 factory
9237 )
9238 );
9239 }
9240
9241 that->set_extensions(
9242 common::make_optional(
9243 std::move(wrapped)
9244 )
9245 );
9246 }
9247
9248 if (that->display_name().has_value()) {
9249 const std::vector<
9250 std::shared_ptr<types::ILangStringNameType>
9251 >& value(
9252 that->display_name().value()
9253 );
9254 const std::size_t size = value.size();
9255
9256 std::vector<
9257 std::shared_ptr<types::ILangStringNameType>
9258 > wrapped;
9259 wrapped.reserve(size);
9260
9261 for (
9262 const std::shared_ptr<types::ILangStringNameType>& item
9263 : value
9264 ) {
9265 wrapped.emplace_back(
9266 Wrap<E>(
9267 item,
9268 factory
9269 )
9270 );
9271 }
9272
9273 that->set_display_name(
9274 common::make_optional(
9275 std::move(wrapped)
9276 )
9277 );
9278 }
9279
9280 if (that->description().has_value()) {
9281 const std::vector<
9282 std::shared_ptr<types::ILangStringTextType>
9283 >& value(
9284 that->description().value()
9285 );
9286 const std::size_t size = value.size();
9287
9288 std::vector<
9289 std::shared_ptr<types::ILangStringTextType>
9290 > wrapped;
9291 wrapped.reserve(size);
9292
9293 for (
9294 const std::shared_ptr<types::ILangStringTextType>& item
9295 : value
9296 ) {
9297 wrapped.emplace_back(
9298 Wrap<E>(
9299 item,
9300 factory
9301 )
9302 );
9303 }
9304
9305 that->set_description(
9306 common::make_optional(
9307 std::move(wrapped)
9308 )
9309 );
9310 }
9311
9312 if (that->semantic_id().has_value()) {
9313 const std::shared_ptr<types::IReference>& value(
9314 that->semantic_id().value()
9315 );
9316
9317 std::shared_ptr<
9319 > wrapped(
9320 Wrap<E>(
9321 value,
9322 factory
9323 )
9324 );
9325
9326 that->set_semantic_id(
9327 common::make_optional(
9328 std::move(wrapped)
9329 )
9330 );
9331 }
9332
9333 if (that->supplemental_semantic_ids().has_value()) {
9334 const std::vector<
9335 std::shared_ptr<types::IReference>
9336 >& value(
9337 that->supplemental_semantic_ids().value()
9338 );
9339 const std::size_t size = value.size();
9340
9341 std::vector<
9342 std::shared_ptr<types::IReference>
9343 > wrapped;
9344 wrapped.reserve(size);
9345
9346 for (
9347 const std::shared_ptr<types::IReference>& item
9348 : value
9349 ) {
9350 wrapped.emplace_back(
9351 Wrap<E>(
9352 item,
9353 factory
9354 )
9355 );
9356 }
9357
9358 that->set_supplemental_semantic_ids(
9359 common::make_optional(
9360 std::move(wrapped)
9361 )
9362 );
9363 }
9364
9365 if (that->qualifiers().has_value()) {
9366 const std::vector<
9367 std::shared_ptr<types::IQualifier>
9368 >& value(
9369 that->qualifiers().value()
9370 );
9371 const std::size_t size = value.size();
9372
9373 std::vector<
9374 std::shared_ptr<types::IQualifier>
9375 > wrapped;
9376 wrapped.reserve(size);
9377
9378 for (
9379 const std::shared_ptr<types::IQualifier>& item
9380 : value
9381 ) {
9382 wrapped.emplace_back(
9383 Wrap<E>(
9384 item,
9385 factory
9386 )
9387 );
9388 }
9389
9390 that->set_qualifiers(
9391 common::make_optional(
9392 std::move(wrapped)
9393 )
9394 );
9395 }
9396
9397 if (that->embedded_data_specifications().has_value()) {
9398 const std::vector<
9399 std::shared_ptr<types::IEmbeddedDataSpecification>
9400 >& value(
9401 that->embedded_data_specifications().value()
9402 );
9403 const std::size_t size = value.size();
9404
9405 std::vector<
9406 std::shared_ptr<types::IEmbeddedDataSpecification>
9407 > wrapped;
9408 wrapped.reserve(size);
9409
9410 for (
9411 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9412 : value
9413 ) {
9414 wrapped.emplace_back(
9415 Wrap<E>(
9416 item,
9417 factory
9418 )
9419 );
9420 }
9421
9422 that->set_embedded_data_specifications(
9423 common::make_optional(
9424 std::move(wrapped)
9425 )
9426 );
9427 }
9428
9429 if (that->semantic_id_list_element().has_value()) {
9430 const std::shared_ptr<types::IReference>& value(
9431 that->semantic_id_list_element().value()
9432 );
9433
9434 std::shared_ptr<
9436 > wrapped(
9437 Wrap<E>(
9438 value,
9439 factory
9440 )
9441 );
9442
9443 that->set_semantic_id_list_element(
9444 common::make_optional(
9445 std::move(wrapped)
9446 )
9447 );
9448 }
9449
9450 if (that->value().has_value()) {
9451 const std::vector<
9452 std::shared_ptr<types::ISubmodelElement>
9453 >& value(
9454 that->value().value()
9455 );
9456 const std::size_t size = value.size();
9457
9458 std::vector<
9459 std::shared_ptr<types::ISubmodelElement>
9460 > wrapped;
9461 wrapped.reserve(size);
9462
9463 for (
9464 const std::shared_ptr<types::ISubmodelElement>& item
9465 : value
9466 ) {
9467 wrapped.emplace_back(
9468 Wrap<E>(
9469 item,
9470 factory
9471 )
9472 );
9473 }
9474
9475 that->set_value(
9476 common::make_optional(
9477 std::move(wrapped)
9478 )
9479 );
9480 }
9481
9482 std::shared_ptr<E> enh(
9483 factory(that)
9484 );
9485 return (enh == nullptr)
9486 ? that
9487 : std::shared_ptr<types::ISubmodelElementList>(
9488 new EnhancedSubmodelElementList<E>(
9489 that,
9490 enh
9491 )
9492 );
9493}
9494
9504template<typename E>
9505std::shared_ptr<types::ISubmodelElementCollection> WrapSubmodelElementCollection(
9506 const std::shared_ptr<types::ISubmodelElementCollection>& that,
9507 const std::function<
9508 std::shared_ptr<E>(
9509 const std::shared_ptr<types::IClass>&
9510 )
9511 >& factory
9512) {
9513 // We assume that we already checked whether `that` has been enhanced
9514 // in the caller.
9515
9516 if (that->extensions().has_value()) {
9517 const std::vector<
9518 std::shared_ptr<types::IExtension>
9519 >& value(
9520 that->extensions().value()
9521 );
9522 const std::size_t size = value.size();
9523
9524 std::vector<
9525 std::shared_ptr<types::IExtension>
9526 > wrapped;
9527 wrapped.reserve(size);
9528
9529 for (
9530 const std::shared_ptr<types::IExtension>& item
9531 : value
9532 ) {
9533 wrapped.emplace_back(
9534 Wrap<E>(
9535 item,
9536 factory
9537 )
9538 );
9539 }
9540
9541 that->set_extensions(
9542 common::make_optional(
9543 std::move(wrapped)
9544 )
9545 );
9546 }
9547
9548 if (that->display_name().has_value()) {
9549 const std::vector<
9550 std::shared_ptr<types::ILangStringNameType>
9551 >& value(
9552 that->display_name().value()
9553 );
9554 const std::size_t size = value.size();
9555
9556 std::vector<
9557 std::shared_ptr<types::ILangStringNameType>
9558 > wrapped;
9559 wrapped.reserve(size);
9560
9561 for (
9562 const std::shared_ptr<types::ILangStringNameType>& item
9563 : value
9564 ) {
9565 wrapped.emplace_back(
9566 Wrap<E>(
9567 item,
9568 factory
9569 )
9570 );
9571 }
9572
9573 that->set_display_name(
9574 common::make_optional(
9575 std::move(wrapped)
9576 )
9577 );
9578 }
9579
9580 if (that->description().has_value()) {
9581 const std::vector<
9582 std::shared_ptr<types::ILangStringTextType>
9583 >& value(
9584 that->description().value()
9585 );
9586 const std::size_t size = value.size();
9587
9588 std::vector<
9589 std::shared_ptr<types::ILangStringTextType>
9590 > wrapped;
9591 wrapped.reserve(size);
9592
9593 for (
9594 const std::shared_ptr<types::ILangStringTextType>& item
9595 : value
9596 ) {
9597 wrapped.emplace_back(
9598 Wrap<E>(
9599 item,
9600 factory
9601 )
9602 );
9603 }
9604
9605 that->set_description(
9606 common::make_optional(
9607 std::move(wrapped)
9608 )
9609 );
9610 }
9611
9612 if (that->semantic_id().has_value()) {
9613 const std::shared_ptr<types::IReference>& value(
9614 that->semantic_id().value()
9615 );
9616
9617 std::shared_ptr<
9619 > wrapped(
9620 Wrap<E>(
9621 value,
9622 factory
9623 )
9624 );
9625
9626 that->set_semantic_id(
9627 common::make_optional(
9628 std::move(wrapped)
9629 )
9630 );
9631 }
9632
9633 if (that->supplemental_semantic_ids().has_value()) {
9634 const std::vector<
9635 std::shared_ptr<types::IReference>
9636 >& value(
9637 that->supplemental_semantic_ids().value()
9638 );
9639 const std::size_t size = value.size();
9640
9641 std::vector<
9642 std::shared_ptr<types::IReference>
9643 > wrapped;
9644 wrapped.reserve(size);
9645
9646 for (
9647 const std::shared_ptr<types::IReference>& item
9648 : value
9649 ) {
9650 wrapped.emplace_back(
9651 Wrap<E>(
9652 item,
9653 factory
9654 )
9655 );
9656 }
9657
9658 that->set_supplemental_semantic_ids(
9659 common::make_optional(
9660 std::move(wrapped)
9661 )
9662 );
9663 }
9664
9665 if (that->qualifiers().has_value()) {
9666 const std::vector<
9667 std::shared_ptr<types::IQualifier>
9668 >& value(
9669 that->qualifiers().value()
9670 );
9671 const std::size_t size = value.size();
9672
9673 std::vector<
9674 std::shared_ptr<types::IQualifier>
9675 > wrapped;
9676 wrapped.reserve(size);
9677
9678 for (
9679 const std::shared_ptr<types::IQualifier>& item
9680 : value
9681 ) {
9682 wrapped.emplace_back(
9683 Wrap<E>(
9684 item,
9685 factory
9686 )
9687 );
9688 }
9689
9690 that->set_qualifiers(
9691 common::make_optional(
9692 std::move(wrapped)
9693 )
9694 );
9695 }
9696
9697 if (that->embedded_data_specifications().has_value()) {
9698 const std::vector<
9699 std::shared_ptr<types::IEmbeddedDataSpecification>
9700 >& value(
9701 that->embedded_data_specifications().value()
9702 );
9703 const std::size_t size = value.size();
9704
9705 std::vector<
9706 std::shared_ptr<types::IEmbeddedDataSpecification>
9707 > wrapped;
9708 wrapped.reserve(size);
9709
9710 for (
9711 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9712 : value
9713 ) {
9714 wrapped.emplace_back(
9715 Wrap<E>(
9716 item,
9717 factory
9718 )
9719 );
9720 }
9721
9722 that->set_embedded_data_specifications(
9723 common::make_optional(
9724 std::move(wrapped)
9725 )
9726 );
9727 }
9728
9729 if (that->value().has_value()) {
9730 const std::vector<
9731 std::shared_ptr<types::ISubmodelElement>
9732 >& value(
9733 that->value().value()
9734 );
9735 const std::size_t size = value.size();
9736
9737 std::vector<
9738 std::shared_ptr<types::ISubmodelElement>
9739 > wrapped;
9740 wrapped.reserve(size);
9741
9742 for (
9743 const std::shared_ptr<types::ISubmodelElement>& item
9744 : value
9745 ) {
9746 wrapped.emplace_back(
9747 Wrap<E>(
9748 item,
9749 factory
9750 )
9751 );
9752 }
9753
9754 that->set_value(
9755 common::make_optional(
9756 std::move(wrapped)
9757 )
9758 );
9759 }
9760
9761 std::shared_ptr<E> enh(
9762 factory(that)
9763 );
9764 return (enh == nullptr)
9765 ? that
9766 : std::shared_ptr<types::ISubmodelElementCollection>(
9767 new EnhancedSubmodelElementCollection<E>(
9768 that,
9769 enh
9770 )
9771 );
9772}
9773
9783template<typename E>
9784std::shared_ptr<types::IProperty> WrapProperty(
9785 const std::shared_ptr<types::IProperty>& that,
9786 const std::function<
9787 std::shared_ptr<E>(
9788 const std::shared_ptr<types::IClass>&
9789 )
9790 >& factory
9791) {
9792 // We assume that we already checked whether `that` has been enhanced
9793 // in the caller.
9794
9795 if (that->extensions().has_value()) {
9796 const std::vector<
9797 std::shared_ptr<types::IExtension>
9798 >& value(
9799 that->extensions().value()
9800 );
9801 const std::size_t size = value.size();
9802
9803 std::vector<
9804 std::shared_ptr<types::IExtension>
9805 > wrapped;
9806 wrapped.reserve(size);
9807
9808 for (
9809 const std::shared_ptr<types::IExtension>& item
9810 : value
9811 ) {
9812 wrapped.emplace_back(
9813 Wrap<E>(
9814 item,
9815 factory
9816 )
9817 );
9818 }
9819
9820 that->set_extensions(
9821 common::make_optional(
9822 std::move(wrapped)
9823 )
9824 );
9825 }
9826
9827 if (that->display_name().has_value()) {
9828 const std::vector<
9829 std::shared_ptr<types::ILangStringNameType>
9830 >& value(
9831 that->display_name().value()
9832 );
9833 const std::size_t size = value.size();
9834
9835 std::vector<
9836 std::shared_ptr<types::ILangStringNameType>
9837 > wrapped;
9838 wrapped.reserve(size);
9839
9840 for (
9841 const std::shared_ptr<types::ILangStringNameType>& item
9842 : value
9843 ) {
9844 wrapped.emplace_back(
9845 Wrap<E>(
9846 item,
9847 factory
9848 )
9849 );
9850 }
9851
9852 that->set_display_name(
9853 common::make_optional(
9854 std::move(wrapped)
9855 )
9856 );
9857 }
9858
9859 if (that->description().has_value()) {
9860 const std::vector<
9861 std::shared_ptr<types::ILangStringTextType>
9862 >& value(
9863 that->description().value()
9864 );
9865 const std::size_t size = value.size();
9866
9867 std::vector<
9868 std::shared_ptr<types::ILangStringTextType>
9869 > wrapped;
9870 wrapped.reserve(size);
9871
9872 for (
9873 const std::shared_ptr<types::ILangStringTextType>& item
9874 : value
9875 ) {
9876 wrapped.emplace_back(
9877 Wrap<E>(
9878 item,
9879 factory
9880 )
9881 );
9882 }
9883
9884 that->set_description(
9885 common::make_optional(
9886 std::move(wrapped)
9887 )
9888 );
9889 }
9890
9891 if (that->semantic_id().has_value()) {
9892 const std::shared_ptr<types::IReference>& value(
9893 that->semantic_id().value()
9894 );
9895
9896 std::shared_ptr<
9898 > wrapped(
9899 Wrap<E>(
9900 value,
9901 factory
9902 )
9903 );
9904
9905 that->set_semantic_id(
9906 common::make_optional(
9907 std::move(wrapped)
9908 )
9909 );
9910 }
9911
9912 if (that->supplemental_semantic_ids().has_value()) {
9913 const std::vector<
9914 std::shared_ptr<types::IReference>
9915 >& value(
9916 that->supplemental_semantic_ids().value()
9917 );
9918 const std::size_t size = value.size();
9919
9920 std::vector<
9921 std::shared_ptr<types::IReference>
9922 > wrapped;
9923 wrapped.reserve(size);
9924
9925 for (
9926 const std::shared_ptr<types::IReference>& item
9927 : value
9928 ) {
9929 wrapped.emplace_back(
9930 Wrap<E>(
9931 item,
9932 factory
9933 )
9934 );
9935 }
9936
9937 that->set_supplemental_semantic_ids(
9938 common::make_optional(
9939 std::move(wrapped)
9940 )
9941 );
9942 }
9943
9944 if (that->qualifiers().has_value()) {
9945 const std::vector<
9946 std::shared_ptr<types::IQualifier>
9947 >& value(
9948 that->qualifiers().value()
9949 );
9950 const std::size_t size = value.size();
9951
9952 std::vector<
9953 std::shared_ptr<types::IQualifier>
9954 > wrapped;
9955 wrapped.reserve(size);
9956
9957 for (
9958 const std::shared_ptr<types::IQualifier>& item
9959 : value
9960 ) {
9961 wrapped.emplace_back(
9962 Wrap<E>(
9963 item,
9964 factory
9965 )
9966 );
9967 }
9968
9969 that->set_qualifiers(
9970 common::make_optional(
9971 std::move(wrapped)
9972 )
9973 );
9974 }
9975
9976 if (that->embedded_data_specifications().has_value()) {
9977 const std::vector<
9978 std::shared_ptr<types::IEmbeddedDataSpecification>
9979 >& value(
9980 that->embedded_data_specifications().value()
9981 );
9982 const std::size_t size = value.size();
9983
9984 std::vector<
9985 std::shared_ptr<types::IEmbeddedDataSpecification>
9986 > wrapped;
9987 wrapped.reserve(size);
9988
9989 for (
9990 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9991 : value
9992 ) {
9993 wrapped.emplace_back(
9994 Wrap<E>(
9995 item,
9996 factory
9997 )
9998 );
9999 }
10000
10001 that->set_embedded_data_specifications(
10002 common::make_optional(
10003 std::move(wrapped)
10004 )
10005 );
10006 }
10007
10008 if (that->value_id().has_value()) {
10009 const std::shared_ptr<types::IReference>& value(
10010 that->value_id().value()
10011 );
10012
10013 std::shared_ptr<
10015 > wrapped(
10016 Wrap<E>(
10017 value,
10018 factory
10019 )
10020 );
10021
10022 that->set_value_id(
10023 common::make_optional(
10024 std::move(wrapped)
10025 )
10026 );
10027 }
10028
10029 std::shared_ptr<E> enh(
10030 factory(that)
10031 );
10032 return (enh == nullptr)
10033 ? that
10034 : std::shared_ptr<types::IProperty>(
10035 new EnhancedProperty<E>(
10036 that,
10037 enh
10038 )
10039 );
10040}
10041
10051template<typename E>
10052std::shared_ptr<types::IMultiLanguageProperty> WrapMultiLanguageProperty(
10053 const std::shared_ptr<types::IMultiLanguageProperty>& that,
10054 const std::function<
10055 std::shared_ptr<E>(
10056 const std::shared_ptr<types::IClass>&
10057 )
10058 >& factory
10059) {
10060 // We assume that we already checked whether `that` has been enhanced
10061 // in the caller.
10062
10063 if (that->extensions().has_value()) {
10064 const std::vector<
10065 std::shared_ptr<types::IExtension>
10066 >& value(
10067 that->extensions().value()
10068 );
10069 const std::size_t size = value.size();
10070
10071 std::vector<
10072 std::shared_ptr<types::IExtension>
10073 > wrapped;
10074 wrapped.reserve(size);
10075
10076 for (
10077 const std::shared_ptr<types::IExtension>& item
10078 : value
10079 ) {
10080 wrapped.emplace_back(
10081 Wrap<E>(
10082 item,
10083 factory
10084 )
10085 );
10086 }
10087
10088 that->set_extensions(
10089 common::make_optional(
10090 std::move(wrapped)
10091 )
10092 );
10093 }
10094
10095 if (that->display_name().has_value()) {
10096 const std::vector<
10097 std::shared_ptr<types::ILangStringNameType>
10098 >& value(
10099 that->display_name().value()
10100 );
10101 const std::size_t size = value.size();
10102
10103 std::vector<
10104 std::shared_ptr<types::ILangStringNameType>
10105 > wrapped;
10106 wrapped.reserve(size);
10107
10108 for (
10109 const std::shared_ptr<types::ILangStringNameType>& item
10110 : value
10111 ) {
10112 wrapped.emplace_back(
10113 Wrap<E>(
10114 item,
10115 factory
10116 )
10117 );
10118 }
10119
10120 that->set_display_name(
10121 common::make_optional(
10122 std::move(wrapped)
10123 )
10124 );
10125 }
10126
10127 if (that->description().has_value()) {
10128 const std::vector<
10129 std::shared_ptr<types::ILangStringTextType>
10130 >& value(
10131 that->description().value()
10132 );
10133 const std::size_t size = value.size();
10134
10135 std::vector<
10136 std::shared_ptr<types::ILangStringTextType>
10137 > wrapped;
10138 wrapped.reserve(size);
10139
10140 for (
10141 const std::shared_ptr<types::ILangStringTextType>& item
10142 : value
10143 ) {
10144 wrapped.emplace_back(
10145 Wrap<E>(
10146 item,
10147 factory
10148 )
10149 );
10150 }
10151
10152 that->set_description(
10153 common::make_optional(
10154 std::move(wrapped)
10155 )
10156 );
10157 }
10158
10159 if (that->semantic_id().has_value()) {
10160 const std::shared_ptr<types::IReference>& value(
10161 that->semantic_id().value()
10162 );
10163
10164 std::shared_ptr<
10166 > wrapped(
10167 Wrap<E>(
10168 value,
10169 factory
10170 )
10171 );
10172
10173 that->set_semantic_id(
10174 common::make_optional(
10175 std::move(wrapped)
10176 )
10177 );
10178 }
10179
10180 if (that->supplemental_semantic_ids().has_value()) {
10181 const std::vector<
10182 std::shared_ptr<types::IReference>
10183 >& value(
10184 that->supplemental_semantic_ids().value()
10185 );
10186 const std::size_t size = value.size();
10187
10188 std::vector<
10189 std::shared_ptr<types::IReference>
10190 > wrapped;
10191 wrapped.reserve(size);
10192
10193 for (
10194 const std::shared_ptr<types::IReference>& item
10195 : value
10196 ) {
10197 wrapped.emplace_back(
10198 Wrap<E>(
10199 item,
10200 factory
10201 )
10202 );
10203 }
10204
10205 that->set_supplemental_semantic_ids(
10206 common::make_optional(
10207 std::move(wrapped)
10208 )
10209 );
10210 }
10211
10212 if (that->qualifiers().has_value()) {
10213 const std::vector<
10214 std::shared_ptr<types::IQualifier>
10215 >& value(
10216 that->qualifiers().value()
10217 );
10218 const std::size_t size = value.size();
10219
10220 std::vector<
10221 std::shared_ptr<types::IQualifier>
10222 > wrapped;
10223 wrapped.reserve(size);
10224
10225 for (
10226 const std::shared_ptr<types::IQualifier>& item
10227 : value
10228 ) {
10229 wrapped.emplace_back(
10230 Wrap<E>(
10231 item,
10232 factory
10233 )
10234 );
10235 }
10236
10237 that->set_qualifiers(
10238 common::make_optional(
10239 std::move(wrapped)
10240 )
10241 );
10242 }
10243
10244 if (that->embedded_data_specifications().has_value()) {
10245 const std::vector<
10246 std::shared_ptr<types::IEmbeddedDataSpecification>
10247 >& value(
10248 that->embedded_data_specifications().value()
10249 );
10250 const std::size_t size = value.size();
10251
10252 std::vector<
10253 std::shared_ptr<types::IEmbeddedDataSpecification>
10254 > wrapped;
10255 wrapped.reserve(size);
10256
10257 for (
10258 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10259 : value
10260 ) {
10261 wrapped.emplace_back(
10262 Wrap<E>(
10263 item,
10264 factory
10265 )
10266 );
10267 }
10268
10269 that->set_embedded_data_specifications(
10270 common::make_optional(
10271 std::move(wrapped)
10272 )
10273 );
10274 }
10275
10276 if (that->value().has_value()) {
10277 const std::vector<
10278 std::shared_ptr<types::ILangStringTextType>
10279 >& value(
10280 that->value().value()
10281 );
10282 const std::size_t size = value.size();
10283
10284 std::vector<
10285 std::shared_ptr<types::ILangStringTextType>
10286 > wrapped;
10287 wrapped.reserve(size);
10288
10289 for (
10290 const std::shared_ptr<types::ILangStringTextType>& item
10291 : value
10292 ) {
10293 wrapped.emplace_back(
10294 Wrap<E>(
10295 item,
10296 factory
10297 )
10298 );
10299 }
10300
10301 that->set_value(
10302 common::make_optional(
10303 std::move(wrapped)
10304 )
10305 );
10306 }
10307
10308 if (that->value_id().has_value()) {
10309 const std::shared_ptr<types::IReference>& value(
10310 that->value_id().value()
10311 );
10312
10313 std::shared_ptr<
10315 > wrapped(
10316 Wrap<E>(
10317 value,
10318 factory
10319 )
10320 );
10321
10322 that->set_value_id(
10323 common::make_optional(
10324 std::move(wrapped)
10325 )
10326 );
10327 }
10328
10329 std::shared_ptr<E> enh(
10330 factory(that)
10331 );
10332 return (enh == nullptr)
10333 ? that
10334 : std::shared_ptr<types::IMultiLanguageProperty>(
10335 new EnhancedMultiLanguageProperty<E>(
10336 that,
10337 enh
10338 )
10339 );
10340}
10341
10351template<typename E>
10352std::shared_ptr<types::IRange> WrapRange(
10353 const std::shared_ptr<types::IRange>& that,
10354 const std::function<
10355 std::shared_ptr<E>(
10356 const std::shared_ptr<types::IClass>&
10357 )
10358 >& factory
10359) {
10360 // We assume that we already checked whether `that` has been enhanced
10361 // in the caller.
10362
10363 if (that->extensions().has_value()) {
10364 const std::vector<
10365 std::shared_ptr<types::IExtension>
10366 >& value(
10367 that->extensions().value()
10368 );
10369 const std::size_t size = value.size();
10370
10371 std::vector<
10372 std::shared_ptr<types::IExtension>
10373 > wrapped;
10374 wrapped.reserve(size);
10375
10376 for (
10377 const std::shared_ptr<types::IExtension>& item
10378 : value
10379 ) {
10380 wrapped.emplace_back(
10381 Wrap<E>(
10382 item,
10383 factory
10384 )
10385 );
10386 }
10387
10388 that->set_extensions(
10389 common::make_optional(
10390 std::move(wrapped)
10391 )
10392 );
10393 }
10394
10395 if (that->display_name().has_value()) {
10396 const std::vector<
10397 std::shared_ptr<types::ILangStringNameType>
10398 >& value(
10399 that->display_name().value()
10400 );
10401 const std::size_t size = value.size();
10402
10403 std::vector<
10404 std::shared_ptr<types::ILangStringNameType>
10405 > wrapped;
10406 wrapped.reserve(size);
10407
10408 for (
10409 const std::shared_ptr<types::ILangStringNameType>& item
10410 : value
10411 ) {
10412 wrapped.emplace_back(
10413 Wrap<E>(
10414 item,
10415 factory
10416 )
10417 );
10418 }
10419
10420 that->set_display_name(
10421 common::make_optional(
10422 std::move(wrapped)
10423 )
10424 );
10425 }
10426
10427 if (that->description().has_value()) {
10428 const std::vector<
10429 std::shared_ptr<types::ILangStringTextType>
10430 >& value(
10431 that->description().value()
10432 );
10433 const std::size_t size = value.size();
10434
10435 std::vector<
10436 std::shared_ptr<types::ILangStringTextType>
10437 > wrapped;
10438 wrapped.reserve(size);
10439
10440 for (
10441 const std::shared_ptr<types::ILangStringTextType>& item
10442 : value
10443 ) {
10444 wrapped.emplace_back(
10445 Wrap<E>(
10446 item,
10447 factory
10448 )
10449 );
10450 }
10451
10452 that->set_description(
10453 common::make_optional(
10454 std::move(wrapped)
10455 )
10456 );
10457 }
10458
10459 if (that->semantic_id().has_value()) {
10460 const std::shared_ptr<types::IReference>& value(
10461 that->semantic_id().value()
10462 );
10463
10464 std::shared_ptr<
10466 > wrapped(
10467 Wrap<E>(
10468 value,
10469 factory
10470 )
10471 );
10472
10473 that->set_semantic_id(
10474 common::make_optional(
10475 std::move(wrapped)
10476 )
10477 );
10478 }
10479
10480 if (that->supplemental_semantic_ids().has_value()) {
10481 const std::vector<
10482 std::shared_ptr<types::IReference>
10483 >& value(
10484 that->supplemental_semantic_ids().value()
10485 );
10486 const std::size_t size = value.size();
10487
10488 std::vector<
10489 std::shared_ptr<types::IReference>
10490 > wrapped;
10491 wrapped.reserve(size);
10492
10493 for (
10494 const std::shared_ptr<types::IReference>& item
10495 : value
10496 ) {
10497 wrapped.emplace_back(
10498 Wrap<E>(
10499 item,
10500 factory
10501 )
10502 );
10503 }
10504
10505 that->set_supplemental_semantic_ids(
10506 common::make_optional(
10507 std::move(wrapped)
10508 )
10509 );
10510 }
10511
10512 if (that->qualifiers().has_value()) {
10513 const std::vector<
10514 std::shared_ptr<types::IQualifier>
10515 >& value(
10516 that->qualifiers().value()
10517 );
10518 const std::size_t size = value.size();
10519
10520 std::vector<
10521 std::shared_ptr<types::IQualifier>
10522 > wrapped;
10523 wrapped.reserve(size);
10524
10525 for (
10526 const std::shared_ptr<types::IQualifier>& item
10527 : value
10528 ) {
10529 wrapped.emplace_back(
10530 Wrap<E>(
10531 item,
10532 factory
10533 )
10534 );
10535 }
10536
10537 that->set_qualifiers(
10538 common::make_optional(
10539 std::move(wrapped)
10540 )
10541 );
10542 }
10543
10544 if (that->embedded_data_specifications().has_value()) {
10545 const std::vector<
10546 std::shared_ptr<types::IEmbeddedDataSpecification>
10547 >& value(
10548 that->embedded_data_specifications().value()
10549 );
10550 const std::size_t size = value.size();
10551
10552 std::vector<
10553 std::shared_ptr<types::IEmbeddedDataSpecification>
10554 > wrapped;
10555 wrapped.reserve(size);
10556
10557 for (
10558 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10559 : value
10560 ) {
10561 wrapped.emplace_back(
10562 Wrap<E>(
10563 item,
10564 factory
10565 )
10566 );
10567 }
10568
10569 that->set_embedded_data_specifications(
10570 common::make_optional(
10571 std::move(wrapped)
10572 )
10573 );
10574 }
10575
10576 std::shared_ptr<E> enh(
10577 factory(that)
10578 );
10579 return (enh == nullptr)
10580 ? that
10581 : std::shared_ptr<types::IRange>(
10582 new EnhancedRange<E>(
10583 that,
10584 enh
10585 )
10586 );
10587}
10588
10598template<typename E>
10599std::shared_ptr<types::IReferenceElement> WrapReferenceElement(
10600 const std::shared_ptr<types::IReferenceElement>& that,
10601 const std::function<
10602 std::shared_ptr<E>(
10603 const std::shared_ptr<types::IClass>&
10604 )
10605 >& factory
10606) {
10607 // We assume that we already checked whether `that` has been enhanced
10608 // in the caller.
10609
10610 if (that->extensions().has_value()) {
10611 const std::vector<
10612 std::shared_ptr<types::IExtension>
10613 >& value(
10614 that->extensions().value()
10615 );
10616 const std::size_t size = value.size();
10617
10618 std::vector<
10619 std::shared_ptr<types::IExtension>
10620 > wrapped;
10621 wrapped.reserve(size);
10622
10623 for (
10624 const std::shared_ptr<types::IExtension>& item
10625 : value
10626 ) {
10627 wrapped.emplace_back(
10628 Wrap<E>(
10629 item,
10630 factory
10631 )
10632 );
10633 }
10634
10635 that->set_extensions(
10636 common::make_optional(
10637 std::move(wrapped)
10638 )
10639 );
10640 }
10641
10642 if (that->display_name().has_value()) {
10643 const std::vector<
10644 std::shared_ptr<types::ILangStringNameType>
10645 >& value(
10646 that->display_name().value()
10647 );
10648 const std::size_t size = value.size();
10649
10650 std::vector<
10651 std::shared_ptr<types::ILangStringNameType>
10652 > wrapped;
10653 wrapped.reserve(size);
10654
10655 for (
10656 const std::shared_ptr<types::ILangStringNameType>& item
10657 : value
10658 ) {
10659 wrapped.emplace_back(
10660 Wrap<E>(
10661 item,
10662 factory
10663 )
10664 );
10665 }
10666
10667 that->set_display_name(
10668 common::make_optional(
10669 std::move(wrapped)
10670 )
10671 );
10672 }
10673
10674 if (that->description().has_value()) {
10675 const std::vector<
10676 std::shared_ptr<types::ILangStringTextType>
10677 >& value(
10678 that->description().value()
10679 );
10680 const std::size_t size = value.size();
10681
10682 std::vector<
10683 std::shared_ptr<types::ILangStringTextType>
10684 > wrapped;
10685 wrapped.reserve(size);
10686
10687 for (
10688 const std::shared_ptr<types::ILangStringTextType>& item
10689 : value
10690 ) {
10691 wrapped.emplace_back(
10692 Wrap<E>(
10693 item,
10694 factory
10695 )
10696 );
10697 }
10698
10699 that->set_description(
10700 common::make_optional(
10701 std::move(wrapped)
10702 )
10703 );
10704 }
10705
10706 if (that->semantic_id().has_value()) {
10707 const std::shared_ptr<types::IReference>& value(
10708 that->semantic_id().value()
10709 );
10710
10711 std::shared_ptr<
10713 > wrapped(
10714 Wrap<E>(
10715 value,
10716 factory
10717 )
10718 );
10719
10720 that->set_semantic_id(
10721 common::make_optional(
10722 std::move(wrapped)
10723 )
10724 );
10725 }
10726
10727 if (that->supplemental_semantic_ids().has_value()) {
10728 const std::vector<
10729 std::shared_ptr<types::IReference>
10730 >& value(
10731 that->supplemental_semantic_ids().value()
10732 );
10733 const std::size_t size = value.size();
10734
10735 std::vector<
10736 std::shared_ptr<types::IReference>
10737 > wrapped;
10738 wrapped.reserve(size);
10739
10740 for (
10741 const std::shared_ptr<types::IReference>& item
10742 : value
10743 ) {
10744 wrapped.emplace_back(
10745 Wrap<E>(
10746 item,
10747 factory
10748 )
10749 );
10750 }
10751
10752 that->set_supplemental_semantic_ids(
10753 common::make_optional(
10754 std::move(wrapped)
10755 )
10756 );
10757 }
10758
10759 if (that->qualifiers().has_value()) {
10760 const std::vector<
10761 std::shared_ptr<types::IQualifier>
10762 >& value(
10763 that->qualifiers().value()
10764 );
10765 const std::size_t size = value.size();
10766
10767 std::vector<
10768 std::shared_ptr<types::IQualifier>
10769 > wrapped;
10770 wrapped.reserve(size);
10771
10772 for (
10773 const std::shared_ptr<types::IQualifier>& item
10774 : value
10775 ) {
10776 wrapped.emplace_back(
10777 Wrap<E>(
10778 item,
10779 factory
10780 )
10781 );
10782 }
10783
10784 that->set_qualifiers(
10785 common::make_optional(
10786 std::move(wrapped)
10787 )
10788 );
10789 }
10790
10791 if (that->embedded_data_specifications().has_value()) {
10792 const std::vector<
10793 std::shared_ptr<types::IEmbeddedDataSpecification>
10794 >& value(
10795 that->embedded_data_specifications().value()
10796 );
10797 const std::size_t size = value.size();
10798
10799 std::vector<
10800 std::shared_ptr<types::IEmbeddedDataSpecification>
10801 > wrapped;
10802 wrapped.reserve(size);
10803
10804 for (
10805 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10806 : value
10807 ) {
10808 wrapped.emplace_back(
10809 Wrap<E>(
10810 item,
10811 factory
10812 )
10813 );
10814 }
10815
10816 that->set_embedded_data_specifications(
10817 common::make_optional(
10818 std::move(wrapped)
10819 )
10820 );
10821 }
10822
10823 if (that->value().has_value()) {
10824 const std::shared_ptr<types::IReference>& value(
10825 that->value().value()
10826 );
10827
10828 std::shared_ptr<
10830 > wrapped(
10831 Wrap<E>(
10832 value,
10833 factory
10834 )
10835 );
10836
10837 that->set_value(
10838 common::make_optional(
10839 std::move(wrapped)
10840 )
10841 );
10842 }
10843
10844 std::shared_ptr<E> enh(
10845 factory(that)
10846 );
10847 return (enh == nullptr)
10848 ? that
10849 : std::shared_ptr<types::IReferenceElement>(
10850 new EnhancedReferenceElement<E>(
10851 that,
10852 enh
10853 )
10854 );
10855}
10856
10866template<typename E>
10867std::shared_ptr<types::IBlob> WrapBlob(
10868 const std::shared_ptr<types::IBlob>& that,
10869 const std::function<
10870 std::shared_ptr<E>(
10871 const std::shared_ptr<types::IClass>&
10872 )
10873 >& factory
10874) {
10875 // We assume that we already checked whether `that` has been enhanced
10876 // in the caller.
10877
10878 if (that->extensions().has_value()) {
10879 const std::vector<
10880 std::shared_ptr<types::IExtension>
10881 >& value(
10882 that->extensions().value()
10883 );
10884 const std::size_t size = value.size();
10885
10886 std::vector<
10887 std::shared_ptr<types::IExtension>
10888 > wrapped;
10889 wrapped.reserve(size);
10890
10891 for (
10892 const std::shared_ptr<types::IExtension>& item
10893 : value
10894 ) {
10895 wrapped.emplace_back(
10896 Wrap<E>(
10897 item,
10898 factory
10899 )
10900 );
10901 }
10902
10903 that->set_extensions(
10904 common::make_optional(
10905 std::move(wrapped)
10906 )
10907 );
10908 }
10909
10910 if (that->display_name().has_value()) {
10911 const std::vector<
10912 std::shared_ptr<types::ILangStringNameType>
10913 >& value(
10914 that->display_name().value()
10915 );
10916 const std::size_t size = value.size();
10917
10918 std::vector<
10919 std::shared_ptr<types::ILangStringNameType>
10920 > wrapped;
10921 wrapped.reserve(size);
10922
10923 for (
10924 const std::shared_ptr<types::ILangStringNameType>& item
10925 : value
10926 ) {
10927 wrapped.emplace_back(
10928 Wrap<E>(
10929 item,
10930 factory
10931 )
10932 );
10933 }
10934
10935 that->set_display_name(
10936 common::make_optional(
10937 std::move(wrapped)
10938 )
10939 );
10940 }
10941
10942 if (that->description().has_value()) {
10943 const std::vector<
10944 std::shared_ptr<types::ILangStringTextType>
10945 >& value(
10946 that->description().value()
10947 );
10948 const std::size_t size = value.size();
10949
10950 std::vector<
10951 std::shared_ptr<types::ILangStringTextType>
10952 > wrapped;
10953 wrapped.reserve(size);
10954
10955 for (
10956 const std::shared_ptr<types::ILangStringTextType>& item
10957 : value
10958 ) {
10959 wrapped.emplace_back(
10960 Wrap<E>(
10961 item,
10962 factory
10963 )
10964 );
10965 }
10966
10967 that->set_description(
10968 common::make_optional(
10969 std::move(wrapped)
10970 )
10971 );
10972 }
10973
10974 if (that->semantic_id().has_value()) {
10975 const std::shared_ptr<types::IReference>& value(
10976 that->semantic_id().value()
10977 );
10978
10979 std::shared_ptr<
10981 > wrapped(
10982 Wrap<E>(
10983 value,
10984 factory
10985 )
10986 );
10987
10988 that->set_semantic_id(
10989 common::make_optional(
10990 std::move(wrapped)
10991 )
10992 );
10993 }
10994
10995 if (that->supplemental_semantic_ids().has_value()) {
10996 const std::vector<
10997 std::shared_ptr<types::IReference>
10998 >& value(
10999 that->supplemental_semantic_ids().value()
11000 );
11001 const std::size_t size = value.size();
11002
11003 std::vector<
11004 std::shared_ptr<types::IReference>
11005 > wrapped;
11006 wrapped.reserve(size);
11007
11008 for (
11009 const std::shared_ptr<types::IReference>& item
11010 : value
11011 ) {
11012 wrapped.emplace_back(
11013 Wrap<E>(
11014 item,
11015 factory
11016 )
11017 );
11018 }
11019
11020 that->set_supplemental_semantic_ids(
11021 common::make_optional(
11022 std::move(wrapped)
11023 )
11024 );
11025 }
11026
11027 if (that->qualifiers().has_value()) {
11028 const std::vector<
11029 std::shared_ptr<types::IQualifier>
11030 >& value(
11031 that->qualifiers().value()
11032 );
11033 const std::size_t size = value.size();
11034
11035 std::vector<
11036 std::shared_ptr<types::IQualifier>
11037 > wrapped;
11038 wrapped.reserve(size);
11039
11040 for (
11041 const std::shared_ptr<types::IQualifier>& item
11042 : value
11043 ) {
11044 wrapped.emplace_back(
11045 Wrap<E>(
11046 item,
11047 factory
11048 )
11049 );
11050 }
11051
11052 that->set_qualifiers(
11053 common::make_optional(
11054 std::move(wrapped)
11055 )
11056 );
11057 }
11058
11059 if (that->embedded_data_specifications().has_value()) {
11060 const std::vector<
11061 std::shared_ptr<types::IEmbeddedDataSpecification>
11062 >& value(
11063 that->embedded_data_specifications().value()
11064 );
11065 const std::size_t size = value.size();
11066
11067 std::vector<
11068 std::shared_ptr<types::IEmbeddedDataSpecification>
11069 > wrapped;
11070 wrapped.reserve(size);
11071
11072 for (
11073 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11074 : value
11075 ) {
11076 wrapped.emplace_back(
11077 Wrap<E>(
11078 item,
11079 factory
11080 )
11081 );
11082 }
11083
11084 that->set_embedded_data_specifications(
11085 common::make_optional(
11086 std::move(wrapped)
11087 )
11088 );
11089 }
11090
11091 std::shared_ptr<E> enh(
11092 factory(that)
11093 );
11094 return (enh == nullptr)
11095 ? that
11096 : std::shared_ptr<types::IBlob>(
11097 new EnhancedBlob<E>(
11098 that,
11099 enh
11100 )
11101 );
11102}
11103
11113template<typename E>
11114std::shared_ptr<types::IFile> WrapFile(
11115 const std::shared_ptr<types::IFile>& that,
11116 const std::function<
11117 std::shared_ptr<E>(
11118 const std::shared_ptr<types::IClass>&
11119 )
11120 >& factory
11121) {
11122 // We assume that we already checked whether `that` has been enhanced
11123 // in the caller.
11124
11125 if (that->extensions().has_value()) {
11126 const std::vector<
11127 std::shared_ptr<types::IExtension>
11128 >& value(
11129 that->extensions().value()
11130 );
11131 const std::size_t size = value.size();
11132
11133 std::vector<
11134 std::shared_ptr<types::IExtension>
11135 > wrapped;
11136 wrapped.reserve(size);
11137
11138 for (
11139 const std::shared_ptr<types::IExtension>& item
11140 : value
11141 ) {
11142 wrapped.emplace_back(
11143 Wrap<E>(
11144 item,
11145 factory
11146 )
11147 );
11148 }
11149
11150 that->set_extensions(
11151 common::make_optional(
11152 std::move(wrapped)
11153 )
11154 );
11155 }
11156
11157 if (that->display_name().has_value()) {
11158 const std::vector<
11159 std::shared_ptr<types::ILangStringNameType>
11160 >& value(
11161 that->display_name().value()
11162 );
11163 const std::size_t size = value.size();
11164
11165 std::vector<
11166 std::shared_ptr<types::ILangStringNameType>
11167 > wrapped;
11168 wrapped.reserve(size);
11169
11170 for (
11171 const std::shared_ptr<types::ILangStringNameType>& item
11172 : value
11173 ) {
11174 wrapped.emplace_back(
11175 Wrap<E>(
11176 item,
11177 factory
11178 )
11179 );
11180 }
11181
11182 that->set_display_name(
11183 common::make_optional(
11184 std::move(wrapped)
11185 )
11186 );
11187 }
11188
11189 if (that->description().has_value()) {
11190 const std::vector<
11191 std::shared_ptr<types::ILangStringTextType>
11192 >& value(
11193 that->description().value()
11194 );
11195 const std::size_t size = value.size();
11196
11197 std::vector<
11198 std::shared_ptr<types::ILangStringTextType>
11199 > wrapped;
11200 wrapped.reserve(size);
11201
11202 for (
11203 const std::shared_ptr<types::ILangStringTextType>& item
11204 : value
11205 ) {
11206 wrapped.emplace_back(
11207 Wrap<E>(
11208 item,
11209 factory
11210 )
11211 );
11212 }
11213
11214 that->set_description(
11215 common::make_optional(
11216 std::move(wrapped)
11217 )
11218 );
11219 }
11220
11221 if (that->semantic_id().has_value()) {
11222 const std::shared_ptr<types::IReference>& value(
11223 that->semantic_id().value()
11224 );
11225
11226 std::shared_ptr<
11228 > wrapped(
11229 Wrap<E>(
11230 value,
11231 factory
11232 )
11233 );
11234
11235 that->set_semantic_id(
11236 common::make_optional(
11237 std::move(wrapped)
11238 )
11239 );
11240 }
11241
11242 if (that->supplemental_semantic_ids().has_value()) {
11243 const std::vector<
11244 std::shared_ptr<types::IReference>
11245 >& value(
11246 that->supplemental_semantic_ids().value()
11247 );
11248 const std::size_t size = value.size();
11249
11250 std::vector<
11251 std::shared_ptr<types::IReference>
11252 > wrapped;
11253 wrapped.reserve(size);
11254
11255 for (
11256 const std::shared_ptr<types::IReference>& item
11257 : value
11258 ) {
11259 wrapped.emplace_back(
11260 Wrap<E>(
11261 item,
11262 factory
11263 )
11264 );
11265 }
11266
11267 that->set_supplemental_semantic_ids(
11268 common::make_optional(
11269 std::move(wrapped)
11270 )
11271 );
11272 }
11273
11274 if (that->qualifiers().has_value()) {
11275 const std::vector<
11276 std::shared_ptr<types::IQualifier>
11277 >& value(
11278 that->qualifiers().value()
11279 );
11280 const std::size_t size = value.size();
11281
11282 std::vector<
11283 std::shared_ptr<types::IQualifier>
11284 > wrapped;
11285 wrapped.reserve(size);
11286
11287 for (
11288 const std::shared_ptr<types::IQualifier>& item
11289 : value
11290 ) {
11291 wrapped.emplace_back(
11292 Wrap<E>(
11293 item,
11294 factory
11295 )
11296 );
11297 }
11298
11299 that->set_qualifiers(
11300 common::make_optional(
11301 std::move(wrapped)
11302 )
11303 );
11304 }
11305
11306 if (that->embedded_data_specifications().has_value()) {
11307 const std::vector<
11308 std::shared_ptr<types::IEmbeddedDataSpecification>
11309 >& value(
11310 that->embedded_data_specifications().value()
11311 );
11312 const std::size_t size = value.size();
11313
11314 std::vector<
11315 std::shared_ptr<types::IEmbeddedDataSpecification>
11316 > wrapped;
11317 wrapped.reserve(size);
11318
11319 for (
11320 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11321 : value
11322 ) {
11323 wrapped.emplace_back(
11324 Wrap<E>(
11325 item,
11326 factory
11327 )
11328 );
11329 }
11330
11331 that->set_embedded_data_specifications(
11332 common::make_optional(
11333 std::move(wrapped)
11334 )
11335 );
11336 }
11337
11338 std::shared_ptr<E> enh(
11339 factory(that)
11340 );
11341 return (enh == nullptr)
11342 ? that
11343 : std::shared_ptr<types::IFile>(
11344 new EnhancedFile<E>(
11345 that,
11346 enh
11347 )
11348 );
11349}
11350
11360template<typename E>
11361std::shared_ptr<types::IAnnotatedRelationshipElement> WrapAnnotatedRelationshipElement(
11362 const std::shared_ptr<types::IAnnotatedRelationshipElement>& that,
11363 const std::function<
11364 std::shared_ptr<E>(
11365 const std::shared_ptr<types::IClass>&
11366 )
11367 >& factory
11368) {
11369 // We assume that we already checked whether `that` has been enhanced
11370 // in the caller.
11371
11372 if (that->extensions().has_value()) {
11373 const std::vector<
11374 std::shared_ptr<types::IExtension>
11375 >& value(
11376 that->extensions().value()
11377 );
11378 const std::size_t size = value.size();
11379
11380 std::vector<
11381 std::shared_ptr<types::IExtension>
11382 > wrapped;
11383 wrapped.reserve(size);
11384
11385 for (
11386 const std::shared_ptr<types::IExtension>& item
11387 : value
11388 ) {
11389 wrapped.emplace_back(
11390 Wrap<E>(
11391 item,
11392 factory
11393 )
11394 );
11395 }
11396
11397 that->set_extensions(
11398 common::make_optional(
11399 std::move(wrapped)
11400 )
11401 );
11402 }
11403
11404 if (that->display_name().has_value()) {
11405 const std::vector<
11406 std::shared_ptr<types::ILangStringNameType>
11407 >& value(
11408 that->display_name().value()
11409 );
11410 const std::size_t size = value.size();
11411
11412 std::vector<
11413 std::shared_ptr<types::ILangStringNameType>
11414 > wrapped;
11415 wrapped.reserve(size);
11416
11417 for (
11418 const std::shared_ptr<types::ILangStringNameType>& item
11419 : value
11420 ) {
11421 wrapped.emplace_back(
11422 Wrap<E>(
11423 item,
11424 factory
11425 )
11426 );
11427 }
11428
11429 that->set_display_name(
11430 common::make_optional(
11431 std::move(wrapped)
11432 )
11433 );
11434 }
11435
11436 if (that->description().has_value()) {
11437 const std::vector<
11438 std::shared_ptr<types::ILangStringTextType>
11439 >& value(
11440 that->description().value()
11441 );
11442 const std::size_t size = value.size();
11443
11444 std::vector<
11445 std::shared_ptr<types::ILangStringTextType>
11446 > wrapped;
11447 wrapped.reserve(size);
11448
11449 for (
11450 const std::shared_ptr<types::ILangStringTextType>& item
11451 : value
11452 ) {
11453 wrapped.emplace_back(
11454 Wrap<E>(
11455 item,
11456 factory
11457 )
11458 );
11459 }
11460
11461 that->set_description(
11462 common::make_optional(
11463 std::move(wrapped)
11464 )
11465 );
11466 }
11467
11468 if (that->semantic_id().has_value()) {
11469 const std::shared_ptr<types::IReference>& value(
11470 that->semantic_id().value()
11471 );
11472
11473 std::shared_ptr<
11475 > wrapped(
11476 Wrap<E>(
11477 value,
11478 factory
11479 )
11480 );
11481
11482 that->set_semantic_id(
11483 common::make_optional(
11484 std::move(wrapped)
11485 )
11486 );
11487 }
11488
11489 if (that->supplemental_semantic_ids().has_value()) {
11490 const std::vector<
11491 std::shared_ptr<types::IReference>
11492 >& value(
11493 that->supplemental_semantic_ids().value()
11494 );
11495 const std::size_t size = value.size();
11496
11497 std::vector<
11498 std::shared_ptr<types::IReference>
11499 > wrapped;
11500 wrapped.reserve(size);
11501
11502 for (
11503 const std::shared_ptr<types::IReference>& item
11504 : value
11505 ) {
11506 wrapped.emplace_back(
11507 Wrap<E>(
11508 item,
11509 factory
11510 )
11511 );
11512 }
11513
11514 that->set_supplemental_semantic_ids(
11515 common::make_optional(
11516 std::move(wrapped)
11517 )
11518 );
11519 }
11520
11521 if (that->qualifiers().has_value()) {
11522 const std::vector<
11523 std::shared_ptr<types::IQualifier>
11524 >& value(
11525 that->qualifiers().value()
11526 );
11527 const std::size_t size = value.size();
11528
11529 std::vector<
11530 std::shared_ptr<types::IQualifier>
11531 > wrapped;
11532 wrapped.reserve(size);
11533
11534 for (
11535 const std::shared_ptr<types::IQualifier>& item
11536 : value
11537 ) {
11538 wrapped.emplace_back(
11539 Wrap<E>(
11540 item,
11541 factory
11542 )
11543 );
11544 }
11545
11546 that->set_qualifiers(
11547 common::make_optional(
11548 std::move(wrapped)
11549 )
11550 );
11551 }
11552
11553 if (that->embedded_data_specifications().has_value()) {
11554 const std::vector<
11555 std::shared_ptr<types::IEmbeddedDataSpecification>
11556 >& value(
11557 that->embedded_data_specifications().value()
11558 );
11559 const std::size_t size = value.size();
11560
11561 std::vector<
11562 std::shared_ptr<types::IEmbeddedDataSpecification>
11563 > wrapped;
11564 wrapped.reserve(size);
11565
11566 for (
11567 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11568 : value
11569 ) {
11570 wrapped.emplace_back(
11571 Wrap<E>(
11572 item,
11573 factory
11574 )
11575 );
11576 }
11577
11578 that->set_embedded_data_specifications(
11579 common::make_optional(
11580 std::move(wrapped)
11581 )
11582 );
11583 }
11584
11585 that->set_first(
11586 Wrap<E>(
11587 that->first(),
11588 factory
11589 )
11590 );
11591
11592 that->set_second(
11593 Wrap<E>(
11594 that->second(),
11595 factory
11596 )
11597 );
11598
11599 if (that->annotations().has_value()) {
11600 const std::vector<
11601 std::shared_ptr<types::IDataElement>
11602 >& value(
11603 that->annotations().value()
11604 );
11605 const std::size_t size = value.size();
11606
11607 std::vector<
11608 std::shared_ptr<types::IDataElement>
11609 > wrapped;
11610 wrapped.reserve(size);
11611
11612 for (
11613 const std::shared_ptr<types::IDataElement>& item
11614 : value
11615 ) {
11616 wrapped.emplace_back(
11617 Wrap<E>(
11618 item,
11619 factory
11620 )
11621 );
11622 }
11623
11624 that->set_annotations(
11625 common::make_optional(
11626 std::move(wrapped)
11627 )
11628 );
11629 }
11630
11631 std::shared_ptr<E> enh(
11632 factory(that)
11633 );
11634 return (enh == nullptr)
11635 ? that
11636 : std::shared_ptr<types::IAnnotatedRelationshipElement>(
11637 new EnhancedAnnotatedRelationshipElement<E>(
11638 that,
11639 enh
11640 )
11641 );
11642}
11643
11653template<typename E>
11654std::shared_ptr<types::IEntity> WrapEntity(
11655 const std::shared_ptr<types::IEntity>& that,
11656 const std::function<
11657 std::shared_ptr<E>(
11658 const std::shared_ptr<types::IClass>&
11659 )
11660 >& factory
11661) {
11662 // We assume that we already checked whether `that` has been enhanced
11663 // in the caller.
11664
11665 if (that->extensions().has_value()) {
11666 const std::vector<
11667 std::shared_ptr<types::IExtension>
11668 >& value(
11669 that->extensions().value()
11670 );
11671 const std::size_t size = value.size();
11672
11673 std::vector<
11674 std::shared_ptr<types::IExtension>
11675 > wrapped;
11676 wrapped.reserve(size);
11677
11678 for (
11679 const std::shared_ptr<types::IExtension>& item
11680 : value
11681 ) {
11682 wrapped.emplace_back(
11683 Wrap<E>(
11684 item,
11685 factory
11686 )
11687 );
11688 }
11689
11690 that->set_extensions(
11691 common::make_optional(
11692 std::move(wrapped)
11693 )
11694 );
11695 }
11696
11697 if (that->display_name().has_value()) {
11698 const std::vector<
11699 std::shared_ptr<types::ILangStringNameType>
11700 >& value(
11701 that->display_name().value()
11702 );
11703 const std::size_t size = value.size();
11704
11705 std::vector<
11706 std::shared_ptr<types::ILangStringNameType>
11707 > wrapped;
11708 wrapped.reserve(size);
11709
11710 for (
11711 const std::shared_ptr<types::ILangStringNameType>& item
11712 : value
11713 ) {
11714 wrapped.emplace_back(
11715 Wrap<E>(
11716 item,
11717 factory
11718 )
11719 );
11720 }
11721
11722 that->set_display_name(
11723 common::make_optional(
11724 std::move(wrapped)
11725 )
11726 );
11727 }
11728
11729 if (that->description().has_value()) {
11730 const std::vector<
11731 std::shared_ptr<types::ILangStringTextType>
11732 >& value(
11733 that->description().value()
11734 );
11735 const std::size_t size = value.size();
11736
11737 std::vector<
11738 std::shared_ptr<types::ILangStringTextType>
11739 > wrapped;
11740 wrapped.reserve(size);
11741
11742 for (
11743 const std::shared_ptr<types::ILangStringTextType>& item
11744 : value
11745 ) {
11746 wrapped.emplace_back(
11747 Wrap<E>(
11748 item,
11749 factory
11750 )
11751 );
11752 }
11753
11754 that->set_description(
11755 common::make_optional(
11756 std::move(wrapped)
11757 )
11758 );
11759 }
11760
11761 if (that->semantic_id().has_value()) {
11762 const std::shared_ptr<types::IReference>& value(
11763 that->semantic_id().value()
11764 );
11765
11766 std::shared_ptr<
11768 > wrapped(
11769 Wrap<E>(
11770 value,
11771 factory
11772 )
11773 );
11774
11775 that->set_semantic_id(
11776 common::make_optional(
11777 std::move(wrapped)
11778 )
11779 );
11780 }
11781
11782 if (that->supplemental_semantic_ids().has_value()) {
11783 const std::vector<
11784 std::shared_ptr<types::IReference>
11785 >& value(
11786 that->supplemental_semantic_ids().value()
11787 );
11788 const std::size_t size = value.size();
11789
11790 std::vector<
11791 std::shared_ptr<types::IReference>
11792 > wrapped;
11793 wrapped.reserve(size);
11794
11795 for (
11796 const std::shared_ptr<types::IReference>& item
11797 : value
11798 ) {
11799 wrapped.emplace_back(
11800 Wrap<E>(
11801 item,
11802 factory
11803 )
11804 );
11805 }
11806
11807 that->set_supplemental_semantic_ids(
11808 common::make_optional(
11809 std::move(wrapped)
11810 )
11811 );
11812 }
11813
11814 if (that->qualifiers().has_value()) {
11815 const std::vector<
11816 std::shared_ptr<types::IQualifier>
11817 >& value(
11818 that->qualifiers().value()
11819 );
11820 const std::size_t size = value.size();
11821
11822 std::vector<
11823 std::shared_ptr<types::IQualifier>
11824 > wrapped;
11825 wrapped.reserve(size);
11826
11827 for (
11828 const std::shared_ptr<types::IQualifier>& item
11829 : value
11830 ) {
11831 wrapped.emplace_back(
11832 Wrap<E>(
11833 item,
11834 factory
11835 )
11836 );
11837 }
11838
11839 that->set_qualifiers(
11840 common::make_optional(
11841 std::move(wrapped)
11842 )
11843 );
11844 }
11845
11846 if (that->embedded_data_specifications().has_value()) {
11847 const std::vector<
11848 std::shared_ptr<types::IEmbeddedDataSpecification>
11849 >& value(
11850 that->embedded_data_specifications().value()
11851 );
11852 const std::size_t size = value.size();
11853
11854 std::vector<
11855 std::shared_ptr<types::IEmbeddedDataSpecification>
11856 > wrapped;
11857 wrapped.reserve(size);
11858
11859 for (
11860 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11861 : value
11862 ) {
11863 wrapped.emplace_back(
11864 Wrap<E>(
11865 item,
11866 factory
11867 )
11868 );
11869 }
11870
11871 that->set_embedded_data_specifications(
11872 common::make_optional(
11873 std::move(wrapped)
11874 )
11875 );
11876 }
11877
11878 if (that->statements().has_value()) {
11879 const std::vector<
11880 std::shared_ptr<types::ISubmodelElement>
11881 >& value(
11882 that->statements().value()
11883 );
11884 const std::size_t size = value.size();
11885
11886 std::vector<
11887 std::shared_ptr<types::ISubmodelElement>
11888 > wrapped;
11889 wrapped.reserve(size);
11890
11891 for (
11892 const std::shared_ptr<types::ISubmodelElement>& item
11893 : value
11894 ) {
11895 wrapped.emplace_back(
11896 Wrap<E>(
11897 item,
11898 factory
11899 )
11900 );
11901 }
11902
11903 that->set_statements(
11904 common::make_optional(
11905 std::move(wrapped)
11906 )
11907 );
11908 }
11909
11910 if (that->specific_asset_ids().has_value()) {
11911 const std::vector<
11912 std::shared_ptr<types::ISpecificAssetId>
11913 >& value(
11914 that->specific_asset_ids().value()
11915 );
11916 const std::size_t size = value.size();
11917
11918 std::vector<
11919 std::shared_ptr<types::ISpecificAssetId>
11920 > wrapped;
11921 wrapped.reserve(size);
11922
11923 for (
11924 const std::shared_ptr<types::ISpecificAssetId>& item
11925 : value
11926 ) {
11927 wrapped.emplace_back(
11928 Wrap<E>(
11929 item,
11930 factory
11931 )
11932 );
11933 }
11934
11935 that->set_specific_asset_ids(
11936 common::make_optional(
11937 std::move(wrapped)
11938 )
11939 );
11940 }
11941
11942 std::shared_ptr<E> enh(
11943 factory(that)
11944 );
11945 return (enh == nullptr)
11946 ? that
11947 : std::shared_ptr<types::IEntity>(
11948 new EnhancedEntity<E>(
11949 that,
11950 enh
11951 )
11952 );
11953}
11954
11964template<typename E>
11965std::shared_ptr<types::IEventPayload> WrapEventPayload(
11966 const std::shared_ptr<types::IEventPayload>& that,
11967 const std::function<
11968 std::shared_ptr<E>(
11969 const std::shared_ptr<types::IClass>&
11970 )
11971 >& factory
11972) {
11973 // We assume that we already checked whether `that` has been enhanced
11974 // in the caller.
11975
11976 that->set_source(
11977 Wrap<E>(
11978 that->source(),
11979 factory
11980 )
11981 );
11982
11983 if (that->source_semantic_id().has_value()) {
11984 const std::shared_ptr<types::IReference>& value(
11985 that->source_semantic_id().value()
11986 );
11987
11988 std::shared_ptr<
11990 > wrapped(
11991 Wrap<E>(
11992 value,
11993 factory
11994 )
11995 );
11996
11997 that->set_source_semantic_id(
11998 common::make_optional(
11999 std::move(wrapped)
12000 )
12001 );
12002 }
12003
12004 that->set_observable_reference(
12005 Wrap<E>(
12006 that->observable_reference(),
12007 factory
12008 )
12009 );
12010
12011 if (that->observable_semantic_id().has_value()) {
12012 const std::shared_ptr<types::IReference>& value(
12013 that->observable_semantic_id().value()
12014 );
12015
12016 std::shared_ptr<
12018 > wrapped(
12019 Wrap<E>(
12020 value,
12021 factory
12022 )
12023 );
12024
12025 that->set_observable_semantic_id(
12026 common::make_optional(
12027 std::move(wrapped)
12028 )
12029 );
12030 }
12031
12032 if (that->subject_id().has_value()) {
12033 const std::shared_ptr<types::IReference>& value(
12034 that->subject_id().value()
12035 );
12036
12037 std::shared_ptr<
12039 > wrapped(
12040 Wrap<E>(
12041 value,
12042 factory
12043 )
12044 );
12045
12046 that->set_subject_id(
12047 common::make_optional(
12048 std::move(wrapped)
12049 )
12050 );
12051 }
12052
12053 std::shared_ptr<E> enh(
12054 factory(that)
12055 );
12056 return (enh == nullptr)
12057 ? that
12058 : std::shared_ptr<types::IEventPayload>(
12059 new EnhancedEventPayload<E>(
12060 that,
12061 enh
12062 )
12063 );
12064}
12065
12075template<typename E>
12076std::shared_ptr<types::IBasicEventElement> WrapBasicEventElement(
12077 const std::shared_ptr<types::IBasicEventElement>& that,
12078 const std::function<
12079 std::shared_ptr<E>(
12080 const std::shared_ptr<types::IClass>&
12081 )
12082 >& factory
12083) {
12084 // We assume that we already checked whether `that` has been enhanced
12085 // in the caller.
12086
12087 if (that->extensions().has_value()) {
12088 const std::vector<
12089 std::shared_ptr<types::IExtension>
12090 >& value(
12091 that->extensions().value()
12092 );
12093 const std::size_t size = value.size();
12094
12095 std::vector<
12096 std::shared_ptr<types::IExtension>
12097 > wrapped;
12098 wrapped.reserve(size);
12099
12100 for (
12101 const std::shared_ptr<types::IExtension>& item
12102 : value
12103 ) {
12104 wrapped.emplace_back(
12105 Wrap<E>(
12106 item,
12107 factory
12108 )
12109 );
12110 }
12111
12112 that->set_extensions(
12113 common::make_optional(
12114 std::move(wrapped)
12115 )
12116 );
12117 }
12118
12119 if (that->display_name().has_value()) {
12120 const std::vector<
12121 std::shared_ptr<types::ILangStringNameType>
12122 >& value(
12123 that->display_name().value()
12124 );
12125 const std::size_t size = value.size();
12126
12127 std::vector<
12128 std::shared_ptr<types::ILangStringNameType>
12129 > wrapped;
12130 wrapped.reserve(size);
12131
12132 for (
12133 const std::shared_ptr<types::ILangStringNameType>& item
12134 : value
12135 ) {
12136 wrapped.emplace_back(
12137 Wrap<E>(
12138 item,
12139 factory
12140 )
12141 );
12142 }
12143
12144 that->set_display_name(
12145 common::make_optional(
12146 std::move(wrapped)
12147 )
12148 );
12149 }
12150
12151 if (that->description().has_value()) {
12152 const std::vector<
12153 std::shared_ptr<types::ILangStringTextType>
12154 >& value(
12155 that->description().value()
12156 );
12157 const std::size_t size = value.size();
12158
12159 std::vector<
12160 std::shared_ptr<types::ILangStringTextType>
12161 > wrapped;
12162 wrapped.reserve(size);
12163
12164 for (
12165 const std::shared_ptr<types::ILangStringTextType>& item
12166 : value
12167 ) {
12168 wrapped.emplace_back(
12169 Wrap<E>(
12170 item,
12171 factory
12172 )
12173 );
12174 }
12175
12176 that->set_description(
12177 common::make_optional(
12178 std::move(wrapped)
12179 )
12180 );
12181 }
12182
12183 if (that->semantic_id().has_value()) {
12184 const std::shared_ptr<types::IReference>& value(
12185 that->semantic_id().value()
12186 );
12187
12188 std::shared_ptr<
12190 > wrapped(
12191 Wrap<E>(
12192 value,
12193 factory
12194 )
12195 );
12196
12197 that->set_semantic_id(
12198 common::make_optional(
12199 std::move(wrapped)
12200 )
12201 );
12202 }
12203
12204 if (that->supplemental_semantic_ids().has_value()) {
12205 const std::vector<
12206 std::shared_ptr<types::IReference>
12207 >& value(
12208 that->supplemental_semantic_ids().value()
12209 );
12210 const std::size_t size = value.size();
12211
12212 std::vector<
12213 std::shared_ptr<types::IReference>
12214 > wrapped;
12215 wrapped.reserve(size);
12216
12217 for (
12218 const std::shared_ptr<types::IReference>& item
12219 : value
12220 ) {
12221 wrapped.emplace_back(
12222 Wrap<E>(
12223 item,
12224 factory
12225 )
12226 );
12227 }
12228
12229 that->set_supplemental_semantic_ids(
12230 common::make_optional(
12231 std::move(wrapped)
12232 )
12233 );
12234 }
12235
12236 if (that->qualifiers().has_value()) {
12237 const std::vector<
12238 std::shared_ptr<types::IQualifier>
12239 >& value(
12240 that->qualifiers().value()
12241 );
12242 const std::size_t size = value.size();
12243
12244 std::vector<
12245 std::shared_ptr<types::IQualifier>
12246 > wrapped;
12247 wrapped.reserve(size);
12248
12249 for (
12250 const std::shared_ptr<types::IQualifier>& item
12251 : value
12252 ) {
12253 wrapped.emplace_back(
12254 Wrap<E>(
12255 item,
12256 factory
12257 )
12258 );
12259 }
12260
12261 that->set_qualifiers(
12262 common::make_optional(
12263 std::move(wrapped)
12264 )
12265 );
12266 }
12267
12268 if (that->embedded_data_specifications().has_value()) {
12269 const std::vector<
12270 std::shared_ptr<types::IEmbeddedDataSpecification>
12271 >& value(
12272 that->embedded_data_specifications().value()
12273 );
12274 const std::size_t size = value.size();
12275
12276 std::vector<
12277 std::shared_ptr<types::IEmbeddedDataSpecification>
12278 > wrapped;
12279 wrapped.reserve(size);
12280
12281 for (
12282 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12283 : value
12284 ) {
12285 wrapped.emplace_back(
12286 Wrap<E>(
12287 item,
12288 factory
12289 )
12290 );
12291 }
12292
12293 that->set_embedded_data_specifications(
12294 common::make_optional(
12295 std::move(wrapped)
12296 )
12297 );
12298 }
12299
12300 that->set_observed(
12301 Wrap<E>(
12302 that->observed(),
12303 factory
12304 )
12305 );
12306
12307 if (that->message_broker().has_value()) {
12308 const std::shared_ptr<types::IReference>& value(
12309 that->message_broker().value()
12310 );
12311
12312 std::shared_ptr<
12314 > wrapped(
12315 Wrap<E>(
12316 value,
12317 factory
12318 )
12319 );
12320
12321 that->set_message_broker(
12322 common::make_optional(
12323 std::move(wrapped)
12324 )
12325 );
12326 }
12327
12328 std::shared_ptr<E> enh(
12329 factory(that)
12330 );
12331 return (enh == nullptr)
12332 ? that
12333 : std::shared_ptr<types::IBasicEventElement>(
12334 new EnhancedBasicEventElement<E>(
12335 that,
12336 enh
12337 )
12338 );
12339}
12340
12350template<typename E>
12351std::shared_ptr<types::IOperation> WrapOperation(
12352 const std::shared_ptr<types::IOperation>& that,
12353 const std::function<
12354 std::shared_ptr<E>(
12355 const std::shared_ptr<types::IClass>&
12356 )
12357 >& factory
12358) {
12359 // We assume that we already checked whether `that` has been enhanced
12360 // in the caller.
12361
12362 if (that->extensions().has_value()) {
12363 const std::vector<
12364 std::shared_ptr<types::IExtension>
12365 >& value(
12366 that->extensions().value()
12367 );
12368 const std::size_t size = value.size();
12369
12370 std::vector<
12371 std::shared_ptr<types::IExtension>
12372 > wrapped;
12373 wrapped.reserve(size);
12374
12375 for (
12376 const std::shared_ptr<types::IExtension>& item
12377 : value
12378 ) {
12379 wrapped.emplace_back(
12380 Wrap<E>(
12381 item,
12382 factory
12383 )
12384 );
12385 }
12386
12387 that->set_extensions(
12388 common::make_optional(
12389 std::move(wrapped)
12390 )
12391 );
12392 }
12393
12394 if (that->display_name().has_value()) {
12395 const std::vector<
12396 std::shared_ptr<types::ILangStringNameType>
12397 >& value(
12398 that->display_name().value()
12399 );
12400 const std::size_t size = value.size();
12401
12402 std::vector<
12403 std::shared_ptr<types::ILangStringNameType>
12404 > wrapped;
12405 wrapped.reserve(size);
12406
12407 for (
12408 const std::shared_ptr<types::ILangStringNameType>& item
12409 : value
12410 ) {
12411 wrapped.emplace_back(
12412 Wrap<E>(
12413 item,
12414 factory
12415 )
12416 );
12417 }
12418
12419 that->set_display_name(
12420 common::make_optional(
12421 std::move(wrapped)
12422 )
12423 );
12424 }
12425
12426 if (that->description().has_value()) {
12427 const std::vector<
12428 std::shared_ptr<types::ILangStringTextType>
12429 >& value(
12430 that->description().value()
12431 );
12432 const std::size_t size = value.size();
12433
12434 std::vector<
12435 std::shared_ptr<types::ILangStringTextType>
12436 > wrapped;
12437 wrapped.reserve(size);
12438
12439 for (
12440 const std::shared_ptr<types::ILangStringTextType>& item
12441 : value
12442 ) {
12443 wrapped.emplace_back(
12444 Wrap<E>(
12445 item,
12446 factory
12447 )
12448 );
12449 }
12450
12451 that->set_description(
12452 common::make_optional(
12453 std::move(wrapped)
12454 )
12455 );
12456 }
12457
12458 if (that->semantic_id().has_value()) {
12459 const std::shared_ptr<types::IReference>& value(
12460 that->semantic_id().value()
12461 );
12462
12463 std::shared_ptr<
12465 > wrapped(
12466 Wrap<E>(
12467 value,
12468 factory
12469 )
12470 );
12471
12472 that->set_semantic_id(
12473 common::make_optional(
12474 std::move(wrapped)
12475 )
12476 );
12477 }
12478
12479 if (that->supplemental_semantic_ids().has_value()) {
12480 const std::vector<
12481 std::shared_ptr<types::IReference>
12482 >& value(
12483 that->supplemental_semantic_ids().value()
12484 );
12485 const std::size_t size = value.size();
12486
12487 std::vector<
12488 std::shared_ptr<types::IReference>
12489 > wrapped;
12490 wrapped.reserve(size);
12491
12492 for (
12493 const std::shared_ptr<types::IReference>& item
12494 : value
12495 ) {
12496 wrapped.emplace_back(
12497 Wrap<E>(
12498 item,
12499 factory
12500 )
12501 );
12502 }
12503
12504 that->set_supplemental_semantic_ids(
12505 common::make_optional(
12506 std::move(wrapped)
12507 )
12508 );
12509 }
12510
12511 if (that->qualifiers().has_value()) {
12512 const std::vector<
12513 std::shared_ptr<types::IQualifier>
12514 >& value(
12515 that->qualifiers().value()
12516 );
12517 const std::size_t size = value.size();
12518
12519 std::vector<
12520 std::shared_ptr<types::IQualifier>
12521 > wrapped;
12522 wrapped.reserve(size);
12523
12524 for (
12525 const std::shared_ptr<types::IQualifier>& item
12526 : value
12527 ) {
12528 wrapped.emplace_back(
12529 Wrap<E>(
12530 item,
12531 factory
12532 )
12533 );
12534 }
12535
12536 that->set_qualifiers(
12537 common::make_optional(
12538 std::move(wrapped)
12539 )
12540 );
12541 }
12542
12543 if (that->embedded_data_specifications().has_value()) {
12544 const std::vector<
12545 std::shared_ptr<types::IEmbeddedDataSpecification>
12546 >& value(
12547 that->embedded_data_specifications().value()
12548 );
12549 const std::size_t size = value.size();
12550
12551 std::vector<
12552 std::shared_ptr<types::IEmbeddedDataSpecification>
12553 > wrapped;
12554 wrapped.reserve(size);
12555
12556 for (
12557 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12558 : value
12559 ) {
12560 wrapped.emplace_back(
12561 Wrap<E>(
12562 item,
12563 factory
12564 )
12565 );
12566 }
12567
12568 that->set_embedded_data_specifications(
12569 common::make_optional(
12570 std::move(wrapped)
12571 )
12572 );
12573 }
12574
12575 if (that->input_variables().has_value()) {
12576 const std::vector<
12577 std::shared_ptr<types::IOperationVariable>
12578 >& value(
12579 that->input_variables().value()
12580 );
12581 const std::size_t size = value.size();
12582
12583 std::vector<
12584 std::shared_ptr<types::IOperationVariable>
12585 > wrapped;
12586 wrapped.reserve(size);
12587
12588 for (
12589 const std::shared_ptr<types::IOperationVariable>& item
12590 : value
12591 ) {
12592 wrapped.emplace_back(
12593 Wrap<E>(
12594 item,
12595 factory
12596 )
12597 );
12598 }
12599
12600 that->set_input_variables(
12601 common::make_optional(
12602 std::move(wrapped)
12603 )
12604 );
12605 }
12606
12607 if (that->output_variables().has_value()) {
12608 const std::vector<
12609 std::shared_ptr<types::IOperationVariable>
12610 >& value(
12611 that->output_variables().value()
12612 );
12613 const std::size_t size = value.size();
12614
12615 std::vector<
12616 std::shared_ptr<types::IOperationVariable>
12617 > wrapped;
12618 wrapped.reserve(size);
12619
12620 for (
12621 const std::shared_ptr<types::IOperationVariable>& item
12622 : value
12623 ) {
12624 wrapped.emplace_back(
12625 Wrap<E>(
12626 item,
12627 factory
12628 )
12629 );
12630 }
12631
12632 that->set_output_variables(
12633 common::make_optional(
12634 std::move(wrapped)
12635 )
12636 );
12637 }
12638
12639 if (that->inoutput_variables().has_value()) {
12640 const std::vector<
12641 std::shared_ptr<types::IOperationVariable>
12642 >& value(
12643 that->inoutput_variables().value()
12644 );
12645 const std::size_t size = value.size();
12646
12647 std::vector<
12648 std::shared_ptr<types::IOperationVariable>
12649 > wrapped;
12650 wrapped.reserve(size);
12651
12652 for (
12653 const std::shared_ptr<types::IOperationVariable>& item
12654 : value
12655 ) {
12656 wrapped.emplace_back(
12657 Wrap<E>(
12658 item,
12659 factory
12660 )
12661 );
12662 }
12663
12664 that->set_inoutput_variables(
12665 common::make_optional(
12666 std::move(wrapped)
12667 )
12668 );
12669 }
12670
12671 std::shared_ptr<E> enh(
12672 factory(that)
12673 );
12674 return (enh == nullptr)
12675 ? that
12676 : std::shared_ptr<types::IOperation>(
12677 new EnhancedOperation<E>(
12678 that,
12679 enh
12680 )
12681 );
12682}
12683
12693template<typename E>
12694std::shared_ptr<types::IOperationVariable> WrapOperationVariable(
12695 const std::shared_ptr<types::IOperationVariable>& that,
12696 const std::function<
12697 std::shared_ptr<E>(
12698 const std::shared_ptr<types::IClass>&
12699 )
12700 >& factory
12701) {
12702 // We assume that we already checked whether `that` has been enhanced
12703 // in the caller.
12704
12705 that->set_value(
12706 Wrap<E>(
12707 that->value(),
12708 factory
12709 )
12710 );
12711
12712 std::shared_ptr<E> enh(
12713 factory(that)
12714 );
12715 return (enh == nullptr)
12716 ? that
12717 : std::shared_ptr<types::IOperationVariable>(
12718 new EnhancedOperationVariable<E>(
12719 that,
12720 enh
12721 )
12722 );
12723}
12724
12734template<typename E>
12735std::shared_ptr<types::ICapability> WrapCapability(
12736 const std::shared_ptr<types::ICapability>& that,
12737 const std::function<
12738 std::shared_ptr<E>(
12739 const std::shared_ptr<types::IClass>&
12740 )
12741 >& factory
12742) {
12743 // We assume that we already checked whether `that` has been enhanced
12744 // in the caller.
12745
12746 if (that->extensions().has_value()) {
12747 const std::vector<
12748 std::shared_ptr<types::IExtension>
12749 >& value(
12750 that->extensions().value()
12751 );
12752 const std::size_t size = value.size();
12753
12754 std::vector<
12755 std::shared_ptr<types::IExtension>
12756 > wrapped;
12757 wrapped.reserve(size);
12758
12759 for (
12760 const std::shared_ptr<types::IExtension>& item
12761 : value
12762 ) {
12763 wrapped.emplace_back(
12764 Wrap<E>(
12765 item,
12766 factory
12767 )
12768 );
12769 }
12770
12771 that->set_extensions(
12772 common::make_optional(
12773 std::move(wrapped)
12774 )
12775 );
12776 }
12777
12778 if (that->display_name().has_value()) {
12779 const std::vector<
12780 std::shared_ptr<types::ILangStringNameType>
12781 >& value(
12782 that->display_name().value()
12783 );
12784 const std::size_t size = value.size();
12785
12786 std::vector<
12787 std::shared_ptr<types::ILangStringNameType>
12788 > wrapped;
12789 wrapped.reserve(size);
12790
12791 for (
12792 const std::shared_ptr<types::ILangStringNameType>& item
12793 : value
12794 ) {
12795 wrapped.emplace_back(
12796 Wrap<E>(
12797 item,
12798 factory
12799 )
12800 );
12801 }
12802
12803 that->set_display_name(
12804 common::make_optional(
12805 std::move(wrapped)
12806 )
12807 );
12808 }
12809
12810 if (that->description().has_value()) {
12811 const std::vector<
12812 std::shared_ptr<types::ILangStringTextType>
12813 >& value(
12814 that->description().value()
12815 );
12816 const std::size_t size = value.size();
12817
12818 std::vector<
12819 std::shared_ptr<types::ILangStringTextType>
12820 > wrapped;
12821 wrapped.reserve(size);
12822
12823 for (
12824 const std::shared_ptr<types::ILangStringTextType>& item
12825 : value
12826 ) {
12827 wrapped.emplace_back(
12828 Wrap<E>(
12829 item,
12830 factory
12831 )
12832 );
12833 }
12834
12835 that->set_description(
12836 common::make_optional(
12837 std::move(wrapped)
12838 )
12839 );
12840 }
12841
12842 if (that->semantic_id().has_value()) {
12843 const std::shared_ptr<types::IReference>& value(
12844 that->semantic_id().value()
12845 );
12846
12847 std::shared_ptr<
12849 > wrapped(
12850 Wrap<E>(
12851 value,
12852 factory
12853 )
12854 );
12855
12856 that->set_semantic_id(
12857 common::make_optional(
12858 std::move(wrapped)
12859 )
12860 );
12861 }
12862
12863 if (that->supplemental_semantic_ids().has_value()) {
12864 const std::vector<
12865 std::shared_ptr<types::IReference>
12866 >& value(
12867 that->supplemental_semantic_ids().value()
12868 );
12869 const std::size_t size = value.size();
12870
12871 std::vector<
12872 std::shared_ptr<types::IReference>
12873 > wrapped;
12874 wrapped.reserve(size);
12875
12876 for (
12877 const std::shared_ptr<types::IReference>& item
12878 : value
12879 ) {
12880 wrapped.emplace_back(
12881 Wrap<E>(
12882 item,
12883 factory
12884 )
12885 );
12886 }
12887
12888 that->set_supplemental_semantic_ids(
12889 common::make_optional(
12890 std::move(wrapped)
12891 )
12892 );
12893 }
12894
12895 if (that->qualifiers().has_value()) {
12896 const std::vector<
12897 std::shared_ptr<types::IQualifier>
12898 >& value(
12899 that->qualifiers().value()
12900 );
12901 const std::size_t size = value.size();
12902
12903 std::vector<
12904 std::shared_ptr<types::IQualifier>
12905 > wrapped;
12906 wrapped.reserve(size);
12907
12908 for (
12909 const std::shared_ptr<types::IQualifier>& item
12910 : value
12911 ) {
12912 wrapped.emplace_back(
12913 Wrap<E>(
12914 item,
12915 factory
12916 )
12917 );
12918 }
12919
12920 that->set_qualifiers(
12921 common::make_optional(
12922 std::move(wrapped)
12923 )
12924 );
12925 }
12926
12927 if (that->embedded_data_specifications().has_value()) {
12928 const std::vector<
12929 std::shared_ptr<types::IEmbeddedDataSpecification>
12930 >& value(
12931 that->embedded_data_specifications().value()
12932 );
12933 const std::size_t size = value.size();
12934
12935 std::vector<
12936 std::shared_ptr<types::IEmbeddedDataSpecification>
12937 > wrapped;
12938 wrapped.reserve(size);
12939
12940 for (
12941 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12942 : value
12943 ) {
12944 wrapped.emplace_back(
12945 Wrap<E>(
12946 item,
12947 factory
12948 )
12949 );
12950 }
12951
12952 that->set_embedded_data_specifications(
12953 common::make_optional(
12954 std::move(wrapped)
12955 )
12956 );
12957 }
12958
12959 std::shared_ptr<E> enh(
12960 factory(that)
12961 );
12962 return (enh == nullptr)
12963 ? that
12964 : std::shared_ptr<types::ICapability>(
12965 new EnhancedCapability<E>(
12966 that,
12967 enh
12968 )
12969 );
12970}
12971
12981template<typename E>
12982std::shared_ptr<types::IConceptDescription> WrapConceptDescription(
12983 const std::shared_ptr<types::IConceptDescription>& that,
12984 const std::function<
12985 std::shared_ptr<E>(
12986 const std::shared_ptr<types::IClass>&
12987 )
12988 >& factory
12989) {
12990 // We assume that we already checked whether `that` has been enhanced
12991 // in the caller.
12992
12993 if (that->extensions().has_value()) {
12994 const std::vector<
12995 std::shared_ptr<types::IExtension>
12996 >& value(
12997 that->extensions().value()
12998 );
12999 const std::size_t size = value.size();
13000
13001 std::vector<
13002 std::shared_ptr<types::IExtension>
13003 > wrapped;
13004 wrapped.reserve(size);
13005
13006 for (
13007 const std::shared_ptr<types::IExtension>& item
13008 : value
13009 ) {
13010 wrapped.emplace_back(
13011 Wrap<E>(
13012 item,
13013 factory
13014 )
13015 );
13016 }
13017
13018 that->set_extensions(
13019 common::make_optional(
13020 std::move(wrapped)
13021 )
13022 );
13023 }
13024
13025 if (that->display_name().has_value()) {
13026 const std::vector<
13027 std::shared_ptr<types::ILangStringNameType>
13028 >& value(
13029 that->display_name().value()
13030 );
13031 const std::size_t size = value.size();
13032
13033 std::vector<
13034 std::shared_ptr<types::ILangStringNameType>
13035 > wrapped;
13036 wrapped.reserve(size);
13037
13038 for (
13039 const std::shared_ptr<types::ILangStringNameType>& item
13040 : value
13041 ) {
13042 wrapped.emplace_back(
13043 Wrap<E>(
13044 item,
13045 factory
13046 )
13047 );
13048 }
13049
13050 that->set_display_name(
13051 common::make_optional(
13052 std::move(wrapped)
13053 )
13054 );
13055 }
13056
13057 if (that->description().has_value()) {
13058 const std::vector<
13059 std::shared_ptr<types::ILangStringTextType>
13060 >& value(
13061 that->description().value()
13062 );
13063 const std::size_t size = value.size();
13064
13065 std::vector<
13066 std::shared_ptr<types::ILangStringTextType>
13067 > wrapped;
13068 wrapped.reserve(size);
13069
13070 for (
13071 const std::shared_ptr<types::ILangStringTextType>& item
13072 : value
13073 ) {
13074 wrapped.emplace_back(
13075 Wrap<E>(
13076 item,
13077 factory
13078 )
13079 );
13080 }
13081
13082 that->set_description(
13083 common::make_optional(
13084 std::move(wrapped)
13085 )
13086 );
13087 }
13088
13089 if (that->administration().has_value()) {
13090 const std::shared_ptr<types::IAdministrativeInformation>& value(
13091 that->administration().value()
13092 );
13093
13094 std::shared_ptr<
13096 > wrapped(
13097 Wrap<E>(
13098 value,
13099 factory
13100 )
13101 );
13102
13103 that->set_administration(
13104 common::make_optional(
13105 std::move(wrapped)
13106 )
13107 );
13108 }
13109
13110 if (that->embedded_data_specifications().has_value()) {
13111 const std::vector<
13112 std::shared_ptr<types::IEmbeddedDataSpecification>
13113 >& value(
13114 that->embedded_data_specifications().value()
13115 );
13116 const std::size_t size = value.size();
13117
13118 std::vector<
13119 std::shared_ptr<types::IEmbeddedDataSpecification>
13120 > wrapped;
13121 wrapped.reserve(size);
13122
13123 for (
13124 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
13125 : value
13126 ) {
13127 wrapped.emplace_back(
13128 Wrap<E>(
13129 item,
13130 factory
13131 )
13132 );
13133 }
13134
13135 that->set_embedded_data_specifications(
13136 common::make_optional(
13137 std::move(wrapped)
13138 )
13139 );
13140 }
13141
13142 if (that->is_case_of().has_value()) {
13143 const std::vector<
13144 std::shared_ptr<types::IReference>
13145 >& value(
13146 that->is_case_of().value()
13147 );
13148 const std::size_t size = value.size();
13149
13150 std::vector<
13151 std::shared_ptr<types::IReference>
13152 > wrapped;
13153 wrapped.reserve(size);
13154
13155 for (
13156 const std::shared_ptr<types::IReference>& item
13157 : value
13158 ) {
13159 wrapped.emplace_back(
13160 Wrap<E>(
13161 item,
13162 factory
13163 )
13164 );
13165 }
13166
13167 that->set_is_case_of(
13168 common::make_optional(
13169 std::move(wrapped)
13170 )
13171 );
13172 }
13173
13174 std::shared_ptr<E> enh(
13175 factory(that)
13176 );
13177 return (enh == nullptr)
13178 ? that
13179 : std::shared_ptr<types::IConceptDescription>(
13180 new EnhancedConceptDescription<E>(
13181 that,
13182 enh
13183 )
13184 );
13185}
13186
13196template<typename E>
13197std::shared_ptr<types::IReference> WrapReference(
13198 const std::shared_ptr<types::IReference>& that,
13199 const std::function<
13200 std::shared_ptr<E>(
13201 const std::shared_ptr<types::IClass>&
13202 )
13203 >& factory
13204) {
13205 // We assume that we already checked whether `that` has been enhanced
13206 // in the caller.
13207
13208 if (that->referred_semantic_id().has_value()) {
13209 const std::shared_ptr<types::IReference>& value(
13210 that->referred_semantic_id().value()
13211 );
13212
13213 std::shared_ptr<
13215 > wrapped(
13216 Wrap<E>(
13217 value,
13218 factory
13219 )
13220 );
13221
13222 that->set_referred_semantic_id(
13223 common::make_optional(
13224 std::move(wrapped)
13225 )
13226 );
13227 }
13228
13229 {
13230 const std::vector<
13231 std::shared_ptr<types::IKey>
13232 >& value(
13233 that->keys()
13234 );
13235 const std::size_t size = value.size();
13236
13237 std::vector<
13238 std::shared_ptr<types::IKey>
13239 > wrapped;
13240 wrapped.reserve(size);
13241
13242 for (
13243 const std::shared_ptr<types::IKey>& item
13244 : value
13245 ) {
13246 wrapped.emplace_back(
13247 Wrap<E>(
13248 item,
13249 factory
13250 )
13251 );
13252 }
13253
13254 that->set_keys(
13255 std::move(wrapped)
13256 );
13257 }
13258
13259 std::shared_ptr<E> enh(
13260 factory(that)
13261 );
13262 return (enh == nullptr)
13263 ? that
13264 : std::shared_ptr<types::IReference>(
13265 new EnhancedReference<E>(
13266 that,
13267 enh
13268 )
13269 );
13270}
13271
13281template<typename E>
13282std::shared_ptr<types::IKey> WrapKey(
13283 const std::shared_ptr<types::IKey>& that,
13284 const std::function<
13285 std::shared_ptr<E>(
13286 const std::shared_ptr<types::IClass>&
13287 )
13288 >& factory
13289) {
13290 // We assume that we already checked whether `that` has been enhanced
13291 // in the caller.
13292
13293 // No properties to be recursively enhanced.
13294
13295 std::shared_ptr<E> enh(
13296 factory(that)
13297 );
13298 return (enh == nullptr)
13299 ? that
13300 : std::shared_ptr<types::IKey>(
13301 new EnhancedKey<E>(
13302 that,
13303 enh
13304 )
13305 );
13306}
13307
13317template<typename E>
13318std::shared_ptr<types::ILangStringNameType> WrapLangStringNameType(
13319 const std::shared_ptr<types::ILangStringNameType>& that,
13320 const std::function<
13321 std::shared_ptr<E>(
13322 const std::shared_ptr<types::IClass>&
13323 )
13324 >& factory
13325) {
13326 // We assume that we already checked whether `that` has been enhanced
13327 // in the caller.
13328
13329 // No properties to be recursively enhanced.
13330
13331 std::shared_ptr<E> enh(
13332 factory(that)
13333 );
13334 return (enh == nullptr)
13335 ? that
13336 : std::shared_ptr<types::ILangStringNameType>(
13337 new EnhancedLangStringNameType<E>(
13338 that,
13339 enh
13340 )
13341 );
13342}
13343
13353template<typename E>
13354std::shared_ptr<types::ILangStringTextType> WrapLangStringTextType(
13355 const std::shared_ptr<types::ILangStringTextType>& that,
13356 const std::function<
13357 std::shared_ptr<E>(
13358 const std::shared_ptr<types::IClass>&
13359 )
13360 >& factory
13361) {
13362 // We assume that we already checked whether `that` has been enhanced
13363 // in the caller.
13364
13365 // No properties to be recursively enhanced.
13366
13367 std::shared_ptr<E> enh(
13368 factory(that)
13369 );
13370 return (enh == nullptr)
13371 ? that
13372 : std::shared_ptr<types::ILangStringTextType>(
13373 new EnhancedLangStringTextType<E>(
13374 that,
13375 enh
13376 )
13377 );
13378}
13379
13389template<typename E>
13390std::shared_ptr<types::IEnvironment> WrapEnvironment(
13391 const std::shared_ptr<types::IEnvironment>& that,
13392 const std::function<
13393 std::shared_ptr<E>(
13394 const std::shared_ptr<types::IClass>&
13395 )
13396 >& factory
13397) {
13398 // We assume that we already checked whether `that` has been enhanced
13399 // in the caller.
13400
13401 if (that->asset_administration_shells().has_value()) {
13402 const std::vector<
13403 std::shared_ptr<types::IAssetAdministrationShell>
13404 >& value(
13405 that->asset_administration_shells().value()
13406 );
13407 const std::size_t size = value.size();
13408
13409 std::vector<
13410 std::shared_ptr<types::IAssetAdministrationShell>
13411 > wrapped;
13412 wrapped.reserve(size);
13413
13414 for (
13415 const std::shared_ptr<types::IAssetAdministrationShell>& item
13416 : value
13417 ) {
13418 wrapped.emplace_back(
13419 Wrap<E>(
13420 item,
13421 factory
13422 )
13423 );
13424 }
13425
13426 that->set_asset_administration_shells(
13427 common::make_optional(
13428 std::move(wrapped)
13429 )
13430 );
13431 }
13432
13433 if (that->submodels().has_value()) {
13434 const std::vector<
13435 std::shared_ptr<types::ISubmodel>
13436 >& value(
13437 that->submodels().value()
13438 );
13439 const std::size_t size = value.size();
13440
13441 std::vector<
13442 std::shared_ptr<types::ISubmodel>
13443 > wrapped;
13444 wrapped.reserve(size);
13445
13446 for (
13447 const std::shared_ptr<types::ISubmodel>& item
13448 : value
13449 ) {
13450 wrapped.emplace_back(
13451 Wrap<E>(
13452 item,
13453 factory
13454 )
13455 );
13456 }
13457
13458 that->set_submodels(
13459 common::make_optional(
13460 std::move(wrapped)
13461 )
13462 );
13463 }
13464
13465 if (that->concept_descriptions().has_value()) {
13466 const std::vector<
13467 std::shared_ptr<types::IConceptDescription>
13468 >& value(
13469 that->concept_descriptions().value()
13470 );
13471 const std::size_t size = value.size();
13472
13473 std::vector<
13474 std::shared_ptr<types::IConceptDescription>
13475 > wrapped;
13476 wrapped.reserve(size);
13477
13478 for (
13479 const std::shared_ptr<types::IConceptDescription>& item
13480 : value
13481 ) {
13482 wrapped.emplace_back(
13483 Wrap<E>(
13484 item,
13485 factory
13486 )
13487 );
13488 }
13489
13490 that->set_concept_descriptions(
13491 common::make_optional(
13492 std::move(wrapped)
13493 )
13494 );
13495 }
13496
13497 std::shared_ptr<E> enh(
13498 factory(that)
13499 );
13500 return (enh == nullptr)
13501 ? that
13502 : std::shared_ptr<types::IEnvironment>(
13503 new EnhancedEnvironment<E>(
13504 that,
13505 enh
13506 )
13507 );
13508}
13509
13519template<typename E>
13520std::shared_ptr<types::IEmbeddedDataSpecification> WrapEmbeddedDataSpecification(
13521 const std::shared_ptr<types::IEmbeddedDataSpecification>& that,
13522 const std::function<
13523 std::shared_ptr<E>(
13524 const std::shared_ptr<types::IClass>&
13525 )
13526 >& factory
13527) {
13528 // We assume that we already checked whether `that` has been enhanced
13529 // in the caller.
13530
13531 that->set_data_specification(
13532 Wrap<E>(
13533 that->data_specification(),
13534 factory
13535 )
13536 );
13537
13538 that->set_data_specification_content(
13539 Wrap<E>(
13540 that->data_specification_content(),
13541 factory
13542 )
13543 );
13544
13545 std::shared_ptr<E> enh(
13546 factory(that)
13547 );
13548 return (enh == nullptr)
13549 ? that
13550 : std::shared_ptr<types::IEmbeddedDataSpecification>(
13551 new EnhancedEmbeddedDataSpecification<E>(
13552 that,
13553 enh
13554 )
13555 );
13556}
13557
13567template<typename E>
13568std::shared_ptr<types::ILevelType> WrapLevelType(
13569 const std::shared_ptr<types::ILevelType>& that,
13570 const std::function<
13571 std::shared_ptr<E>(
13572 const std::shared_ptr<types::IClass>&
13573 )
13574 >& factory
13575) {
13576 // We assume that we already checked whether `that` has been enhanced
13577 // in the caller.
13578
13579 // No properties to be recursively enhanced.
13580
13581 std::shared_ptr<E> enh(
13582 factory(that)
13583 );
13584 return (enh == nullptr)
13585 ? that
13586 : std::shared_ptr<types::ILevelType>(
13587 new EnhancedLevelType<E>(
13588 that,
13589 enh
13590 )
13591 );
13592}
13593
13603template<typename E>
13604std::shared_ptr<types::IValueReferencePair> WrapValueReferencePair(
13605 const std::shared_ptr<types::IValueReferencePair>& that,
13606 const std::function<
13607 std::shared_ptr<E>(
13608 const std::shared_ptr<types::IClass>&
13609 )
13610 >& factory
13611) {
13612 // We assume that we already checked whether `that` has been enhanced
13613 // in the caller.
13614
13615 that->set_value_id(
13616 Wrap<E>(
13617 that->value_id(),
13618 factory
13619 )
13620 );
13621
13622 std::shared_ptr<E> enh(
13623 factory(that)
13624 );
13625 return (enh == nullptr)
13626 ? that
13627 : std::shared_ptr<types::IValueReferencePair>(
13628 new EnhancedValueReferencePair<E>(
13629 that,
13630 enh
13631 )
13632 );
13633}
13634
13644template<typename E>
13645std::shared_ptr<types::IValueList> WrapValueList(
13646 const std::shared_ptr<types::IValueList>& that,
13647 const std::function<
13648 std::shared_ptr<E>(
13649 const std::shared_ptr<types::IClass>&
13650 )
13651 >& factory
13652) {
13653 // We assume that we already checked whether `that` has been enhanced
13654 // in the caller.
13655
13656 {
13657 const std::vector<
13658 std::shared_ptr<types::IValueReferencePair>
13659 >& value(
13660 that->value_reference_pairs()
13661 );
13662 const std::size_t size = value.size();
13663
13664 std::vector<
13665 std::shared_ptr<types::IValueReferencePair>
13666 > wrapped;
13667 wrapped.reserve(size);
13668
13669 for (
13670 const std::shared_ptr<types::IValueReferencePair>& item
13671 : value
13672 ) {
13673 wrapped.emplace_back(
13674 Wrap<E>(
13675 item,
13676 factory
13677 )
13678 );
13679 }
13680
13681 that->set_value_reference_pairs(
13682 std::move(wrapped)
13683 );
13684 }
13685
13686 std::shared_ptr<E> enh(
13687 factory(that)
13688 );
13689 return (enh == nullptr)
13690 ? that
13691 : std::shared_ptr<types::IValueList>(
13692 new EnhancedValueList<E>(
13693 that,
13694 enh
13695 )
13696 );
13697}
13698
13708template<typename E>
13709std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> WrapLangStringPreferredNameTypeIec61360(
13710 const std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>& that,
13711 const std::function<
13712 std::shared_ptr<E>(
13713 const std::shared_ptr<types::IClass>&
13714 )
13715 >& factory
13716) {
13717 // We assume that we already checked whether `that` has been enhanced
13718 // in the caller.
13719
13720 // No properties to be recursively enhanced.
13721
13722 std::shared_ptr<E> enh(
13723 factory(that)
13724 );
13725 return (enh == nullptr)
13726 ? that
13727 : std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>(
13728 new EnhancedLangStringPreferredNameTypeIec61360<E>(
13729 that,
13730 enh
13731 )
13732 );
13733}
13734
13744template<typename E>
13745std::shared_ptr<types::ILangStringShortNameTypeIec61360> WrapLangStringShortNameTypeIec61360(
13746 const std::shared_ptr<types::ILangStringShortNameTypeIec61360>& that,
13747 const std::function<
13748 std::shared_ptr<E>(
13749 const std::shared_ptr<types::IClass>&
13750 )
13751 >& factory
13752) {
13753 // We assume that we already checked whether `that` has been enhanced
13754 // in the caller.
13755
13756 // No properties to be recursively enhanced.
13757
13758 std::shared_ptr<E> enh(
13759 factory(that)
13760 );
13761 return (enh == nullptr)
13762 ? that
13763 : std::shared_ptr<types::ILangStringShortNameTypeIec61360>(
13764 new EnhancedLangStringShortNameTypeIec61360<E>(
13765 that,
13766 enh
13767 )
13768 );
13769}
13770
13780template<typename E>
13781std::shared_ptr<types::ILangStringDefinitionTypeIec61360> WrapLangStringDefinitionTypeIec61360(
13782 const std::shared_ptr<types::ILangStringDefinitionTypeIec61360>& that,
13783 const std::function<
13784 std::shared_ptr<E>(
13785 const std::shared_ptr<types::IClass>&
13786 )
13787 >& factory
13788) {
13789 // We assume that we already checked whether `that` has been enhanced
13790 // in the caller.
13791
13792 // No properties to be recursively enhanced.
13793
13794 std::shared_ptr<E> enh(
13795 factory(that)
13796 );
13797 return (enh == nullptr)
13798 ? that
13799 : std::shared_ptr<types::ILangStringDefinitionTypeIec61360>(
13800 new EnhancedLangStringDefinitionTypeIec61360<E>(
13801 that,
13802 enh
13803 )
13804 );
13805}
13806
13816template<typename E>
13817std::shared_ptr<types::IDataSpecificationIec61360> WrapDataSpecificationIec61360(
13818 const std::shared_ptr<types::IDataSpecificationIec61360>& that,
13819 const std::function<
13820 std::shared_ptr<E>(
13821 const std::shared_ptr<types::IClass>&
13822 )
13823 >& factory
13824) {
13825 // We assume that we already checked whether `that` has been enhanced
13826 // in the caller.
13827
13828 {
13829 const std::vector<
13830 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
13831 >& value(
13832 that->preferred_name()
13833 );
13834 const std::size_t size = value.size();
13835
13836 std::vector<
13837 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
13838 > wrapped;
13839 wrapped.reserve(size);
13840
13841 for (
13842 const std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>& item
13843 : value
13844 ) {
13845 wrapped.emplace_back(
13846 Wrap<E>(
13847 item,
13848 factory
13849 )
13850 );
13851 }
13852
13853 that->set_preferred_name(
13854 std::move(wrapped)
13855 );
13856 }
13857
13858 if (that->short_name().has_value()) {
13859 const std::vector<
13860 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
13861 >& value(
13862 that->short_name().value()
13863 );
13864 const std::size_t size = value.size();
13865
13866 std::vector<
13867 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
13868 > wrapped;
13869 wrapped.reserve(size);
13870
13871 for (
13872 const std::shared_ptr<types::ILangStringShortNameTypeIec61360>& item
13873 : value
13874 ) {
13875 wrapped.emplace_back(
13876 Wrap<E>(
13877 item,
13878 factory
13879 )
13880 );
13881 }
13882
13883 that->set_short_name(
13884 common::make_optional(
13885 std::move(wrapped)
13886 )
13887 );
13888 }
13889
13890 if (that->unit_id().has_value()) {
13891 const std::shared_ptr<types::IReference>& value(
13892 that->unit_id().value()
13893 );
13894
13895 std::shared_ptr<
13897 > wrapped(
13898 Wrap<E>(
13899 value,
13900 factory
13901 )
13902 );
13903
13904 that->set_unit_id(
13905 common::make_optional(
13906 std::move(wrapped)
13907 )
13908 );
13909 }
13910
13911 if (that->definition().has_value()) {
13912 const std::vector<
13913 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
13914 >& value(
13915 that->definition().value()
13916 );
13917 const std::size_t size = value.size();
13918
13919 std::vector<
13920 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
13921 > wrapped;
13922 wrapped.reserve(size);
13923
13924 for (
13925 const std::shared_ptr<types::ILangStringDefinitionTypeIec61360>& item
13926 : value
13927 ) {
13928 wrapped.emplace_back(
13929 Wrap<E>(
13930 item,
13931 factory
13932 )
13933 );
13934 }
13935
13936 that->set_definition(
13937 common::make_optional(
13938 std::move(wrapped)
13939 )
13940 );
13941 }
13942
13943 if (that->value_list().has_value()) {
13944 const std::shared_ptr<types::IValueList>& value(
13945 that->value_list().value()
13946 );
13947
13948 std::shared_ptr<
13950 > wrapped(
13951 Wrap<E>(
13952 value,
13953 factory
13954 )
13955 );
13956
13957 that->set_value_list(
13958 common::make_optional(
13959 std::move(wrapped)
13960 )
13961 );
13962 }
13963
13964 if (that->level_type().has_value()) {
13965 const std::shared_ptr<types::ILevelType>& value(
13966 that->level_type().value()
13967 );
13968
13969 std::shared_ptr<
13971 > wrapped(
13972 Wrap<E>(
13973 value,
13974 factory
13975 )
13976 );
13977
13978 that->set_level_type(
13979 common::make_optional(
13980 std::move(wrapped)
13981 )
13982 );
13983 }
13984
13985 std::shared_ptr<E> enh(
13986 factory(that)
13987 );
13988 return (enh == nullptr)
13989 ? that
13990 : std::shared_ptr<types::IDataSpecificationIec61360>(
13991 new EnhancedDataSpecificationIec61360<E>(
13992 that,
13993 enh
13994 )
13995 );
13996}
13997
14006template<
14007 typename E,
14008 typename T,
14009 typename std::enable_if<
14010 std::is_base_of<types::IClass, T>::value
14011 >::type* = nullptr
14012>
14013void AssertNotEnhanced(
14014 const std::shared_ptr<T>& that
14015) {
14016 std::shared_ptr<impl::IEnhanced<E> > enhanced(
14017 std::dynamic_pointer_cast<
14018 impl::IEnhanced<E>
14019 >(that)
14020 );
14021 if (enhanced != nullptr) {
14022 throw std::logic_error(
14024 "An instance of ",
14025 stringification::to_string(that->model_type()),
14026 " has been already wrapped."
14027 )
14028 );
14029 }
14030}
14031
14032} // namespace impl
14034
14050
14051template <typename E>
14052std::shared_ptr<
14055 const std::shared_ptr<
14057 >& that,
14058 const std::function<
14059 std::shared_ptr<E>(
14060 const std::shared_ptr<types::IClass>&
14061 )
14062 >& factory
14063) {
14064 impl::AssertNotEnhanced<
14065 E,
14067 >(that);
14068
14069 switch (that->model_type()) {
14071 return impl::WrapExtension<E>(
14072 std::dynamic_pointer_cast<
14074 >(that),
14075 factory
14076 );
14077 break;
14079 return impl::WrapAdministrativeInformation<E>(
14080 std::dynamic_pointer_cast<
14082 >(that),
14083 factory
14084 );
14085 break;
14087 return impl::WrapQualifier<E>(
14088 std::dynamic_pointer_cast<
14090 >(that),
14091 factory
14092 );
14093 break;
14095 return impl::WrapAssetAdministrationShell<E>(
14096 std::dynamic_pointer_cast<
14098 >(that),
14099 factory
14100 );
14101 break;
14103 return impl::WrapAssetInformation<E>(
14104 std::dynamic_pointer_cast<
14106 >(that),
14107 factory
14108 );
14109 break;
14111 return impl::WrapResource<E>(
14112 std::dynamic_pointer_cast<
14114 >(that),
14115 factory
14116 );
14117 break;
14119 return impl::WrapSpecificAssetId<E>(
14120 std::dynamic_pointer_cast<
14122 >(that),
14123 factory
14124 );
14125 break;
14127 return impl::WrapSubmodel<E>(
14128 std::dynamic_pointer_cast<
14130 >(that),
14131 factory
14132 );
14133 break;
14135 return impl::WrapRelationshipElement<E>(
14136 std::dynamic_pointer_cast<
14138 >(that),
14139 factory
14140 );
14141 break;
14143 return impl::WrapSubmodelElementList<E>(
14144 std::dynamic_pointer_cast<
14146 >(that),
14147 factory
14148 );
14149 break;
14151 return impl::WrapSubmodelElementCollection<E>(
14152 std::dynamic_pointer_cast<
14154 >(that),
14155 factory
14156 );
14157 break;
14159 return impl::WrapProperty<E>(
14160 std::dynamic_pointer_cast<
14162 >(that),
14163 factory
14164 );
14165 break;
14167 return impl::WrapMultiLanguageProperty<E>(
14168 std::dynamic_pointer_cast<
14170 >(that),
14171 factory
14172 );
14173 break;
14175 return impl::WrapRange<E>(
14176 std::dynamic_pointer_cast<
14178 >(that),
14179 factory
14180 );
14181 break;
14183 return impl::WrapReferenceElement<E>(
14184 std::dynamic_pointer_cast<
14186 >(that),
14187 factory
14188 );
14189 break;
14191 return impl::WrapBlob<E>(
14192 std::dynamic_pointer_cast<
14194 >(that),
14195 factory
14196 );
14197 break;
14199 return impl::WrapFile<E>(
14200 std::dynamic_pointer_cast<
14202 >(that),
14203 factory
14204 );
14205 break;
14207 return impl::WrapAnnotatedRelationshipElement<E>(
14208 std::dynamic_pointer_cast<
14210 >(that),
14211 factory
14212 );
14213 break;
14215 return impl::WrapEntity<E>(
14216 std::dynamic_pointer_cast<
14218 >(that),
14219 factory
14220 );
14221 break;
14223 return impl::WrapEventPayload<E>(
14224 std::dynamic_pointer_cast<
14226 >(that),
14227 factory
14228 );
14229 break;
14231 return impl::WrapBasicEventElement<E>(
14232 std::dynamic_pointer_cast<
14234 >(that),
14235 factory
14236 );
14237 break;
14239 return impl::WrapOperation<E>(
14240 std::dynamic_pointer_cast<
14242 >(that),
14243 factory
14244 );
14245 break;
14247 return impl::WrapOperationVariable<E>(
14248 std::dynamic_pointer_cast<
14250 >(that),
14251 factory
14252 );
14253 break;
14255 return impl::WrapCapability<E>(
14256 std::dynamic_pointer_cast<
14258 >(that),
14259 factory
14260 );
14261 break;
14263 return impl::WrapConceptDescription<E>(
14264 std::dynamic_pointer_cast<
14266 >(that),
14267 factory
14268 );
14269 break;
14271 return impl::WrapReference<E>(
14272 std::dynamic_pointer_cast<
14274 >(that),
14275 factory
14276 );
14277 break;
14279 return impl::WrapKey<E>(
14280 std::dynamic_pointer_cast<
14282 >(that),
14283 factory
14284 );
14285 break;
14287 return impl::WrapLangStringNameType<E>(
14288 std::dynamic_pointer_cast<
14290 >(that),
14291 factory
14292 );
14293 break;
14295 return impl::WrapLangStringTextType<E>(
14296 std::dynamic_pointer_cast<
14298 >(that),
14299 factory
14300 );
14301 break;
14303 return impl::WrapEnvironment<E>(
14304 std::dynamic_pointer_cast<
14306 >(that),
14307 factory
14308 );
14309 break;
14311 return impl::WrapEmbeddedDataSpecification<E>(
14312 std::dynamic_pointer_cast<
14314 >(that),
14315 factory
14316 );
14317 break;
14319 return impl::WrapLevelType<E>(
14320 std::dynamic_pointer_cast<
14322 >(that),
14323 factory
14324 );
14325 break;
14327 return impl::WrapValueReferencePair<E>(
14328 std::dynamic_pointer_cast<
14330 >(that),
14331 factory
14332 );
14333 break;
14335 return impl::WrapValueList<E>(
14336 std::dynamic_pointer_cast<
14338 >(that),
14339 factory
14340 );
14341 break;
14343 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
14344 std::dynamic_pointer_cast<
14346 >(that),
14347 factory
14348 );
14349 break;
14351 return impl::WrapLangStringShortNameTypeIec61360<E>(
14352 std::dynamic_pointer_cast<
14354 >(that),
14355 factory
14356 );
14357 break;
14359 return impl::WrapLangStringDefinitionTypeIec61360<E>(
14360 std::dynamic_pointer_cast<
14362 >(that),
14363 factory
14364 );
14365 break;
14367 return impl::WrapDataSpecificationIec61360<E>(
14368 std::dynamic_pointer_cast<
14369 types::IDataSpecificationIec61360
14370 >(that),
14371 factory
14372 );
14373 break;
14374 default:
14375 throw std::invalid_argument(
14377 "Unexpected model type: ",
14378 std::to_string(
14379 static_cast<std::uint32_t>(
14380 that->model_type()
14381 )
14382 )
14383 )
14384 );
14385 break;
14386 }
14387}
14388
14389template <typename E>
14390std::shared_ptr<
14393 const std::shared_ptr<
14395 >& that,
14396 const std::function<
14397 std::shared_ptr<E>(
14398 const std::shared_ptr<types::IClass>&
14399 )
14400 >& factory
14401) {
14402 impl::AssertNotEnhanced<
14403 E,
14405 >(that);
14406
14407 switch (that->model_type()) {
14409 return impl::WrapRelationshipElement<E>(
14410 std::dynamic_pointer_cast<
14412 >(that),
14413 factory
14414 );
14415 break;
14417 return impl::WrapAnnotatedRelationshipElement<E>(
14418 std::dynamic_pointer_cast<
14420 >(that),
14421 factory
14422 );
14423 break;
14425 return impl::WrapBasicEventElement<E>(
14426 std::dynamic_pointer_cast<
14428 >(that),
14429 factory
14430 );
14431 break;
14433 return impl::WrapBlob<E>(
14434 std::dynamic_pointer_cast<
14436 >(that),
14437 factory
14438 );
14439 break;
14441 return impl::WrapCapability<E>(
14442 std::dynamic_pointer_cast<
14444 >(that),
14445 factory
14446 );
14447 break;
14449 return impl::WrapEntity<E>(
14450 std::dynamic_pointer_cast<
14452 >(that),
14453 factory
14454 );
14455 break;
14457 return impl::WrapExtension<E>(
14458 std::dynamic_pointer_cast<
14460 >(that),
14461 factory
14462 );
14463 break;
14465 return impl::WrapFile<E>(
14466 std::dynamic_pointer_cast<
14468 >(that),
14469 factory
14470 );
14471 break;
14473 return impl::WrapMultiLanguageProperty<E>(
14474 std::dynamic_pointer_cast<
14476 >(that),
14477 factory
14478 );
14479 break;
14481 return impl::WrapOperation<E>(
14482 std::dynamic_pointer_cast<
14484 >(that),
14485 factory
14486 );
14487 break;
14489 return impl::WrapProperty<E>(
14490 std::dynamic_pointer_cast<
14492 >(that),
14493 factory
14494 );
14495 break;
14497 return impl::WrapQualifier<E>(
14498 std::dynamic_pointer_cast<
14500 >(that),
14501 factory
14502 );
14503 break;
14505 return impl::WrapRange<E>(
14506 std::dynamic_pointer_cast<
14508 >(that),
14509 factory
14510 );
14511 break;
14513 return impl::WrapReferenceElement<E>(
14514 std::dynamic_pointer_cast<
14516 >(that),
14517 factory
14518 );
14519 break;
14521 return impl::WrapSpecificAssetId<E>(
14522 std::dynamic_pointer_cast<
14524 >(that),
14525 factory
14526 );
14527 break;
14529 return impl::WrapSubmodel<E>(
14530 std::dynamic_pointer_cast<
14532 >(that),
14533 factory
14534 );
14535 break;
14537 return impl::WrapSubmodelElementCollection<E>(
14538 std::dynamic_pointer_cast<
14540 >(that),
14541 factory
14542 );
14543 break;
14545 return impl::WrapSubmodelElementList<E>(
14546 std::dynamic_pointer_cast<
14548 >(that),
14549 factory
14550 );
14551 break;
14552 default:
14553 throw std::invalid_argument(
14555 "Unexpected model type: ",
14556 std::to_string(
14557 static_cast<std::uint32_t>(
14558 that->model_type()
14559 )
14560 )
14561 )
14562 );
14563 break;
14564 }
14565}
14566
14567template <typename E>
14568std::shared_ptr<
14571 const std::shared_ptr<
14573 >& that,
14574 const std::function<
14575 std::shared_ptr<E>(
14576 const std::shared_ptr<types::IClass>&
14577 )
14578 >& factory
14579) {
14580 impl::AssertNotEnhanced<
14581 E,
14583 >(that);
14584
14585 switch (that->model_type()) {
14587 return impl::WrapExtension<E>(
14588 that,
14589 factory
14590 );
14591 break;
14592 default:
14593 throw std::invalid_argument(
14595 "Unexpected model type: ",
14596 std::to_string(
14597 static_cast<std::uint32_t>(
14598 that->model_type()
14599 )
14600 )
14601 )
14602 );
14603 break;
14604 }
14605}
14606
14607template <typename E>
14608std::shared_ptr<
14611 const std::shared_ptr<
14613 >& that,
14614 const std::function<
14615 std::shared_ptr<E>(
14616 const std::shared_ptr<types::IClass>&
14617 )
14618 >& factory
14619) {
14620 impl::AssertNotEnhanced<
14621 E,
14623 >(that);
14624
14625 switch (that->model_type()) {
14627 return impl::WrapRelationshipElement<E>(
14628 std::dynamic_pointer_cast<
14630 >(that),
14631 factory
14632 );
14633 break;
14635 return impl::WrapAnnotatedRelationshipElement<E>(
14636 std::dynamic_pointer_cast<
14638 >(that),
14639 factory
14640 );
14641 break;
14643 return impl::WrapAssetAdministrationShell<E>(
14644 std::dynamic_pointer_cast<
14646 >(that),
14647 factory
14648 );
14649 break;
14651 return impl::WrapBasicEventElement<E>(
14652 std::dynamic_pointer_cast<
14654 >(that),
14655 factory
14656 );
14657 break;
14659 return impl::WrapBlob<E>(
14660 std::dynamic_pointer_cast<
14662 >(that),
14663 factory
14664 );
14665 break;
14667 return impl::WrapCapability<E>(
14668 std::dynamic_pointer_cast<
14670 >(that),
14671 factory
14672 );
14673 break;
14675 return impl::WrapConceptDescription<E>(
14676 std::dynamic_pointer_cast<
14678 >(that),
14679 factory
14680 );
14681 break;
14683 return impl::WrapEntity<E>(
14684 std::dynamic_pointer_cast<
14686 >(that),
14687 factory
14688 );
14689 break;
14691 return impl::WrapFile<E>(
14692 std::dynamic_pointer_cast<
14694 >(that),
14695 factory
14696 );
14697 break;
14699 return impl::WrapMultiLanguageProperty<E>(
14700 std::dynamic_pointer_cast<
14702 >(that),
14703 factory
14704 );
14705 break;
14707 return impl::WrapOperation<E>(
14708 std::dynamic_pointer_cast<
14710 >(that),
14711 factory
14712 );
14713 break;
14715 return impl::WrapProperty<E>(
14716 std::dynamic_pointer_cast<
14718 >(that),
14719 factory
14720 );
14721 break;
14723 return impl::WrapRange<E>(
14724 std::dynamic_pointer_cast<
14726 >(that),
14727 factory
14728 );
14729 break;
14731 return impl::WrapReferenceElement<E>(
14732 std::dynamic_pointer_cast<
14734 >(that),
14735 factory
14736 );
14737 break;
14739 return impl::WrapSubmodel<E>(
14740 std::dynamic_pointer_cast<
14742 >(that),
14743 factory
14744 );
14745 break;
14747 return impl::WrapSubmodelElementCollection<E>(
14748 std::dynamic_pointer_cast<
14750 >(that),
14751 factory
14752 );
14753 break;
14755 return impl::WrapSubmodelElementList<E>(
14756 std::dynamic_pointer_cast<
14758 >(that),
14759 factory
14760 );
14761 break;
14762 default:
14763 throw std::invalid_argument(
14765 "Unexpected model type: ",
14766 std::to_string(
14767 static_cast<std::uint32_t>(
14768 that->model_type()
14769 )
14770 )
14771 )
14772 );
14773 break;
14774 }
14775}
14776
14777template <typename E>
14778std::shared_ptr<
14781 const std::shared_ptr<
14783 >& that,
14784 const std::function<
14785 std::shared_ptr<E>(
14786 const std::shared_ptr<types::IClass>&
14787 )
14788 >& factory
14789) {
14790 impl::AssertNotEnhanced<
14791 E,
14793 >(that);
14794
14795 switch (that->model_type()) {
14797 return impl::WrapRelationshipElement<E>(
14798 std::dynamic_pointer_cast<
14800 >(that),
14801 factory
14802 );
14803 break;
14805 return impl::WrapAnnotatedRelationshipElement<E>(
14806 std::dynamic_pointer_cast<
14808 >(that),
14809 factory
14810 );
14811 break;
14813 return impl::WrapAssetAdministrationShell<E>(
14814 std::dynamic_pointer_cast<
14816 >(that),
14817 factory
14818 );
14819 break;
14821 return impl::WrapBasicEventElement<E>(
14822 std::dynamic_pointer_cast<
14824 >(that),
14825 factory
14826 );
14827 break;
14829 return impl::WrapBlob<E>(
14830 std::dynamic_pointer_cast<
14832 >(that),
14833 factory
14834 );
14835 break;
14837 return impl::WrapCapability<E>(
14838 std::dynamic_pointer_cast<
14840 >(that),
14841 factory
14842 );
14843 break;
14845 return impl::WrapConceptDescription<E>(
14846 std::dynamic_pointer_cast<
14848 >(that),
14849 factory
14850 );
14851 break;
14853 return impl::WrapEntity<E>(
14854 std::dynamic_pointer_cast<
14856 >(that),
14857 factory
14858 );
14859 break;
14861 return impl::WrapFile<E>(
14862 std::dynamic_pointer_cast<
14864 >(that),
14865 factory
14866 );
14867 break;
14869 return impl::WrapMultiLanguageProperty<E>(
14870 std::dynamic_pointer_cast<
14872 >(that),
14873 factory
14874 );
14875 break;
14877 return impl::WrapOperation<E>(
14878 std::dynamic_pointer_cast<
14880 >(that),
14881 factory
14882 );
14883 break;
14885 return impl::WrapProperty<E>(
14886 std::dynamic_pointer_cast<
14888 >(that),
14889 factory
14890 );
14891 break;
14893 return impl::WrapRange<E>(
14894 std::dynamic_pointer_cast<
14896 >(that),
14897 factory
14898 );
14899 break;
14901 return impl::WrapReferenceElement<E>(
14902 std::dynamic_pointer_cast<
14904 >(that),
14905 factory
14906 );
14907 break;
14909 return impl::WrapSubmodel<E>(
14910 std::dynamic_pointer_cast<
14912 >(that),
14913 factory
14914 );
14915 break;
14917 return impl::WrapSubmodelElementCollection<E>(
14918 std::dynamic_pointer_cast<
14920 >(that),
14921 factory
14922 );
14923 break;
14925 return impl::WrapSubmodelElementList<E>(
14926 std::dynamic_pointer_cast<
14928 >(that),
14929 factory
14930 );
14931 break;
14932 default:
14933 throw std::invalid_argument(
14935 "Unexpected model type: ",
14936 std::to_string(
14937 static_cast<std::uint32_t>(
14938 that->model_type()
14939 )
14940 )
14941 )
14942 );
14943 break;
14944 }
14945}
14946
14947template <typename E>
14948std::shared_ptr<
14951 const std::shared_ptr<
14953 >& that,
14954 const std::function<
14955 std::shared_ptr<E>(
14956 const std::shared_ptr<types::IClass>&
14957 )
14958 >& factory
14959) {
14960 impl::AssertNotEnhanced<
14961 E,
14963 >(that);
14964
14965 switch (that->model_type()) {
14967 return impl::WrapAssetAdministrationShell<E>(
14968 std::dynamic_pointer_cast<
14970 >(that),
14971 factory
14972 );
14973 break;
14975 return impl::WrapConceptDescription<E>(
14976 std::dynamic_pointer_cast<
14978 >(that),
14979 factory
14980 );
14981 break;
14983 return impl::WrapSubmodel<E>(
14984 std::dynamic_pointer_cast<
14986 >(that),
14987 factory
14988 );
14989 break;
14990 default:
14991 throw std::invalid_argument(
14993 "Unexpected model type: ",
14994 std::to_string(
14995 static_cast<std::uint32_t>(
14996 that->model_type()
14997 )
14998 )
14999 )
15000 );
15001 break;
15002 }
15003}
15004
15005template <typename E>
15006std::shared_ptr<
15009 const std::shared_ptr<
15011 >& that,
15012 const std::function<
15013 std::shared_ptr<E>(
15014 const std::shared_ptr<types::IClass>&
15015 )
15016 >& factory
15017) {
15018 impl::AssertNotEnhanced<
15019 E,
15021 >(that);
15022
15023 switch (that->model_type()) {
15025 return impl::WrapSubmodel<E>(
15026 std::dynamic_pointer_cast<
15028 >(that),
15029 factory
15030 );
15031 break;
15032 default:
15033 throw std::invalid_argument(
15035 "Unexpected model type: ",
15036 std::to_string(
15037 static_cast<std::uint32_t>(
15038 that->model_type()
15039 )
15040 )
15041 )
15042 );
15043 break;
15044 }
15045}
15046
15047template <typename E>
15048std::shared_ptr<
15051 const std::shared_ptr<
15053 >& that,
15054 const std::function<
15055 std::shared_ptr<E>(
15056 const std::shared_ptr<types::IClass>&
15057 )
15058 >& factory
15059) {
15060 impl::AssertNotEnhanced<
15061 E,
15063 >(that);
15064
15065 switch (that->model_type()) {
15067 return impl::WrapAdministrativeInformation<E>(
15068 std::dynamic_pointer_cast<
15070 >(that),
15071 factory
15072 );
15073 break;
15075 return impl::WrapRelationshipElement<E>(
15076 std::dynamic_pointer_cast<
15078 >(that),
15079 factory
15080 );
15081 break;
15083 return impl::WrapAnnotatedRelationshipElement<E>(
15084 std::dynamic_pointer_cast<
15086 >(that),
15087 factory
15088 );
15089 break;
15091 return impl::WrapAssetAdministrationShell<E>(
15092 std::dynamic_pointer_cast<
15094 >(that),
15095 factory
15096 );
15097 break;
15099 return impl::WrapBasicEventElement<E>(
15100 std::dynamic_pointer_cast<
15102 >(that),
15103 factory
15104 );
15105 break;
15107 return impl::WrapBlob<E>(
15108 std::dynamic_pointer_cast<
15110 >(that),
15111 factory
15112 );
15113 break;
15115 return impl::WrapCapability<E>(
15116 std::dynamic_pointer_cast<
15118 >(that),
15119 factory
15120 );
15121 break;
15123 return impl::WrapConceptDescription<E>(
15124 std::dynamic_pointer_cast<
15126 >(that),
15127 factory
15128 );
15129 break;
15131 return impl::WrapEntity<E>(
15132 std::dynamic_pointer_cast<
15134 >(that),
15135 factory
15136 );
15137 break;
15139 return impl::WrapFile<E>(
15140 std::dynamic_pointer_cast<
15142 >(that),
15143 factory
15144 );
15145 break;
15147 return impl::WrapMultiLanguageProperty<E>(
15148 std::dynamic_pointer_cast<
15150 >(that),
15151 factory
15152 );
15153 break;
15155 return impl::WrapOperation<E>(
15156 std::dynamic_pointer_cast<
15158 >(that),
15159 factory
15160 );
15161 break;
15163 return impl::WrapProperty<E>(
15164 std::dynamic_pointer_cast<
15166 >(that),
15167 factory
15168 );
15169 break;
15171 return impl::WrapRange<E>(
15172 std::dynamic_pointer_cast<
15174 >(that),
15175 factory
15176 );
15177 break;
15179 return impl::WrapReferenceElement<E>(
15180 std::dynamic_pointer_cast<
15182 >(that),
15183 factory
15184 );
15185 break;
15187 return impl::WrapSubmodel<E>(
15188 std::dynamic_pointer_cast<
15190 >(that),
15191 factory
15192 );
15193 break;
15195 return impl::WrapSubmodelElementCollection<E>(
15196 std::dynamic_pointer_cast<
15198 >(that),
15199 factory
15200 );
15201 break;
15203 return impl::WrapSubmodelElementList<E>(
15204 std::dynamic_pointer_cast<
15206 >(that),
15207 factory
15208 );
15209 break;
15210 default:
15211 throw std::invalid_argument(
15213 "Unexpected model type: ",
15214 std::to_string(
15215 static_cast<std::uint32_t>(
15216 that->model_type()
15217 )
15218 )
15219 )
15220 );
15221 break;
15222 }
15223}
15224
15225template <typename E>
15226std::shared_ptr<
15229 const std::shared_ptr<
15231 >& that,
15232 const std::function<
15233 std::shared_ptr<E>(
15234 const std::shared_ptr<types::IClass>&
15235 )
15236 >& factory
15237) {
15238 impl::AssertNotEnhanced<
15239 E,
15241 >(that);
15242
15243 switch (that->model_type()) {
15245 return impl::WrapAdministrativeInformation<E>(
15246 that,
15247 factory
15248 );
15249 break;
15250 default:
15251 throw std::invalid_argument(
15253 "Unexpected model type: ",
15254 std::to_string(
15255 static_cast<std::uint32_t>(
15256 that->model_type()
15257 )
15258 )
15259 )
15260 );
15261 break;
15262 }
15263}
15264
15265template <typename E>
15266std::shared_ptr<
15269 const std::shared_ptr<
15271 >& that,
15272 const std::function<
15273 std::shared_ptr<E>(
15274 const std::shared_ptr<types::IClass>&
15275 )
15276 >& factory
15277) {
15278 impl::AssertNotEnhanced<
15279 E,
15281 >(that);
15282
15283 switch (that->model_type()) {
15285 return impl::WrapRelationshipElement<E>(
15286 std::dynamic_pointer_cast<
15288 >(that),
15289 factory
15290 );
15291 break;
15293 return impl::WrapAnnotatedRelationshipElement<E>(
15294 std::dynamic_pointer_cast<
15296 >(that),
15297 factory
15298 );
15299 break;
15301 return impl::WrapBasicEventElement<E>(
15302 std::dynamic_pointer_cast<
15304 >(that),
15305 factory
15306 );
15307 break;
15309 return impl::WrapBlob<E>(
15310 std::dynamic_pointer_cast<
15312 >(that),
15313 factory
15314 );
15315 break;
15317 return impl::WrapCapability<E>(
15318 std::dynamic_pointer_cast<
15320 >(that),
15321 factory
15322 );
15323 break;
15325 return impl::WrapEntity<E>(
15326 std::dynamic_pointer_cast<
15328 >(that),
15329 factory
15330 );
15331 break;
15333 return impl::WrapFile<E>(
15334 std::dynamic_pointer_cast<
15336 >(that),
15337 factory
15338 );
15339 break;
15341 return impl::WrapMultiLanguageProperty<E>(
15342 std::dynamic_pointer_cast<
15344 >(that),
15345 factory
15346 );
15347 break;
15349 return impl::WrapOperation<E>(
15350 std::dynamic_pointer_cast<
15352 >(that),
15353 factory
15354 );
15355 break;
15357 return impl::WrapProperty<E>(
15358 std::dynamic_pointer_cast<
15360 >(that),
15361 factory
15362 );
15363 break;
15365 return impl::WrapRange<E>(
15366 std::dynamic_pointer_cast<
15368 >(that),
15369 factory
15370 );
15371 break;
15373 return impl::WrapReferenceElement<E>(
15374 std::dynamic_pointer_cast<
15376 >(that),
15377 factory
15378 );
15379 break;
15381 return impl::WrapSubmodel<E>(
15382 std::dynamic_pointer_cast<
15384 >(that),
15385 factory
15386 );
15387 break;
15389 return impl::WrapSubmodelElementCollection<E>(
15390 std::dynamic_pointer_cast<
15392 >(that),
15393 factory
15394 );
15395 break;
15397 return impl::WrapSubmodelElementList<E>(
15398 std::dynamic_pointer_cast<
15400 >(that),
15401 factory
15402 );
15403 break;
15404 default:
15405 throw std::invalid_argument(
15407 "Unexpected model type: ",
15408 std::to_string(
15409 static_cast<std::uint32_t>(
15410 that->model_type()
15411 )
15412 )
15413 )
15414 );
15415 break;
15416 }
15417}
15418
15419template <typename E>
15420std::shared_ptr<
15423 const std::shared_ptr<
15425 >& that,
15426 const std::function<
15427 std::shared_ptr<E>(
15428 const std::shared_ptr<types::IClass>&
15429 )
15430 >& factory
15431) {
15432 impl::AssertNotEnhanced<
15433 E,
15435 >(that);
15436
15437 switch (that->model_type()) {
15439 return impl::WrapQualifier<E>(
15440 that,
15441 factory
15442 );
15443 break;
15444 default:
15445 throw std::invalid_argument(
15447 "Unexpected model type: ",
15448 std::to_string(
15449 static_cast<std::uint32_t>(
15450 that->model_type()
15451 )
15452 )
15453 )
15454 );
15455 break;
15456 }
15457}
15458
15459template <typename E>
15460std::shared_ptr<
15463 const std::shared_ptr<
15465 >& that,
15466 const std::function<
15467 std::shared_ptr<E>(
15468 const std::shared_ptr<types::IClass>&
15469 )
15470 >& factory
15471) {
15472 impl::AssertNotEnhanced<
15473 E,
15475 >(that);
15476
15477 switch (that->model_type()) {
15479 return impl::WrapAssetAdministrationShell<E>(
15480 that,
15481 factory
15482 );
15483 break;
15484 default:
15485 throw std::invalid_argument(
15487 "Unexpected model type: ",
15488 std::to_string(
15489 static_cast<std::uint32_t>(
15490 that->model_type()
15491 )
15492 )
15493 )
15494 );
15495 break;
15496 }
15497}
15498
15499template <typename E>
15500std::shared_ptr<
15503 const std::shared_ptr<
15505 >& that,
15506 const std::function<
15507 std::shared_ptr<E>(
15508 const std::shared_ptr<types::IClass>&
15509 )
15510 >& factory
15511) {
15512 impl::AssertNotEnhanced<
15513 E,
15515 >(that);
15516
15517 switch (that->model_type()) {
15519 return impl::WrapAssetInformation<E>(
15520 that,
15521 factory
15522 );
15523 break;
15524 default:
15525 throw std::invalid_argument(
15527 "Unexpected model type: ",
15528 std::to_string(
15529 static_cast<std::uint32_t>(
15530 that->model_type()
15531 )
15532 )
15533 )
15534 );
15535 break;
15536 }
15537}
15538
15539template <typename E>
15540std::shared_ptr<
15543 const std::shared_ptr<
15545 >& that,
15546 const std::function<
15547 std::shared_ptr<E>(
15548 const std::shared_ptr<types::IClass>&
15549 )
15550 >& factory
15551) {
15552 impl::AssertNotEnhanced<
15553 E,
15555 >(that);
15556
15557 switch (that->model_type()) {
15559 return impl::WrapResource<E>(
15560 that,
15561 factory
15562 );
15563 break;
15564 default:
15565 throw std::invalid_argument(
15567 "Unexpected model type: ",
15568 std::to_string(
15569 static_cast<std::uint32_t>(
15570 that->model_type()
15571 )
15572 )
15573 )
15574 );
15575 break;
15576 }
15577}
15578
15579template <typename E>
15580std::shared_ptr<
15583 const std::shared_ptr<
15585 >& that,
15586 const std::function<
15587 std::shared_ptr<E>(
15588 const std::shared_ptr<types::IClass>&
15589 )
15590 >& factory
15591) {
15592 impl::AssertNotEnhanced<
15593 E,
15595 >(that);
15596
15597 switch (that->model_type()) {
15599 return impl::WrapSpecificAssetId<E>(
15600 that,
15601 factory
15602 );
15603 break;
15604 default:
15605 throw std::invalid_argument(
15607 "Unexpected model type: ",
15608 std::to_string(
15609 static_cast<std::uint32_t>(
15610 that->model_type()
15611 )
15612 )
15613 )
15614 );
15615 break;
15616 }
15617}
15618
15619template <typename E>
15620std::shared_ptr<
15623 const std::shared_ptr<
15625 >& that,
15626 const std::function<
15627 std::shared_ptr<E>(
15628 const std::shared_ptr<types::IClass>&
15629 )
15630 >& factory
15631) {
15632 impl::AssertNotEnhanced<
15633 E,
15635 >(that);
15636
15637 switch (that->model_type()) {
15639 return impl::WrapSubmodel<E>(
15640 that,
15641 factory
15642 );
15643 break;
15644 default:
15645 throw std::invalid_argument(
15647 "Unexpected model type: ",
15648 std::to_string(
15649 static_cast<std::uint32_t>(
15650 that->model_type()
15651 )
15652 )
15653 )
15654 );
15655 break;
15656 }
15657}
15658
15659template <typename E>
15660std::shared_ptr<
15663 const std::shared_ptr<
15665 >& that,
15666 const std::function<
15667 std::shared_ptr<E>(
15668 const std::shared_ptr<types::IClass>&
15669 )
15670 >& factory
15671) {
15672 impl::AssertNotEnhanced<
15673 E,
15675 >(that);
15676
15677 switch (that->model_type()) {
15679 return impl::WrapRelationshipElement<E>(
15680 std::dynamic_pointer_cast<
15682 >(that),
15683 factory
15684 );
15685 break;
15687 return impl::WrapAnnotatedRelationshipElement<E>(
15688 std::dynamic_pointer_cast<
15690 >(that),
15691 factory
15692 );
15693 break;
15695 return impl::WrapBasicEventElement<E>(
15696 std::dynamic_pointer_cast<
15698 >(that),
15699 factory
15700 );
15701 break;
15703 return impl::WrapBlob<E>(
15704 std::dynamic_pointer_cast<
15706 >(that),
15707 factory
15708 );
15709 break;
15711 return impl::WrapCapability<E>(
15712 std::dynamic_pointer_cast<
15714 >(that),
15715 factory
15716 );
15717 break;
15719 return impl::WrapEntity<E>(
15720 std::dynamic_pointer_cast<
15722 >(that),
15723 factory
15724 );
15725 break;
15727 return impl::WrapFile<E>(
15728 std::dynamic_pointer_cast<
15730 >(that),
15731 factory
15732 );
15733 break;
15735 return impl::WrapMultiLanguageProperty<E>(
15736 std::dynamic_pointer_cast<
15738 >(that),
15739 factory
15740 );
15741 break;
15743 return impl::WrapOperation<E>(
15744 std::dynamic_pointer_cast<
15746 >(that),
15747 factory
15748 );
15749 break;
15751 return impl::WrapProperty<E>(
15752 std::dynamic_pointer_cast<
15754 >(that),
15755 factory
15756 );
15757 break;
15759 return impl::WrapRange<E>(
15760 std::dynamic_pointer_cast<
15762 >(that),
15763 factory
15764 );
15765 break;
15767 return impl::WrapReferenceElement<E>(
15768 std::dynamic_pointer_cast<
15770 >(that),
15771 factory
15772 );
15773 break;
15775 return impl::WrapSubmodelElementCollection<E>(
15776 std::dynamic_pointer_cast<
15778 >(that),
15779 factory
15780 );
15781 break;
15783 return impl::WrapSubmodelElementList<E>(
15784 std::dynamic_pointer_cast<
15786 >(that),
15787 factory
15788 );
15789 break;
15790 default:
15791 throw std::invalid_argument(
15793 "Unexpected model type: ",
15794 std::to_string(
15795 static_cast<std::uint32_t>(
15796 that->model_type()
15797 )
15798 )
15799 )
15800 );
15801 break;
15802 }
15803}
15804
15805template <typename E>
15806std::shared_ptr<
15809 const std::shared_ptr<
15811 >& that,
15812 const std::function<
15813 std::shared_ptr<E>(
15814 const std::shared_ptr<types::IClass>&
15815 )
15816 >& factory
15817) {
15818 impl::AssertNotEnhanced<
15819 E,
15821 >(that);
15822
15823 switch (that->model_type()) {
15825 return impl::WrapRelationshipElement<E>(
15826 that,
15827 factory
15828 );
15829 break;
15831 return impl::WrapAnnotatedRelationshipElement<E>(
15832 std::dynamic_pointer_cast<
15834 >(that),
15835 factory
15836 );
15837 break;
15838 default:
15839 throw std::invalid_argument(
15841 "Unexpected model type: ",
15842 std::to_string(
15843 static_cast<std::uint32_t>(
15844 that->model_type()
15845 )
15846 )
15847 )
15848 );
15849 break;
15850 }
15851}
15852
15853template <typename E>
15854std::shared_ptr<
15857 const std::shared_ptr<
15859 >& that,
15860 const std::function<
15861 std::shared_ptr<E>(
15862 const std::shared_ptr<types::IClass>&
15863 )
15864 >& factory
15865) {
15866 impl::AssertNotEnhanced<
15867 E,
15869 >(that);
15870
15871 switch (that->model_type()) {
15873 return impl::WrapSubmodelElementList<E>(
15874 that,
15875 factory
15876 );
15877 break;
15878 default:
15879 throw std::invalid_argument(
15881 "Unexpected model type: ",
15882 std::to_string(
15883 static_cast<std::uint32_t>(
15884 that->model_type()
15885 )
15886 )
15887 )
15888 );
15889 break;
15890 }
15891}
15892
15893template <typename E>
15894std::shared_ptr<
15897 const std::shared_ptr<
15899 >& that,
15900 const std::function<
15901 std::shared_ptr<E>(
15902 const std::shared_ptr<types::IClass>&
15903 )
15904 >& factory
15905) {
15906 impl::AssertNotEnhanced<
15907 E,
15909 >(that);
15910
15911 switch (that->model_type()) {
15913 return impl::WrapSubmodelElementCollection<E>(
15914 that,
15915 factory
15916 );
15917 break;
15918 default:
15919 throw std::invalid_argument(
15921 "Unexpected model type: ",
15922 std::to_string(
15923 static_cast<std::uint32_t>(
15924 that->model_type()
15925 )
15926 )
15927 )
15928 );
15929 break;
15930 }
15931}
15932
15933template <typename E>
15934std::shared_ptr<
15937 const std::shared_ptr<
15939 >& that,
15940 const std::function<
15941 std::shared_ptr<E>(
15942 const std::shared_ptr<types::IClass>&
15943 )
15944 >& factory
15945) {
15946 impl::AssertNotEnhanced<
15947 E,
15949 >(that);
15950
15951 switch (that->model_type()) {
15953 return impl::WrapBlob<E>(
15954 std::dynamic_pointer_cast<
15956 >(that),
15957 factory
15958 );
15959 break;
15961 return impl::WrapFile<E>(
15962 std::dynamic_pointer_cast<
15964 >(that),
15965 factory
15966 );
15967 break;
15969 return impl::WrapMultiLanguageProperty<E>(
15970 std::dynamic_pointer_cast<
15972 >(that),
15973 factory
15974 );
15975 break;
15977 return impl::WrapProperty<E>(
15978 std::dynamic_pointer_cast<
15980 >(that),
15981 factory
15982 );
15983 break;
15985 return impl::WrapRange<E>(
15986 std::dynamic_pointer_cast<
15988 >(that),
15989 factory
15990 );
15991 break;
15993 return impl::WrapReferenceElement<E>(
15994 std::dynamic_pointer_cast<
15996 >(that),
15997 factory
15998 );
15999 break;
16000 default:
16001 throw std::invalid_argument(
16003 "Unexpected model type: ",
16004 std::to_string(
16005 static_cast<std::uint32_t>(
16006 that->model_type()
16007 )
16008 )
16009 )
16010 );
16011 break;
16012 }
16013}
16014
16015template <typename E>
16016std::shared_ptr<
16019 const std::shared_ptr<
16021 >& that,
16022 const std::function<
16023 std::shared_ptr<E>(
16024 const std::shared_ptr<types::IClass>&
16025 )
16026 >& factory
16027) {
16028 impl::AssertNotEnhanced<
16029 E,
16031 >(that);
16032
16033 switch (that->model_type()) {
16035 return impl::WrapProperty<E>(
16036 that,
16037 factory
16038 );
16039 break;
16040 default:
16041 throw std::invalid_argument(
16043 "Unexpected model type: ",
16044 std::to_string(
16045 static_cast<std::uint32_t>(
16046 that->model_type()
16047 )
16048 )
16049 )
16050 );
16051 break;
16052 }
16053}
16054
16055template <typename E>
16056std::shared_ptr<
16059 const std::shared_ptr<
16061 >& that,
16062 const std::function<
16063 std::shared_ptr<E>(
16064 const std::shared_ptr<types::IClass>&
16065 )
16066 >& factory
16067) {
16068 impl::AssertNotEnhanced<
16069 E,
16071 >(that);
16072
16073 switch (that->model_type()) {
16075 return impl::WrapMultiLanguageProperty<E>(
16076 that,
16077 factory
16078 );
16079 break;
16080 default:
16081 throw std::invalid_argument(
16083 "Unexpected model type: ",
16084 std::to_string(
16085 static_cast<std::uint32_t>(
16086 that->model_type()
16087 )
16088 )
16089 )
16090 );
16091 break;
16092 }
16093}
16094
16095template <typename E>
16096std::shared_ptr<
16099 const std::shared_ptr<
16101 >& that,
16102 const std::function<
16103 std::shared_ptr<E>(
16104 const std::shared_ptr<types::IClass>&
16105 )
16106 >& factory
16107) {
16108 impl::AssertNotEnhanced<
16109 E,
16111 >(that);
16112
16113 switch (that->model_type()) {
16115 return impl::WrapRange<E>(
16116 that,
16117 factory
16118 );
16119 break;
16120 default:
16121 throw std::invalid_argument(
16123 "Unexpected model type: ",
16124 std::to_string(
16125 static_cast<std::uint32_t>(
16126 that->model_type()
16127 )
16128 )
16129 )
16130 );
16131 break;
16132 }
16133}
16134
16135template <typename E>
16136std::shared_ptr<
16139 const std::shared_ptr<
16141 >& that,
16142 const std::function<
16143 std::shared_ptr<E>(
16144 const std::shared_ptr<types::IClass>&
16145 )
16146 >& factory
16147) {
16148 impl::AssertNotEnhanced<
16149 E,
16151 >(that);
16152
16153 switch (that->model_type()) {
16155 return impl::WrapReferenceElement<E>(
16156 that,
16157 factory
16158 );
16159 break;
16160 default:
16161 throw std::invalid_argument(
16163 "Unexpected model type: ",
16164 std::to_string(
16165 static_cast<std::uint32_t>(
16166 that->model_type()
16167 )
16168 )
16169 )
16170 );
16171 break;
16172 }
16173}
16174
16175template <typename E>
16176std::shared_ptr<
16179 const std::shared_ptr<
16181 >& that,
16182 const std::function<
16183 std::shared_ptr<E>(
16184 const std::shared_ptr<types::IClass>&
16185 )
16186 >& factory
16187) {
16188 impl::AssertNotEnhanced<
16189 E,
16191 >(that);
16192
16193 switch (that->model_type()) {
16195 return impl::WrapBlob<E>(
16196 that,
16197 factory
16198 );
16199 break;
16200 default:
16201 throw std::invalid_argument(
16203 "Unexpected model type: ",
16204 std::to_string(
16205 static_cast<std::uint32_t>(
16206 that->model_type()
16207 )
16208 )
16209 )
16210 );
16211 break;
16212 }
16213}
16214
16215template <typename E>
16216std::shared_ptr<
16219 const std::shared_ptr<
16221 >& that,
16222 const std::function<
16223 std::shared_ptr<E>(
16224 const std::shared_ptr<types::IClass>&
16225 )
16226 >& factory
16227) {
16228 impl::AssertNotEnhanced<
16229 E,
16231 >(that);
16232
16233 switch (that->model_type()) {
16235 return impl::WrapFile<E>(
16236 that,
16237 factory
16238 );
16239 break;
16240 default:
16241 throw std::invalid_argument(
16243 "Unexpected model type: ",
16244 std::to_string(
16245 static_cast<std::uint32_t>(
16246 that->model_type()
16247 )
16248 )
16249 )
16250 );
16251 break;
16252 }
16253}
16254
16255template <typename E>
16256std::shared_ptr<
16259 const std::shared_ptr<
16261 >& that,
16262 const std::function<
16263 std::shared_ptr<E>(
16264 const std::shared_ptr<types::IClass>&
16265 )
16266 >& factory
16267) {
16268 impl::AssertNotEnhanced<
16269 E,
16271 >(that);
16272
16273 switch (that->model_type()) {
16275 return impl::WrapAnnotatedRelationshipElement<E>(
16276 that,
16277 factory
16278 );
16279 break;
16280 default:
16281 throw std::invalid_argument(
16283 "Unexpected model type: ",
16284 std::to_string(
16285 static_cast<std::uint32_t>(
16286 that->model_type()
16287 )
16288 )
16289 )
16290 );
16291 break;
16292 }
16293}
16294
16295template <typename E>
16296std::shared_ptr<
16299 const std::shared_ptr<
16301 >& that,
16302 const std::function<
16303 std::shared_ptr<E>(
16304 const std::shared_ptr<types::IClass>&
16305 )
16306 >& factory
16307) {
16308 impl::AssertNotEnhanced<
16309 E,
16311 >(that);
16312
16313 switch (that->model_type()) {
16315 return impl::WrapEntity<E>(
16316 that,
16317 factory
16318 );
16319 break;
16320 default:
16321 throw std::invalid_argument(
16323 "Unexpected model type: ",
16324 std::to_string(
16325 static_cast<std::uint32_t>(
16326 that->model_type()
16327 )
16328 )
16329 )
16330 );
16331 break;
16332 }
16333}
16334
16335template <typename E>
16336std::shared_ptr<
16339 const std::shared_ptr<
16341 >& that,
16342 const std::function<
16343 std::shared_ptr<E>(
16344 const std::shared_ptr<types::IClass>&
16345 )
16346 >& factory
16347) {
16348 impl::AssertNotEnhanced<
16349 E,
16351 >(that);
16352
16353 switch (that->model_type()) {
16355 return impl::WrapEventPayload<E>(
16356 that,
16357 factory
16358 );
16359 break;
16360 default:
16361 throw std::invalid_argument(
16363 "Unexpected model type: ",
16364 std::to_string(
16365 static_cast<std::uint32_t>(
16366 that->model_type()
16367 )
16368 )
16369 )
16370 );
16371 break;
16372 }
16373}
16374
16375template <typename E>
16376std::shared_ptr<
16379 const std::shared_ptr<
16381 >& that,
16382 const std::function<
16383 std::shared_ptr<E>(
16384 const std::shared_ptr<types::IClass>&
16385 )
16386 >& factory
16387) {
16388 impl::AssertNotEnhanced<
16389 E,
16391 >(that);
16392
16393 switch (that->model_type()) {
16395 return impl::WrapBasicEventElement<E>(
16396 std::dynamic_pointer_cast<
16398 >(that),
16399 factory
16400 );
16401 break;
16402 default:
16403 throw std::invalid_argument(
16405 "Unexpected model type: ",
16406 std::to_string(
16407 static_cast<std::uint32_t>(
16408 that->model_type()
16409 )
16410 )
16411 )
16412 );
16413 break;
16414 }
16415}
16416
16417template <typename E>
16418std::shared_ptr<
16421 const std::shared_ptr<
16423 >& that,
16424 const std::function<
16425 std::shared_ptr<E>(
16426 const std::shared_ptr<types::IClass>&
16427 )
16428 >& factory
16429) {
16430 impl::AssertNotEnhanced<
16431 E,
16433 >(that);
16434
16435 switch (that->model_type()) {
16437 return impl::WrapBasicEventElement<E>(
16438 that,
16439 factory
16440 );
16441 break;
16442 default:
16443 throw std::invalid_argument(
16445 "Unexpected model type: ",
16446 std::to_string(
16447 static_cast<std::uint32_t>(
16448 that->model_type()
16449 )
16450 )
16451 )
16452 );
16453 break;
16454 }
16455}
16456
16457template <typename E>
16458std::shared_ptr<
16461 const std::shared_ptr<
16463 >& that,
16464 const std::function<
16465 std::shared_ptr<E>(
16466 const std::shared_ptr<types::IClass>&
16467 )
16468 >& factory
16469) {
16470 impl::AssertNotEnhanced<
16471 E,
16473 >(that);
16474
16475 switch (that->model_type()) {
16477 return impl::WrapOperation<E>(
16478 that,
16479 factory
16480 );
16481 break;
16482 default:
16483 throw std::invalid_argument(
16485 "Unexpected model type: ",
16486 std::to_string(
16487 static_cast<std::uint32_t>(
16488 that->model_type()
16489 )
16490 )
16491 )
16492 );
16493 break;
16494 }
16495}
16496
16497template <typename E>
16498std::shared_ptr<
16501 const std::shared_ptr<
16503 >& that,
16504 const std::function<
16505 std::shared_ptr<E>(
16506 const std::shared_ptr<types::IClass>&
16507 )
16508 >& factory
16509) {
16510 impl::AssertNotEnhanced<
16511 E,
16513 >(that);
16514
16515 switch (that->model_type()) {
16517 return impl::WrapOperationVariable<E>(
16518 that,
16519 factory
16520 );
16521 break;
16522 default:
16523 throw std::invalid_argument(
16525 "Unexpected model type: ",
16526 std::to_string(
16527 static_cast<std::uint32_t>(
16528 that->model_type()
16529 )
16530 )
16531 )
16532 );
16533 break;
16534 }
16535}
16536
16537template <typename E>
16538std::shared_ptr<
16541 const std::shared_ptr<
16543 >& that,
16544 const std::function<
16545 std::shared_ptr<E>(
16546 const std::shared_ptr<types::IClass>&
16547 )
16548 >& factory
16549) {
16550 impl::AssertNotEnhanced<
16551 E,
16553 >(that);
16554
16555 switch (that->model_type()) {
16557 return impl::WrapCapability<E>(
16558 that,
16559 factory
16560 );
16561 break;
16562 default:
16563 throw std::invalid_argument(
16565 "Unexpected model type: ",
16566 std::to_string(
16567 static_cast<std::uint32_t>(
16568 that->model_type()
16569 )
16570 )
16571 )
16572 );
16573 break;
16574 }
16575}
16576
16577template <typename E>
16578std::shared_ptr<
16581 const std::shared_ptr<
16583 >& that,
16584 const std::function<
16585 std::shared_ptr<E>(
16586 const std::shared_ptr<types::IClass>&
16587 )
16588 >& factory
16589) {
16590 impl::AssertNotEnhanced<
16591 E,
16593 >(that);
16594
16595 switch (that->model_type()) {
16597 return impl::WrapConceptDescription<E>(
16598 that,
16599 factory
16600 );
16601 break;
16602 default:
16603 throw std::invalid_argument(
16605 "Unexpected model type: ",
16606 std::to_string(
16607 static_cast<std::uint32_t>(
16608 that->model_type()
16609 )
16610 )
16611 )
16612 );
16613 break;
16614 }
16615}
16616
16617template <typename E>
16618std::shared_ptr<
16621 const std::shared_ptr<
16623 >& that,
16624 const std::function<
16625 std::shared_ptr<E>(
16626 const std::shared_ptr<types::IClass>&
16627 )
16628 >& factory
16629) {
16630 impl::AssertNotEnhanced<
16631 E,
16633 >(that);
16634
16635 switch (that->model_type()) {
16637 return impl::WrapReference<E>(
16638 that,
16639 factory
16640 );
16641 break;
16642 default:
16643 throw std::invalid_argument(
16645 "Unexpected model type: ",
16646 std::to_string(
16647 static_cast<std::uint32_t>(
16648 that->model_type()
16649 )
16650 )
16651 )
16652 );
16653 break;
16654 }
16655}
16656
16657template <typename E>
16658std::shared_ptr<
16661 const std::shared_ptr<
16663 >& that,
16664 const std::function<
16665 std::shared_ptr<E>(
16666 const std::shared_ptr<types::IClass>&
16667 )
16668 >& factory
16669) {
16670 impl::AssertNotEnhanced<
16671 E,
16673 >(that);
16674
16675 switch (that->model_type()) {
16677 return impl::WrapKey<E>(
16678 that,
16679 factory
16680 );
16681 break;
16682 default:
16683 throw std::invalid_argument(
16685 "Unexpected model type: ",
16686 std::to_string(
16687 static_cast<std::uint32_t>(
16688 that->model_type()
16689 )
16690 )
16691 )
16692 );
16693 break;
16694 }
16695}
16696
16697template <typename E>
16698std::shared_ptr<
16701 const std::shared_ptr<
16703 >& that,
16704 const std::function<
16705 std::shared_ptr<E>(
16706 const std::shared_ptr<types::IClass>&
16707 )
16708 >& factory
16709) {
16710 impl::AssertNotEnhanced<
16711 E,
16713 >(that);
16714
16715 switch (that->model_type()) {
16717 return impl::WrapLangStringDefinitionTypeIec61360<E>(
16718 std::dynamic_pointer_cast<
16720 >(that),
16721 factory
16722 );
16723 break;
16725 return impl::WrapLangStringNameType<E>(
16726 std::dynamic_pointer_cast<
16728 >(that),
16729 factory
16730 );
16731 break;
16733 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
16734 std::dynamic_pointer_cast<
16736 >(that),
16737 factory
16738 );
16739 break;
16741 return impl::WrapLangStringShortNameTypeIec61360<E>(
16742 std::dynamic_pointer_cast<
16744 >(that),
16745 factory
16746 );
16747 break;
16749 return impl::WrapLangStringTextType<E>(
16750 std::dynamic_pointer_cast<
16752 >(that),
16753 factory
16754 );
16755 break;
16756 default:
16757 throw std::invalid_argument(
16759 "Unexpected model type: ",
16760 std::to_string(
16761 static_cast<std::uint32_t>(
16762 that->model_type()
16763 )
16764 )
16765 )
16766 );
16767 break;
16768 }
16769}
16770
16771template <typename E>
16772std::shared_ptr<
16775 const std::shared_ptr<
16777 >& that,
16778 const std::function<
16779 std::shared_ptr<E>(
16780 const std::shared_ptr<types::IClass>&
16781 )
16782 >& factory
16783) {
16784 impl::AssertNotEnhanced<
16785 E,
16787 >(that);
16788
16789 switch (that->model_type()) {
16791 return impl::WrapLangStringNameType<E>(
16792 that,
16793 factory
16794 );
16795 break;
16796 default:
16797 throw std::invalid_argument(
16799 "Unexpected model type: ",
16800 std::to_string(
16801 static_cast<std::uint32_t>(
16802 that->model_type()
16803 )
16804 )
16805 )
16806 );
16807 break;
16808 }
16809}
16810
16811template <typename E>
16812std::shared_ptr<
16815 const std::shared_ptr<
16817 >& that,
16818 const std::function<
16819 std::shared_ptr<E>(
16820 const std::shared_ptr<types::IClass>&
16821 )
16822 >& factory
16823) {
16824 impl::AssertNotEnhanced<
16825 E,
16827 >(that);
16828
16829 switch (that->model_type()) {
16831 return impl::WrapLangStringTextType<E>(
16832 that,
16833 factory
16834 );
16835 break;
16836 default:
16837 throw std::invalid_argument(
16839 "Unexpected model type: ",
16840 std::to_string(
16841 static_cast<std::uint32_t>(
16842 that->model_type()
16843 )
16844 )
16845 )
16846 );
16847 break;
16848 }
16849}
16850
16851template <typename E>
16852std::shared_ptr<
16855 const std::shared_ptr<
16857 >& that,
16858 const std::function<
16859 std::shared_ptr<E>(
16860 const std::shared_ptr<types::IClass>&
16861 )
16862 >& factory
16863) {
16864 impl::AssertNotEnhanced<
16865 E,
16867 >(that);
16868
16869 switch (that->model_type()) {
16871 return impl::WrapEnvironment<E>(
16872 that,
16873 factory
16874 );
16875 break;
16876 default:
16877 throw std::invalid_argument(
16879 "Unexpected model type: ",
16880 std::to_string(
16881 static_cast<std::uint32_t>(
16882 that->model_type()
16883 )
16884 )
16885 )
16886 );
16887 break;
16888 }
16889}
16890
16891template <typename E>
16892std::shared_ptr<
16895 const std::shared_ptr<
16897 >& that,
16898 const std::function<
16899 std::shared_ptr<E>(
16900 const std::shared_ptr<types::IClass>&
16901 )
16902 >& factory
16903) {
16904 impl::AssertNotEnhanced<
16905 E,
16907 >(that);
16908
16909 switch (that->model_type()) {
16911 return impl::WrapDataSpecificationIec61360<E>(
16912 std::dynamic_pointer_cast<
16913 types::IDataSpecificationIec61360
16914 >(that),
16915 factory
16916 );
16917 break;
16918 default:
16919 throw std::invalid_argument(
16921 "Unexpected model type: ",
16922 std::to_string(
16923 static_cast<std::uint32_t>(
16924 that->model_type()
16925 )
16926 )
16927 )
16928 );
16929 break;
16930 }
16931}
16932
16933template <typename E>
16934std::shared_ptr<
16937 const std::shared_ptr<
16939 >& that,
16940 const std::function<
16941 std::shared_ptr<E>(
16942 const std::shared_ptr<types::IClass>&
16943 )
16944 >& factory
16945) {
16946 impl::AssertNotEnhanced<
16947 E,
16949 >(that);
16950
16951 switch (that->model_type()) {
16953 return impl::WrapEmbeddedDataSpecification<E>(
16954 that,
16955 factory
16956 );
16957 break;
16958 default:
16959 throw std::invalid_argument(
16961 "Unexpected model type: ",
16962 std::to_string(
16963 static_cast<std::uint32_t>(
16964 that->model_type()
16965 )
16966 )
16967 )
16968 );
16969 break;
16970 }
16971}
16972
16973template <typename E>
16974std::shared_ptr<
16977 const std::shared_ptr<
16979 >& that,
16980 const std::function<
16981 std::shared_ptr<E>(
16982 const std::shared_ptr<types::IClass>&
16983 )
16984 >& factory
16985) {
16986 impl::AssertNotEnhanced<
16987 E,
16989 >(that);
16990
16991 switch (that->model_type()) {
16993 return impl::WrapLevelType<E>(
16994 that,
16995 factory
16996 );
16997 break;
16998 default:
16999 throw std::invalid_argument(
17001 "Unexpected model type: ",
17002 std::to_string(
17003 static_cast<std::uint32_t>(
17004 that->model_type()
17005 )
17006 )
17007 )
17008 );
17009 break;
17010 }
17011}
17012
17013template <typename E>
17014std::shared_ptr<
17017 const std::shared_ptr<
17019 >& that,
17020 const std::function<
17021 std::shared_ptr<E>(
17022 const std::shared_ptr<types::IClass>&
17023 )
17024 >& factory
17025) {
17026 impl::AssertNotEnhanced<
17027 E,
17029 >(that);
17030
17031 switch (that->model_type()) {
17033 return impl::WrapValueReferencePair<E>(
17034 that,
17035 factory
17036 );
17037 break;
17038 default:
17039 throw std::invalid_argument(
17041 "Unexpected model type: ",
17042 std::to_string(
17043 static_cast<std::uint32_t>(
17044 that->model_type()
17045 )
17046 )
17047 )
17048 );
17049 break;
17050 }
17051}
17052
17053template <typename E>
17054std::shared_ptr<
17057 const std::shared_ptr<
17059 >& that,
17060 const std::function<
17061 std::shared_ptr<E>(
17062 const std::shared_ptr<types::IClass>&
17063 )
17064 >& factory
17065) {
17066 impl::AssertNotEnhanced<
17067 E,
17069 >(that);
17070
17071 switch (that->model_type()) {
17073 return impl::WrapValueList<E>(
17074 that,
17075 factory
17076 );
17077 break;
17078 default:
17079 throw std::invalid_argument(
17081 "Unexpected model type: ",
17082 std::to_string(
17083 static_cast<std::uint32_t>(
17084 that->model_type()
17085 )
17086 )
17087 )
17088 );
17089 break;
17090 }
17091}
17092
17093template <typename E>
17094std::shared_ptr<
17097 const std::shared_ptr<
17099 >& that,
17100 const std::function<
17101 std::shared_ptr<E>(
17102 const std::shared_ptr<types::IClass>&
17103 )
17104 >& factory
17105) {
17106 impl::AssertNotEnhanced<
17107 E,
17109 >(that);
17110
17111 switch (that->model_type()) {
17113 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
17114 that,
17115 factory
17116 );
17117 break;
17118 default:
17119 throw std::invalid_argument(
17121 "Unexpected model type: ",
17122 std::to_string(
17123 static_cast<std::uint32_t>(
17124 that->model_type()
17125 )
17126 )
17127 )
17128 );
17129 break;
17130 }
17131}
17132
17133template <typename E>
17134std::shared_ptr<
17137 const std::shared_ptr<
17139 >& that,
17140 const std::function<
17141 std::shared_ptr<E>(
17142 const std::shared_ptr<types::IClass>&
17143 )
17144 >& factory
17145) {
17146 impl::AssertNotEnhanced<
17147 E,
17149 >(that);
17150
17151 switch (that->model_type()) {
17153 return impl::WrapLangStringShortNameTypeIec61360<E>(
17154 that,
17155 factory
17156 );
17157 break;
17158 default:
17159 throw std::invalid_argument(
17161 "Unexpected model type: ",
17162 std::to_string(
17163 static_cast<std::uint32_t>(
17164 that->model_type()
17165 )
17166 )
17167 )
17168 );
17169 break;
17170 }
17171}
17172
17173template <typename E>
17174std::shared_ptr<
17177 const std::shared_ptr<
17179 >& that,
17180 const std::function<
17181 std::shared_ptr<E>(
17182 const std::shared_ptr<types::IClass>&
17183 )
17184 >& factory
17185) {
17186 impl::AssertNotEnhanced<
17187 E,
17189 >(that);
17190
17191 switch (that->model_type()) {
17193 return impl::WrapLangStringDefinitionTypeIec61360<E>(
17194 that,
17195 factory
17196 );
17197 break;
17198 default:
17199 throw std::invalid_argument(
17201 "Unexpected model type: ",
17202 std::to_string(
17203 static_cast<std::uint32_t>(
17204 that->model_type()
17205 )
17206 )
17207 )
17208 );
17209 break;
17210 }
17211}
17212
17213template <typename E>
17214std::shared_ptr<
17215 types::IDataSpecificationIec61360
17217 const std::shared_ptr<
17218 types::IDataSpecificationIec61360
17219 >& that,
17220 const std::function<
17221 std::shared_ptr<E>(
17222 const std::shared_ptr<types::IClass>&
17223 )
17224 >& factory
17225) {
17226 impl::AssertNotEnhanced<
17227 E,
17228 types::IDataSpecificationIec61360
17229 >(that);
17230
17231 switch (that->model_type()) {
17233 return impl::WrapDataSpecificationIec61360<E>(
17234 that,
17235 factory
17236 );
17237 break;
17238 default:
17239 throw std::invalid_argument(
17241 "Unexpected model type: ",
17242 std::to_string(
17243 static_cast<std::uint32_t>(
17244 that->model_type()
17245 )
17246 )
17247 )
17248 );
17249 break;
17250 }
17251}
17252
17254
17262template <typename E>
17263std::shared_ptr<E> Unwrap(
17264 const std::shared_ptr<types::IClass>& that
17265) {
17266 const std::shared_ptr<impl::IEnhanced<E> >& maybe_enhanced(
17267 std::dynamic_pointer_cast<impl::IEnhanced<E> >(that)
17268 );
17269
17270 if (!maybe_enhanced) {
17271 return nullptr;
17272 }
17273
17274 return maybe_enhanced->enhancement();
17275}
17276
17287template <typename E>
17288std::shared_ptr<E> MustUnwrap(
17289 const std::shared_ptr<types::IClass>& that
17290) {
17291 std::shared_ptr<E> enhancement(
17292 Unwrap<E>(that)
17293 );
17294 if (!enhancement) {
17295 throw std::invalid_argument(
17297 "Expected an instance of ",
17298 stringification::to_string(that->model_type()),
17299 " to have been already wrapped with an enhancement, "
17300 "but it has been not."
17301 )
17302 );
17303 }
17304 return enhancement;
17305}
17306
17307} // namespace enhancing
17308
17309
17310} // namespace aas_3_0
17311} // namespace aas_core
17312
17313// This code has been automatically generated by aas-core-codegen.
17314// Do NOT edit or append.
17315
17316#endif // AAS_CORE_AAS_3_0_ENHANCING_GUARD_
Strings with language tags.
Definition types.hpp:2781
virtual const std::wstring & language() const =0
Language tag conforming to BCP 47.
Administrative meta-information for an element like version information.
Definition types.hpp:867
An annotated relationship element is a relationship element that can be annotated with additional dat...
Definition types.hpp:1953
An asset administration shell.
Definition types.hpp:1080
In IAssetInformation identifying meta data of the asset that is represented by an AAS is defined.
Definition types.hpp:1182
virtual AssetKind asset_kind() const =0
Denotes whether the Asset is of kind AssetKind::kType or AssetKind::kInstance.
A basic event element.
Definition types.hpp:2242
A IBlob is a data element that represents a file that is contained with its source code in the value ...
Definition types.hpp:1864
A capability is the implementation-independent description of the potential of an asset to achieve a ...
Definition types.hpp:2502
Definition types.hpp:460
The semantics of a property or other elements that may have a semantic description is defined by a co...
Definition types.hpp:2567
A data element is a submodel element that is not further composed out of other submodel elements.
Definition types.hpp:1657
Data specification content is part of a data specification template and defines which additional attr...
Definition types.hpp:2924
Embed the content of a data specification.
Definition types.hpp:2931
virtual const std::shared_ptr< IReference > & data_specification() const =0
Reference to the data specification.
An entity is a submodel element that is used to model entities.
Definition types.hpp:1991
Container for the sets of different identifiables.
Definition types.hpp:2832
virtual const common::optional< std::vector< std::shared_ptr< IAssetAdministrationShell > > > & asset_administration_shells() const =0
Asset administration shell.
An event element.
Definition types.hpp:2232
Defines the necessary information of an event instance sent out or received.
Definition types.hpp:2081
virtual const std::shared_ptr< IReference > & source() const =0
Reference to the source event element, including identification of IAssetAdministrationShell,...
Single extension of an element.
Definition types.hpp:533
A File is a data element that represents an address to a file (a locator).
Definition types.hpp:1915
Element that can be extended by using data specification templates.
Definition types.hpp:829
virtual const common::optional< std::vector< std::shared_ptr< IEmbeddedDataSpecification > > > & embedded_data_specifications() const =0
Embedded data specification.
Element that can be extended by proprietary extensions.
Definition types.hpp:610
virtual const common::optional< std::vector< std::shared_ptr< IExtension > > > & extensions() const =0
An extension of the element.
An element with a kind is an element that can either represent a template or an instance.
Definition types.hpp:801
Element that can have a semantic definition plus some supplemental semantic definitions.
Definition types.hpp:476
virtual const common::optional< std::shared_ptr< IReference > > & semantic_id() const =0
Identifier of the semantic definition of the element. It is called semantic ID of the element or also...
An element that has a globally unique identifier.
Definition types.hpp:756
A key is a reference to an element by its ID.
Definition types.hpp:2738
virtual KeyTypes type() const =0
Denotes which kind of entity is referenced.
String with length 1023 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3131
String with length 128 maximum and minimum 1 characters and with language tags.
Definition types.hpp:2814
String with length 255 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3117
String with length 18 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3124
String with length 1023 maximum and minimum 1 characters and with language tags.
Definition types.hpp:2821
Value represented by up to four variants of a numeric value in a specific role: MIN,...
Definition types.hpp:2994
virtual bool min() const =0
Minimum of the value.
A property is a data element that has a multi-language value.
Definition types.hpp:1730
The value of an operation variable is a submodel element that is used as input and/or output variable...
Definition types.hpp:2478
An operation is a submodel element with input and output variables.
Definition types.hpp:2395
A property is a data element that has a single value.
Definition types.hpp:1671
The value of a qualifiable element may be further qualified by one or more qualifiers.
Definition types.hpp:950
A qualifier is a type-value-pair that makes additional statements w.r.t. the value of the element.
Definition types.hpp:993
A range data element is a data element that defines a range with min and max.
Definition types.hpp:1783
An element that is referable by its IReferable::id_short.
Definition types.hpp:649
A reference element is a data element that defines a logical reference to another element within the ...
Definition types.hpp:1835
Reference to either a model element of the same or another AAS or to an external entity.
Definition types.hpp:2673
virtual ReferenceTypes type() const =0
Type of the reference.
A relationship element is used to define a relationship between two elements being either referable (...
Definition types.hpp:1450
Resource represents an address to a file (a locator). The value is an URI that can represent an absol...
Definition types.hpp:1290
virtual const std::wstring & path() const =0
Path and name of the resource (with file extension).
A specific asset ID describes a generic supplementary identifying attribute of the asset.
Definition types.hpp:1334
A submodel element collection is a kind of struct, i.e. a a logical encapsulation of multiple named v...
Definition types.hpp:1615
A submodel element list is an ordered list of submodel elements.
Definition types.hpp:1515
A submodel element is an element suitable for the description and differentiation of assets.
Definition types.hpp:1442
A submodel defines a specific aspect of the asset represented by the AAS.
Definition types.hpp:1397
A set of value reference pairs.
Definition types.hpp:3089
virtual const std::vector< std::shared_ptr< IValueReferencePair > > & value_reference_pairs() const =0
A pair of a value together with its global unique id.
A value reference pair within a value list. Each value has a global unique id defining its semantic.
Definition types.hpp:3054
std::string to_string(types::ModelType model_type)
std::string Concat(const std::string &part0, const std::string &part1)
Definition enhancing.hpp:27
std::shared_ptr< E > MustUnwrap(const std::shared_ptr< types::IClass > &that)
Definition enhancing.hpp:17288
std::shared_ptr< types::IHasSemantics > Wrap(const std::shared_ptr< types::IHasSemantics > &that, const std::function< std::shared_ptr< E >(const std::shared_ptr< types::IClass > &) > &factory)
Definition enhancing.hpp:14392
std::shared_ptr< E > Unwrap(const std::shared_ptr< types::IClass > &that)
Definition enhancing.hpp:17263
AasSubmodelElements
Enumeration of all possible elements of a ISubmodelElementList.
Definition types.hpp:119
ModellingKind
Enumeration for denoting whether an element is a template or an instance.
Definition types.hpp:79
ModelType
Definition types.hpp:37
@ kAdministrativeInformation
Definition types.hpp:39
@ kBasicEventElement
Definition types.hpp:58
@ kRelationshipElement
Definition types.hpp:46
@ kFile
Definition types.hpp:54
@ kValueList
Definition types.hpp:71
@ kAssetInformation
Definition types.hpp:42
@ kLevelType
Definition types.hpp:69
@ kRange
Definition types.hpp:51
@ kOperationVariable
Definition types.hpp:60
@ kReferenceElement
Definition types.hpp:52
@ kKey
Definition types.hpp:64
@ kSubmodel
Definition types.hpp:45
@ kLangStringTextType
Definition types.hpp:66
@ kValueReferencePair
Definition types.hpp:70
@ kSubmodelElementCollection
Definition types.hpp:48
@ kBlob
Definition types.hpp:53
@ kEmbeddedDataSpecification
Definition types.hpp:68
@ kLangStringDefinitionTypeIec61360
Definition types.hpp:74
@ kEntity
Definition types.hpp:56
@ kCapability
Definition types.hpp:61
@ kMultiLanguageProperty
Definition types.hpp:50
@ kEventPayload
Definition types.hpp:57
@ kEnvironment
Definition types.hpp:67
@ kProperty
Definition types.hpp:49
@ kQualifier
Definition types.hpp:40
@ kDataSpecificationIec61360
Definition types.hpp:75
@ kExtension
Definition types.hpp:38
@ kAssetAdministrationShell
Definition types.hpp:41
@ kLangStringNameType
Definition types.hpp:65
@ kSubmodelElementList
Definition types.hpp:47
@ kReference
Definition types.hpp:63
@ kSpecificAssetId
Definition types.hpp:44
@ kResource
Definition types.hpp:43
@ kOperation
Definition types.hpp:59
@ kLangStringPreferredNameTypeIec61360
Definition types.hpp:72
@ kLangStringShortNameTypeIec61360
Definition types.hpp:73
@ kAnnotatedRelationshipElement
Definition types.hpp:55
@ kConceptDescription
Definition types.hpp:62
DataTypeDefXsd
Enumeration listing all XSD anySimpleTypes.
Definition types.hpp:234
EntityType
Enumeration for denoting whether an entity is a self-managed entity or a co-managed entity.
Definition types.hpp:141
AssetKind
Enumeration for denoting whether an asset is a type asset or an instance asset.
Definition types.hpp:109
ReferenceTypes
Reference types.
Definition types.hpp:175
StateOfEvent
State of an event.
Definition types.hpp:167
Direction
Direction.
Definition types.hpp:156
QualifierKind
Enumeration for kinds of qualifiers.
Definition types.hpp:92
KeyTypes
Enumeration of different key value types within a key.
Definition types.hpp:183
Definition common.hpp:51
Definition common.hpp:50