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