aas-core3 1.0.0
Manipulate, verify and de/serialize asset administration shells in C++.
Loading...
Searching...
No Matches
enhancing.hpp
Go to the documentation of this file.
1#ifndef AAS_CORE_AAS_3_0_ENHANCING_GUARD_
2#define AAS_CORE_AAS_3_0_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_0 {
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<
715 types::IDataSpecificationIec61360
716> Wrap(
717 const std::shared_ptr<
718 types::IDataSpecificationIec61360
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 std::shared_ptr<types::IReference>& first() const override {
2322 return instance_->first();
2323 }
2324
2325 std::shared_ptr<types::IReference>& mutable_first() override {
2326 return instance_->mutable_first();
2327 }
2328
2329 void set_first(
2330 std::shared_ptr<types::IReference> value
2331 ) override {
2332 instance_->set_first(value);
2333 }
2334
2335 const std::shared_ptr<types::IReference>& second() const override {
2336 return instance_->second();
2337 }
2338
2339 std::shared_ptr<types::IReference>& mutable_second() override {
2340 return instance_->mutable_second();
2341 }
2342
2343 void set_second(
2344 std::shared_ptr<types::IReference> value
2345 ) override {
2346 instance_->set_second(value);
2347 }
2348
2349 const std::shared_ptr<E>& enhancement() const {
2350 return enhancement_;
2351 }
2352
2353 std::shared_ptr<E>& mutable_enhancement() {
2354 return enhancement_;
2355 }
2356
2357 void set_enhancement(
2358 std::shared_ptr<E> value
2359 ) {
2360 enhancement_ = std::move(value);
2361 }
2362
2363 EnhancedRelationshipElement(
2364 std::shared_ptr<types::IRelationshipElement> instance,
2365 std::shared_ptr<E> enhancement
2366 ) :
2367 instance_(instance),
2368 enhancement_(enhancement) {
2369 // Intentionally empty.
2370 }
2371
2372 virtual ~EnhancedRelationshipElement() = default;
2373
2374 private:
2375 std::shared_ptr<types::IRelationshipElement> instance_;
2376 std::shared_ptr<E> enhancement_;
2377};
2378
2379template<class E>
2380class EnhancedSubmodelElementList
2381 : virtual public types::ISubmodelElementList,
2382 virtual public IEnhanced<E> {
2383 public:
2384 types::ModelType model_type() const override {
2386 }
2387
2388 const common::optional<
2389 std::vector<
2390 std::shared_ptr<types::IExtension>
2391 >
2392 >& extensions() const override {
2393 return instance_->extensions();
2394 }
2395
2396 common::optional<
2397 std::vector<
2398 std::shared_ptr<types::IExtension>
2399 >
2400 >& mutable_extensions() override {
2401 return instance_->mutable_extensions();
2402 }
2403
2404 void set_extensions(
2405 common::optional<
2406 std::vector<
2407 std::shared_ptr<types::IExtension>
2408 >
2409 > value
2410 ) override {
2411 instance_->set_extensions(value);
2412 }
2413
2414 const common::optional<std::wstring>& category() const override {
2415 return instance_->category();
2416 }
2417
2418 common::optional<std::wstring>& mutable_category() override {
2419 return instance_->mutable_category();
2420 }
2421
2422 void set_category(
2423 common::optional<std::wstring> value
2424 ) override {
2425 instance_->set_category(value);
2426 }
2427
2428 const common::optional<std::wstring>& id_short() const override {
2429 return instance_->id_short();
2430 }
2431
2432 common::optional<std::wstring>& mutable_id_short() override {
2433 return instance_->mutable_id_short();
2434 }
2435
2436 void set_id_short(
2437 common::optional<std::wstring> value
2438 ) override {
2439 instance_->set_id_short(value);
2440 }
2441
2442 const common::optional<
2443 std::vector<
2444 std::shared_ptr<types::ILangStringNameType>
2445 >
2446 >& display_name() const override {
2447 return instance_->display_name();
2448 }
2449
2450 common::optional<
2451 std::vector<
2452 std::shared_ptr<types::ILangStringNameType>
2453 >
2454 >& mutable_display_name() override {
2455 return instance_->mutable_display_name();
2456 }
2457
2458 void set_display_name(
2459 common::optional<
2460 std::vector<
2461 std::shared_ptr<types::ILangStringNameType>
2462 >
2463 > value
2464 ) override {
2465 instance_->set_display_name(value);
2466 }
2467
2468 const common::optional<
2469 std::vector<
2470 std::shared_ptr<types::ILangStringTextType>
2471 >
2472 >& description() const override {
2473 return instance_->description();
2474 }
2475
2476 common::optional<
2477 std::vector<
2478 std::shared_ptr<types::ILangStringTextType>
2479 >
2480 >& mutable_description() override {
2481 return instance_->mutable_description();
2482 }
2483
2484 void set_description(
2485 common::optional<
2486 std::vector<
2487 std::shared_ptr<types::ILangStringTextType>
2488 >
2489 > value
2490 ) override {
2491 instance_->set_description(value);
2492 }
2493
2494 const common::optional<
2495 std::shared_ptr<types::IReference>
2496 >& semantic_id() const override {
2497 return instance_->semantic_id();
2498 }
2499
2500 common::optional<
2501 std::shared_ptr<types::IReference>
2502 >& mutable_semantic_id() override {
2503 return instance_->mutable_semantic_id();
2504 }
2505
2506 void set_semantic_id(
2507 common::optional<
2508 std::shared_ptr<types::IReference>
2509 > value
2510 ) override {
2511 instance_->set_semantic_id(value);
2512 }
2513
2514 const common::optional<
2515 std::vector<
2516 std::shared_ptr<types::IReference>
2517 >
2518 >& supplemental_semantic_ids() const override {
2519 return instance_->supplemental_semantic_ids();
2520 }
2521
2522 common::optional<
2523 std::vector<
2524 std::shared_ptr<types::IReference>
2525 >
2526 >& mutable_supplemental_semantic_ids() override {
2527 return instance_->mutable_supplemental_semantic_ids();
2528 }
2529
2530 void set_supplemental_semantic_ids(
2531 common::optional<
2532 std::vector<
2533 std::shared_ptr<types::IReference>
2534 >
2535 > value
2536 ) override {
2537 instance_->set_supplemental_semantic_ids(value);
2538 }
2539
2540 const common::optional<
2541 std::vector<
2542 std::shared_ptr<types::IQualifier>
2543 >
2544 >& qualifiers() const override {
2545 return instance_->qualifiers();
2546 }
2547
2548 common::optional<
2549 std::vector<
2550 std::shared_ptr<types::IQualifier>
2551 >
2552 >& mutable_qualifiers() override {
2553 return instance_->mutable_qualifiers();
2554 }
2555
2556 void set_qualifiers(
2557 common::optional<
2558 std::vector<
2559 std::shared_ptr<types::IQualifier>
2560 >
2561 > value
2562 ) override {
2563 instance_->set_qualifiers(value);
2564 }
2565
2566 const common::optional<
2567 std::vector<
2568 std::shared_ptr<types::IEmbeddedDataSpecification>
2569 >
2570 >& embedded_data_specifications() const override {
2571 return instance_->embedded_data_specifications();
2572 }
2573
2574 common::optional<
2575 std::vector<
2576 std::shared_ptr<types::IEmbeddedDataSpecification>
2577 >
2578 >& mutable_embedded_data_specifications() override {
2579 return instance_->mutable_embedded_data_specifications();
2580 }
2581
2582 void set_embedded_data_specifications(
2583 common::optional<
2584 std::vector<
2585 std::shared_ptr<types::IEmbeddedDataSpecification>
2586 >
2587 > value
2588 ) override {
2589 instance_->set_embedded_data_specifications(value);
2590 }
2591
2592 const common::optional<bool>& order_relevant() const override {
2593 return instance_->order_relevant();
2594 }
2595
2596 common::optional<bool>& mutable_order_relevant() override {
2597 return instance_->mutable_order_relevant();
2598 }
2599
2600 void set_order_relevant(
2601 common::optional<bool> value
2602 ) override {
2603 instance_->set_order_relevant(value);
2604 }
2605
2606 const common::optional<
2607 std::shared_ptr<types::IReference>
2608 >& semantic_id_list_element() const override {
2609 return instance_->semantic_id_list_element();
2610 }
2611
2612 common::optional<
2613 std::shared_ptr<types::IReference>
2614 >& mutable_semantic_id_list_element() override {
2615 return instance_->mutable_semantic_id_list_element();
2616 }
2617
2618 void set_semantic_id_list_element(
2619 common::optional<
2620 std::shared_ptr<types::IReference>
2621 > value
2622 ) override {
2623 instance_->set_semantic_id_list_element(value);
2624 }
2625
2626 types::AasSubmodelElements type_value_list_element() const override {
2627 return instance_->type_value_list_element();
2628 }
2629
2630 types::AasSubmodelElements& mutable_type_value_list_element() override {
2631 return instance_->mutable_type_value_list_element();
2632 }
2633
2634 void set_type_value_list_element(
2636 ) override {
2637 instance_->set_type_value_list_element(value);
2638 }
2639
2640 const common::optional<types::DataTypeDefXsd>& value_type_list_element() const override {
2641 return instance_->value_type_list_element();
2642 }
2643
2644 common::optional<types::DataTypeDefXsd>& mutable_value_type_list_element() override {
2645 return instance_->mutable_value_type_list_element();
2646 }
2647
2648 void set_value_type_list_element(
2649 common::optional<types::DataTypeDefXsd> value
2650 ) override {
2651 instance_->set_value_type_list_element(value);
2652 }
2653
2654 const common::optional<
2655 std::vector<
2656 std::shared_ptr<types::ISubmodelElement>
2657 >
2658 >& value() const override {
2659 return instance_->value();
2660 }
2661
2662 common::optional<
2663 std::vector<
2664 std::shared_ptr<types::ISubmodelElement>
2665 >
2666 >& mutable_value() override {
2667 return instance_->mutable_value();
2668 }
2669
2670 void set_value(
2671 common::optional<
2672 std::vector<
2673 std::shared_ptr<types::ISubmodelElement>
2674 >
2675 > value
2676 ) override {
2677 instance_->set_value(value);
2678 }
2679
2680 bool OrderRelevantOrDefault() const override {
2681 return instance_->OrderRelevantOrDefault();
2682 }
2683
2684 const std::shared_ptr<E>& enhancement() const {
2685 return enhancement_;
2686 }
2687
2688 std::shared_ptr<E>& mutable_enhancement() {
2689 return enhancement_;
2690 }
2691
2692 void set_enhancement(
2693 std::shared_ptr<E> value
2694 ) {
2695 enhancement_ = std::move(value);
2696 }
2697
2698 EnhancedSubmodelElementList(
2699 std::shared_ptr<types::ISubmodelElementList> instance,
2700 std::shared_ptr<E> enhancement
2701 ) :
2702 instance_(instance),
2703 enhancement_(enhancement) {
2704 // Intentionally empty.
2705 }
2706
2707 virtual ~EnhancedSubmodelElementList() = default;
2708
2709 private:
2710 std::shared_ptr<types::ISubmodelElementList> instance_;
2711 std::shared_ptr<E> enhancement_;
2712};
2713
2714template<class E>
2715class EnhancedSubmodelElementCollection
2716 : virtual public types::ISubmodelElementCollection,
2717 virtual public IEnhanced<E> {
2718 public:
2719 types::ModelType model_type() const override {
2721 }
2722
2723 const common::optional<
2724 std::vector<
2725 std::shared_ptr<types::IExtension>
2726 >
2727 >& extensions() const override {
2728 return instance_->extensions();
2729 }
2730
2731 common::optional<
2732 std::vector<
2733 std::shared_ptr<types::IExtension>
2734 >
2735 >& mutable_extensions() override {
2736 return instance_->mutable_extensions();
2737 }
2738
2739 void set_extensions(
2740 common::optional<
2741 std::vector<
2742 std::shared_ptr<types::IExtension>
2743 >
2744 > value
2745 ) override {
2746 instance_->set_extensions(value);
2747 }
2748
2749 const common::optional<std::wstring>& category() const override {
2750 return instance_->category();
2751 }
2752
2753 common::optional<std::wstring>& mutable_category() override {
2754 return instance_->mutable_category();
2755 }
2756
2757 void set_category(
2758 common::optional<std::wstring> value
2759 ) override {
2760 instance_->set_category(value);
2761 }
2762
2763 const common::optional<std::wstring>& id_short() const override {
2764 return instance_->id_short();
2765 }
2766
2767 common::optional<std::wstring>& mutable_id_short() override {
2768 return instance_->mutable_id_short();
2769 }
2770
2771 void set_id_short(
2772 common::optional<std::wstring> value
2773 ) override {
2774 instance_->set_id_short(value);
2775 }
2776
2777 const common::optional<
2778 std::vector<
2779 std::shared_ptr<types::ILangStringNameType>
2780 >
2781 >& display_name() const override {
2782 return instance_->display_name();
2783 }
2784
2785 common::optional<
2786 std::vector<
2787 std::shared_ptr<types::ILangStringNameType>
2788 >
2789 >& mutable_display_name() override {
2790 return instance_->mutable_display_name();
2791 }
2792
2793 void set_display_name(
2794 common::optional<
2795 std::vector<
2796 std::shared_ptr<types::ILangStringNameType>
2797 >
2798 > value
2799 ) override {
2800 instance_->set_display_name(value);
2801 }
2802
2803 const common::optional<
2804 std::vector<
2805 std::shared_ptr<types::ILangStringTextType>
2806 >
2807 >& description() const override {
2808 return instance_->description();
2809 }
2810
2811 common::optional<
2812 std::vector<
2813 std::shared_ptr<types::ILangStringTextType>
2814 >
2815 >& mutable_description() override {
2816 return instance_->mutable_description();
2817 }
2818
2819 void set_description(
2820 common::optional<
2821 std::vector<
2822 std::shared_ptr<types::ILangStringTextType>
2823 >
2824 > value
2825 ) override {
2826 instance_->set_description(value);
2827 }
2828
2829 const common::optional<
2830 std::shared_ptr<types::IReference>
2831 >& semantic_id() const override {
2832 return instance_->semantic_id();
2833 }
2834
2835 common::optional<
2836 std::shared_ptr<types::IReference>
2837 >& mutable_semantic_id() override {
2838 return instance_->mutable_semantic_id();
2839 }
2840
2841 void set_semantic_id(
2842 common::optional<
2843 std::shared_ptr<types::IReference>
2844 > value
2845 ) override {
2846 instance_->set_semantic_id(value);
2847 }
2848
2849 const common::optional<
2850 std::vector<
2851 std::shared_ptr<types::IReference>
2852 >
2853 >& supplemental_semantic_ids() const override {
2854 return instance_->supplemental_semantic_ids();
2855 }
2856
2857 common::optional<
2858 std::vector<
2859 std::shared_ptr<types::IReference>
2860 >
2861 >& mutable_supplemental_semantic_ids() override {
2862 return instance_->mutable_supplemental_semantic_ids();
2863 }
2864
2865 void set_supplemental_semantic_ids(
2866 common::optional<
2867 std::vector<
2868 std::shared_ptr<types::IReference>
2869 >
2870 > value
2871 ) override {
2872 instance_->set_supplemental_semantic_ids(value);
2873 }
2874
2875 const common::optional<
2876 std::vector<
2877 std::shared_ptr<types::IQualifier>
2878 >
2879 >& qualifiers() const override {
2880 return instance_->qualifiers();
2881 }
2882
2883 common::optional<
2884 std::vector<
2885 std::shared_ptr<types::IQualifier>
2886 >
2887 >& mutable_qualifiers() override {
2888 return instance_->mutable_qualifiers();
2889 }
2890
2891 void set_qualifiers(
2892 common::optional<
2893 std::vector<
2894 std::shared_ptr<types::IQualifier>
2895 >
2896 > value
2897 ) override {
2898 instance_->set_qualifiers(value);
2899 }
2900
2901 const common::optional<
2902 std::vector<
2903 std::shared_ptr<types::IEmbeddedDataSpecification>
2904 >
2905 >& embedded_data_specifications() const override {
2906 return instance_->embedded_data_specifications();
2907 }
2908
2909 common::optional<
2910 std::vector<
2911 std::shared_ptr<types::IEmbeddedDataSpecification>
2912 >
2913 >& mutable_embedded_data_specifications() override {
2914 return instance_->mutable_embedded_data_specifications();
2915 }
2916
2917 void set_embedded_data_specifications(
2918 common::optional<
2919 std::vector<
2920 std::shared_ptr<types::IEmbeddedDataSpecification>
2921 >
2922 > value
2923 ) override {
2924 instance_->set_embedded_data_specifications(value);
2925 }
2926
2927 const common::optional<
2928 std::vector<
2929 std::shared_ptr<types::ISubmodelElement>
2930 >
2931 >& value() const override {
2932 return instance_->value();
2933 }
2934
2935 common::optional<
2936 std::vector<
2937 std::shared_ptr<types::ISubmodelElement>
2938 >
2939 >& mutable_value() override {
2940 return instance_->mutable_value();
2941 }
2942
2943 void set_value(
2944 common::optional<
2945 std::vector<
2946 std::shared_ptr<types::ISubmodelElement>
2947 >
2948 > value
2949 ) override {
2950 instance_->set_value(value);
2951 }
2952
2953 const std::shared_ptr<E>& enhancement() const {
2954 return enhancement_;
2955 }
2956
2957 std::shared_ptr<E>& mutable_enhancement() {
2958 return enhancement_;
2959 }
2960
2961 void set_enhancement(
2962 std::shared_ptr<E> value
2963 ) {
2964 enhancement_ = std::move(value);
2965 }
2966
2967 EnhancedSubmodelElementCollection(
2968 std::shared_ptr<types::ISubmodelElementCollection> instance,
2969 std::shared_ptr<E> enhancement
2970 ) :
2971 instance_(instance),
2972 enhancement_(enhancement) {
2973 // Intentionally empty.
2974 }
2975
2976 virtual ~EnhancedSubmodelElementCollection() = default;
2977
2978 private:
2979 std::shared_ptr<types::ISubmodelElementCollection> instance_;
2980 std::shared_ptr<E> enhancement_;
2981};
2982
2983template<class E>
2984class EnhancedProperty
2985 : virtual public types::IProperty,
2986 virtual public IEnhanced<E> {
2987 public:
2988 types::ModelType model_type() const override {
2990 }
2991
2992 const common::optional<
2993 std::vector<
2994 std::shared_ptr<types::IExtension>
2995 >
2996 >& extensions() const override {
2997 return instance_->extensions();
2998 }
2999
3000 common::optional<
3001 std::vector<
3002 std::shared_ptr<types::IExtension>
3003 >
3004 >& mutable_extensions() override {
3005 return instance_->mutable_extensions();
3006 }
3007
3008 void set_extensions(
3009 common::optional<
3010 std::vector<
3011 std::shared_ptr<types::IExtension>
3012 >
3013 > value
3014 ) override {
3015 instance_->set_extensions(value);
3016 }
3017
3018 const common::optional<std::wstring>& category() const override {
3019 return instance_->category();
3020 }
3021
3022 common::optional<std::wstring>& mutable_category() override {
3023 return instance_->mutable_category();
3024 }
3025
3026 void set_category(
3027 common::optional<std::wstring> value
3028 ) override {
3029 instance_->set_category(value);
3030 }
3031
3032 const common::optional<std::wstring>& id_short() const override {
3033 return instance_->id_short();
3034 }
3035
3036 common::optional<std::wstring>& mutable_id_short() override {
3037 return instance_->mutable_id_short();
3038 }
3039
3040 void set_id_short(
3041 common::optional<std::wstring> value
3042 ) override {
3043 instance_->set_id_short(value);
3044 }
3045
3046 const common::optional<
3047 std::vector<
3048 std::shared_ptr<types::ILangStringNameType>
3049 >
3050 >& display_name() const override {
3051 return instance_->display_name();
3052 }
3053
3054 common::optional<
3055 std::vector<
3056 std::shared_ptr<types::ILangStringNameType>
3057 >
3058 >& mutable_display_name() override {
3059 return instance_->mutable_display_name();
3060 }
3061
3062 void set_display_name(
3063 common::optional<
3064 std::vector<
3065 std::shared_ptr<types::ILangStringNameType>
3066 >
3067 > value
3068 ) override {
3069 instance_->set_display_name(value);
3070 }
3071
3072 const common::optional<
3073 std::vector<
3074 std::shared_ptr<types::ILangStringTextType>
3075 >
3076 >& description() const override {
3077 return instance_->description();
3078 }
3079
3080 common::optional<
3081 std::vector<
3082 std::shared_ptr<types::ILangStringTextType>
3083 >
3084 >& mutable_description() override {
3085 return instance_->mutable_description();
3086 }
3087
3088 void set_description(
3089 common::optional<
3090 std::vector<
3091 std::shared_ptr<types::ILangStringTextType>
3092 >
3093 > value
3094 ) override {
3095 instance_->set_description(value);
3096 }
3097
3098 const common::optional<
3099 std::shared_ptr<types::IReference>
3100 >& semantic_id() const override {
3101 return instance_->semantic_id();
3102 }
3103
3104 common::optional<
3105 std::shared_ptr<types::IReference>
3106 >& mutable_semantic_id() override {
3107 return instance_->mutable_semantic_id();
3108 }
3109
3110 void set_semantic_id(
3111 common::optional<
3112 std::shared_ptr<types::IReference>
3113 > value
3114 ) override {
3115 instance_->set_semantic_id(value);
3116 }
3117
3118 const common::optional<
3119 std::vector<
3120 std::shared_ptr<types::IReference>
3121 >
3122 >& supplemental_semantic_ids() const override {
3123 return instance_->supplemental_semantic_ids();
3124 }
3125
3126 common::optional<
3127 std::vector<
3128 std::shared_ptr<types::IReference>
3129 >
3130 >& mutable_supplemental_semantic_ids() override {
3131 return instance_->mutable_supplemental_semantic_ids();
3132 }
3133
3134 void set_supplemental_semantic_ids(
3135 common::optional<
3136 std::vector<
3137 std::shared_ptr<types::IReference>
3138 >
3139 > value
3140 ) override {
3141 instance_->set_supplemental_semantic_ids(value);
3142 }
3143
3144 const common::optional<
3145 std::vector<
3146 std::shared_ptr<types::IQualifier>
3147 >
3148 >& qualifiers() const override {
3149 return instance_->qualifiers();
3150 }
3151
3152 common::optional<
3153 std::vector<
3154 std::shared_ptr<types::IQualifier>
3155 >
3156 >& mutable_qualifiers() override {
3157 return instance_->mutable_qualifiers();
3158 }
3159
3160 void set_qualifiers(
3161 common::optional<
3162 std::vector<
3163 std::shared_ptr<types::IQualifier>
3164 >
3165 > value
3166 ) override {
3167 instance_->set_qualifiers(value);
3168 }
3169
3170 const common::optional<
3171 std::vector<
3172 std::shared_ptr<types::IEmbeddedDataSpecification>
3173 >
3174 >& embedded_data_specifications() const override {
3175 return instance_->embedded_data_specifications();
3176 }
3177
3178 common::optional<
3179 std::vector<
3180 std::shared_ptr<types::IEmbeddedDataSpecification>
3181 >
3182 >& mutable_embedded_data_specifications() override {
3183 return instance_->mutable_embedded_data_specifications();
3184 }
3185
3186 void set_embedded_data_specifications(
3187 common::optional<
3188 std::vector<
3189 std::shared_ptr<types::IEmbeddedDataSpecification>
3190 >
3191 > value
3192 ) override {
3193 instance_->set_embedded_data_specifications(value);
3194 }
3195
3196 types::DataTypeDefXsd value_type() const override {
3197 return instance_->value_type();
3198 }
3199
3200 types::DataTypeDefXsd& mutable_value_type() override {
3201 return instance_->mutable_value_type();
3202 }
3203
3204 void set_value_type(
3206 ) override {
3207 instance_->set_value_type(value);
3208 }
3209
3210 const common::optional<std::wstring>& value() const override {
3211 return instance_->value();
3212 }
3213
3214 common::optional<std::wstring>& mutable_value() override {
3215 return instance_->mutable_value();
3216 }
3217
3218 void set_value(
3219 common::optional<std::wstring> value
3220 ) override {
3221 instance_->set_value(value);
3222 }
3223
3224 const common::optional<
3225 std::shared_ptr<types::IReference>
3226 >& value_id() const override {
3227 return instance_->value_id();
3228 }
3229
3230 common::optional<
3231 std::shared_ptr<types::IReference>
3232 >& mutable_value_id() override {
3233 return instance_->mutable_value_id();
3234 }
3235
3236 void set_value_id(
3237 common::optional<
3238 std::shared_ptr<types::IReference>
3239 > value
3240 ) override {
3241 instance_->set_value_id(value);
3242 }
3243
3244 std::wstring CategoryOrDefault() const override {
3245 return instance_->CategoryOrDefault();
3246 }
3247
3248 const std::shared_ptr<E>& enhancement() const {
3249 return enhancement_;
3250 }
3251
3252 std::shared_ptr<E>& mutable_enhancement() {
3253 return enhancement_;
3254 }
3255
3256 void set_enhancement(
3257 std::shared_ptr<E> value
3258 ) {
3259 enhancement_ = std::move(value);
3260 }
3261
3262 EnhancedProperty(
3263 std::shared_ptr<types::IProperty> instance,
3264 std::shared_ptr<E> enhancement
3265 ) :
3266 instance_(instance),
3267 enhancement_(enhancement) {
3268 // Intentionally empty.
3269 }
3270
3271 virtual ~EnhancedProperty() = default;
3272
3273 private:
3274 std::shared_ptr<types::IProperty> instance_;
3275 std::shared_ptr<E> enhancement_;
3276};
3277
3278template<class E>
3279class EnhancedMultiLanguageProperty
3280 : virtual public types::IMultiLanguageProperty,
3281 virtual public IEnhanced<E> {
3282 public:
3283 types::ModelType model_type() const override {
3285 }
3286
3287 const common::optional<
3288 std::vector<
3289 std::shared_ptr<types::IExtension>
3290 >
3291 >& extensions() const override {
3292 return instance_->extensions();
3293 }
3294
3295 common::optional<
3296 std::vector<
3297 std::shared_ptr<types::IExtension>
3298 >
3299 >& mutable_extensions() override {
3300 return instance_->mutable_extensions();
3301 }
3302
3303 void set_extensions(
3304 common::optional<
3305 std::vector<
3306 std::shared_ptr<types::IExtension>
3307 >
3308 > value
3309 ) override {
3310 instance_->set_extensions(value);
3311 }
3312
3313 const common::optional<std::wstring>& category() const override {
3314 return instance_->category();
3315 }
3316
3317 common::optional<std::wstring>& mutable_category() override {
3318 return instance_->mutable_category();
3319 }
3320
3321 void set_category(
3322 common::optional<std::wstring> value
3323 ) override {
3324 instance_->set_category(value);
3325 }
3326
3327 const common::optional<std::wstring>& id_short() const override {
3328 return instance_->id_short();
3329 }
3330
3331 common::optional<std::wstring>& mutable_id_short() override {
3332 return instance_->mutable_id_short();
3333 }
3334
3335 void set_id_short(
3336 common::optional<std::wstring> value
3337 ) override {
3338 instance_->set_id_short(value);
3339 }
3340
3341 const common::optional<
3342 std::vector<
3343 std::shared_ptr<types::ILangStringNameType>
3344 >
3345 >& display_name() const override {
3346 return instance_->display_name();
3347 }
3348
3349 common::optional<
3350 std::vector<
3351 std::shared_ptr<types::ILangStringNameType>
3352 >
3353 >& mutable_display_name() override {
3354 return instance_->mutable_display_name();
3355 }
3356
3357 void set_display_name(
3358 common::optional<
3359 std::vector<
3360 std::shared_ptr<types::ILangStringNameType>
3361 >
3362 > value
3363 ) override {
3364 instance_->set_display_name(value);
3365 }
3366
3367 const common::optional<
3368 std::vector<
3369 std::shared_ptr<types::ILangStringTextType>
3370 >
3371 >& description() const override {
3372 return instance_->description();
3373 }
3374
3375 common::optional<
3376 std::vector<
3377 std::shared_ptr<types::ILangStringTextType>
3378 >
3379 >& mutable_description() override {
3380 return instance_->mutable_description();
3381 }
3382
3383 void set_description(
3384 common::optional<
3385 std::vector<
3386 std::shared_ptr<types::ILangStringTextType>
3387 >
3388 > value
3389 ) override {
3390 instance_->set_description(value);
3391 }
3392
3393 const common::optional<
3394 std::shared_ptr<types::IReference>
3395 >& semantic_id() const override {
3396 return instance_->semantic_id();
3397 }
3398
3399 common::optional<
3400 std::shared_ptr<types::IReference>
3401 >& mutable_semantic_id() override {
3402 return instance_->mutable_semantic_id();
3403 }
3404
3405 void set_semantic_id(
3406 common::optional<
3407 std::shared_ptr<types::IReference>
3408 > value
3409 ) override {
3410 instance_->set_semantic_id(value);
3411 }
3412
3413 const common::optional<
3414 std::vector<
3415 std::shared_ptr<types::IReference>
3416 >
3417 >& supplemental_semantic_ids() const override {
3418 return instance_->supplemental_semantic_ids();
3419 }
3420
3421 common::optional<
3422 std::vector<
3423 std::shared_ptr<types::IReference>
3424 >
3425 >& mutable_supplemental_semantic_ids() override {
3426 return instance_->mutable_supplemental_semantic_ids();
3427 }
3428
3429 void set_supplemental_semantic_ids(
3430 common::optional<
3431 std::vector<
3432 std::shared_ptr<types::IReference>
3433 >
3434 > value
3435 ) override {
3436 instance_->set_supplemental_semantic_ids(value);
3437 }
3438
3439 const common::optional<
3440 std::vector<
3441 std::shared_ptr<types::IQualifier>
3442 >
3443 >& qualifiers() const override {
3444 return instance_->qualifiers();
3445 }
3446
3447 common::optional<
3448 std::vector<
3449 std::shared_ptr<types::IQualifier>
3450 >
3451 >& mutable_qualifiers() override {
3452 return instance_->mutable_qualifiers();
3453 }
3454
3455 void set_qualifiers(
3456 common::optional<
3457 std::vector<
3458 std::shared_ptr<types::IQualifier>
3459 >
3460 > value
3461 ) override {
3462 instance_->set_qualifiers(value);
3463 }
3464
3465 const common::optional<
3466 std::vector<
3467 std::shared_ptr<types::IEmbeddedDataSpecification>
3468 >
3469 >& embedded_data_specifications() const override {
3470 return instance_->embedded_data_specifications();
3471 }
3472
3473 common::optional<
3474 std::vector<
3475 std::shared_ptr<types::IEmbeddedDataSpecification>
3476 >
3477 >& mutable_embedded_data_specifications() override {
3478 return instance_->mutable_embedded_data_specifications();
3479 }
3480
3481 void set_embedded_data_specifications(
3482 common::optional<
3483 std::vector<
3484 std::shared_ptr<types::IEmbeddedDataSpecification>
3485 >
3486 > value
3487 ) override {
3488 instance_->set_embedded_data_specifications(value);
3489 }
3490
3491 const common::optional<
3492 std::vector<
3493 std::shared_ptr<types::ILangStringTextType>
3494 >
3495 >& value() const override {
3496 return instance_->value();
3497 }
3498
3499 common::optional<
3500 std::vector<
3501 std::shared_ptr<types::ILangStringTextType>
3502 >
3503 >& mutable_value() override {
3504 return instance_->mutable_value();
3505 }
3506
3507 void set_value(
3508 common::optional<
3509 std::vector<
3510 std::shared_ptr<types::ILangStringTextType>
3511 >
3512 > value
3513 ) override {
3514 instance_->set_value(value);
3515 }
3516
3517 const common::optional<
3518 std::shared_ptr<types::IReference>
3519 >& value_id() const override {
3520 return instance_->value_id();
3521 }
3522
3523 common::optional<
3524 std::shared_ptr<types::IReference>
3525 >& mutable_value_id() override {
3526 return instance_->mutable_value_id();
3527 }
3528
3529 void set_value_id(
3530 common::optional<
3531 std::shared_ptr<types::IReference>
3532 > value
3533 ) override {
3534 instance_->set_value_id(value);
3535 }
3536
3537 std::wstring CategoryOrDefault() const override {
3538 return instance_->CategoryOrDefault();
3539 }
3540
3541 const std::shared_ptr<E>& enhancement() const {
3542 return enhancement_;
3543 }
3544
3545 std::shared_ptr<E>& mutable_enhancement() {
3546 return enhancement_;
3547 }
3548
3549 void set_enhancement(
3550 std::shared_ptr<E> value
3551 ) {
3552 enhancement_ = std::move(value);
3553 }
3554
3555 EnhancedMultiLanguageProperty(
3556 std::shared_ptr<types::IMultiLanguageProperty> instance,
3557 std::shared_ptr<E> enhancement
3558 ) :
3559 instance_(instance),
3560 enhancement_(enhancement) {
3561 // Intentionally empty.
3562 }
3563
3564 virtual ~EnhancedMultiLanguageProperty() = default;
3565
3566 private:
3567 std::shared_ptr<types::IMultiLanguageProperty> instance_;
3568 std::shared_ptr<E> enhancement_;
3569};
3570
3571template<class E>
3572class EnhancedRange
3573 : virtual public types::IRange,
3574 virtual public IEnhanced<E> {
3575 public:
3576 types::ModelType model_type() const override {
3578 }
3579
3580 const common::optional<
3581 std::vector<
3582 std::shared_ptr<types::IExtension>
3583 >
3584 >& extensions() const override {
3585 return instance_->extensions();
3586 }
3587
3588 common::optional<
3589 std::vector<
3590 std::shared_ptr<types::IExtension>
3591 >
3592 >& mutable_extensions() override {
3593 return instance_->mutable_extensions();
3594 }
3595
3596 void set_extensions(
3597 common::optional<
3598 std::vector<
3599 std::shared_ptr<types::IExtension>
3600 >
3601 > value
3602 ) override {
3603 instance_->set_extensions(value);
3604 }
3605
3606 const common::optional<std::wstring>& category() const override {
3607 return instance_->category();
3608 }
3609
3610 common::optional<std::wstring>& mutable_category() override {
3611 return instance_->mutable_category();
3612 }
3613
3614 void set_category(
3615 common::optional<std::wstring> value
3616 ) override {
3617 instance_->set_category(value);
3618 }
3619
3620 const common::optional<std::wstring>& id_short() const override {
3621 return instance_->id_short();
3622 }
3623
3624 common::optional<std::wstring>& mutable_id_short() override {
3625 return instance_->mutable_id_short();
3626 }
3627
3628 void set_id_short(
3629 common::optional<std::wstring> value
3630 ) override {
3631 instance_->set_id_short(value);
3632 }
3633
3634 const common::optional<
3635 std::vector<
3636 std::shared_ptr<types::ILangStringNameType>
3637 >
3638 >& display_name() const override {
3639 return instance_->display_name();
3640 }
3641
3642 common::optional<
3643 std::vector<
3644 std::shared_ptr<types::ILangStringNameType>
3645 >
3646 >& mutable_display_name() override {
3647 return instance_->mutable_display_name();
3648 }
3649
3650 void set_display_name(
3651 common::optional<
3652 std::vector<
3653 std::shared_ptr<types::ILangStringNameType>
3654 >
3655 > value
3656 ) override {
3657 instance_->set_display_name(value);
3658 }
3659
3660 const common::optional<
3661 std::vector<
3662 std::shared_ptr<types::ILangStringTextType>
3663 >
3664 >& description() const override {
3665 return instance_->description();
3666 }
3667
3668 common::optional<
3669 std::vector<
3670 std::shared_ptr<types::ILangStringTextType>
3671 >
3672 >& mutable_description() override {
3673 return instance_->mutable_description();
3674 }
3675
3676 void set_description(
3677 common::optional<
3678 std::vector<
3679 std::shared_ptr<types::ILangStringTextType>
3680 >
3681 > value
3682 ) override {
3683 instance_->set_description(value);
3684 }
3685
3686 const common::optional<
3687 std::shared_ptr<types::IReference>
3688 >& semantic_id() const override {
3689 return instance_->semantic_id();
3690 }
3691
3692 common::optional<
3693 std::shared_ptr<types::IReference>
3694 >& mutable_semantic_id() override {
3695 return instance_->mutable_semantic_id();
3696 }
3697
3698 void set_semantic_id(
3699 common::optional<
3700 std::shared_ptr<types::IReference>
3701 > value
3702 ) override {
3703 instance_->set_semantic_id(value);
3704 }
3705
3706 const common::optional<
3707 std::vector<
3708 std::shared_ptr<types::IReference>
3709 >
3710 >& supplemental_semantic_ids() const override {
3711 return instance_->supplemental_semantic_ids();
3712 }
3713
3714 common::optional<
3715 std::vector<
3716 std::shared_ptr<types::IReference>
3717 >
3718 >& mutable_supplemental_semantic_ids() override {
3719 return instance_->mutable_supplemental_semantic_ids();
3720 }
3721
3722 void set_supplemental_semantic_ids(
3723 common::optional<
3724 std::vector<
3725 std::shared_ptr<types::IReference>
3726 >
3727 > value
3728 ) override {
3729 instance_->set_supplemental_semantic_ids(value);
3730 }
3731
3732 const common::optional<
3733 std::vector<
3734 std::shared_ptr<types::IQualifier>
3735 >
3736 >& qualifiers() const override {
3737 return instance_->qualifiers();
3738 }
3739
3740 common::optional<
3741 std::vector<
3742 std::shared_ptr<types::IQualifier>
3743 >
3744 >& mutable_qualifiers() override {
3745 return instance_->mutable_qualifiers();
3746 }
3747
3748 void set_qualifiers(
3749 common::optional<
3750 std::vector<
3751 std::shared_ptr<types::IQualifier>
3752 >
3753 > value
3754 ) override {
3755 instance_->set_qualifiers(value);
3756 }
3757
3758 const common::optional<
3759 std::vector<
3760 std::shared_ptr<types::IEmbeddedDataSpecification>
3761 >
3762 >& embedded_data_specifications() const override {
3763 return instance_->embedded_data_specifications();
3764 }
3765
3766 common::optional<
3767 std::vector<
3768 std::shared_ptr<types::IEmbeddedDataSpecification>
3769 >
3770 >& mutable_embedded_data_specifications() override {
3771 return instance_->mutable_embedded_data_specifications();
3772 }
3773
3774 void set_embedded_data_specifications(
3775 common::optional<
3776 std::vector<
3777 std::shared_ptr<types::IEmbeddedDataSpecification>
3778 >
3779 > value
3780 ) override {
3781 instance_->set_embedded_data_specifications(value);
3782 }
3783
3784 types::DataTypeDefXsd value_type() const override {
3785 return instance_->value_type();
3786 }
3787
3788 types::DataTypeDefXsd& mutable_value_type() override {
3789 return instance_->mutable_value_type();
3790 }
3791
3792 void set_value_type(
3794 ) override {
3795 instance_->set_value_type(value);
3796 }
3797
3798 const common::optional<std::wstring>& min() const override {
3799 return instance_->min();
3800 }
3801
3802 common::optional<std::wstring>& mutable_min() override {
3803 return instance_->mutable_min();
3804 }
3805
3806 void set_min(
3807 common::optional<std::wstring> value
3808 ) override {
3809 instance_->set_min(value);
3810 }
3811
3812 const common::optional<std::wstring>& max() const override {
3813 return instance_->max();
3814 }
3815
3816 common::optional<std::wstring>& mutable_max() override {
3817 return instance_->mutable_max();
3818 }
3819
3820 void set_max(
3821 common::optional<std::wstring> value
3822 ) override {
3823 instance_->set_max(value);
3824 }
3825
3826 std::wstring CategoryOrDefault() const override {
3827 return instance_->CategoryOrDefault();
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 {
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 std::wstring CategoryOrDefault() const override {
4094 return instance_->CategoryOrDefault();
4095 }
4096
4097 const std::shared_ptr<E>& enhancement() const {
4098 return enhancement_;
4099 }
4100
4101 std::shared_ptr<E>& mutable_enhancement() {
4102 return enhancement_;
4103 }
4104
4105 void set_enhancement(
4106 std::shared_ptr<E> value
4107 ) {
4108 enhancement_ = std::move(value);
4109 }
4110
4111 EnhancedReferenceElement(
4112 std::shared_ptr<types::IReferenceElement> instance,
4113 std::shared_ptr<E> enhancement
4114 ) :
4115 instance_(instance),
4116 enhancement_(enhancement) {
4117 // Intentionally empty.
4118 }
4119
4120 virtual ~EnhancedReferenceElement() = default;
4121
4122 private:
4123 std::shared_ptr<types::IReferenceElement> instance_;
4124 std::shared_ptr<E> enhancement_;
4125};
4126
4127template<class E>
4128class EnhancedBlob
4129 : virtual public types::IBlob,
4130 virtual public IEnhanced<E> {
4131 public:
4132 types::ModelType model_type() const override {
4134 }
4135
4136 const common::optional<
4137 std::vector<
4138 std::shared_ptr<types::IExtension>
4139 >
4140 >& extensions() const override {
4141 return instance_->extensions();
4142 }
4143
4144 common::optional<
4145 std::vector<
4146 std::shared_ptr<types::IExtension>
4147 >
4148 >& mutable_extensions() override {
4149 return instance_->mutable_extensions();
4150 }
4151
4152 void set_extensions(
4153 common::optional<
4154 std::vector<
4155 std::shared_ptr<types::IExtension>
4156 >
4157 > value
4158 ) override {
4159 instance_->set_extensions(value);
4160 }
4161
4162 const common::optional<std::wstring>& category() const override {
4163 return instance_->category();
4164 }
4165
4166 common::optional<std::wstring>& mutable_category() override {
4167 return instance_->mutable_category();
4168 }
4169
4170 void set_category(
4171 common::optional<std::wstring> value
4172 ) override {
4173 instance_->set_category(value);
4174 }
4175
4176 const common::optional<std::wstring>& id_short() const override {
4177 return instance_->id_short();
4178 }
4179
4180 common::optional<std::wstring>& mutable_id_short() override {
4181 return instance_->mutable_id_short();
4182 }
4183
4184 void set_id_short(
4185 common::optional<std::wstring> value
4186 ) override {
4187 instance_->set_id_short(value);
4188 }
4189
4190 const common::optional<
4191 std::vector<
4192 std::shared_ptr<types::ILangStringNameType>
4193 >
4194 >& display_name() const override {
4195 return instance_->display_name();
4196 }
4197
4198 common::optional<
4199 std::vector<
4200 std::shared_ptr<types::ILangStringNameType>
4201 >
4202 >& mutable_display_name() override {
4203 return instance_->mutable_display_name();
4204 }
4205
4206 void set_display_name(
4207 common::optional<
4208 std::vector<
4209 std::shared_ptr<types::ILangStringNameType>
4210 >
4211 > value
4212 ) override {
4213 instance_->set_display_name(value);
4214 }
4215
4216 const common::optional<
4217 std::vector<
4218 std::shared_ptr<types::ILangStringTextType>
4219 >
4220 >& description() const override {
4221 return instance_->description();
4222 }
4223
4224 common::optional<
4225 std::vector<
4226 std::shared_ptr<types::ILangStringTextType>
4227 >
4228 >& mutable_description() override {
4229 return instance_->mutable_description();
4230 }
4231
4232 void set_description(
4233 common::optional<
4234 std::vector<
4235 std::shared_ptr<types::ILangStringTextType>
4236 >
4237 > value
4238 ) override {
4239 instance_->set_description(value);
4240 }
4241
4242 const common::optional<
4243 std::shared_ptr<types::IReference>
4244 >& semantic_id() const override {
4245 return instance_->semantic_id();
4246 }
4247
4248 common::optional<
4249 std::shared_ptr<types::IReference>
4250 >& mutable_semantic_id() override {
4251 return instance_->mutable_semantic_id();
4252 }
4253
4254 void set_semantic_id(
4255 common::optional<
4256 std::shared_ptr<types::IReference>
4257 > value
4258 ) override {
4259 instance_->set_semantic_id(value);
4260 }
4261
4262 const common::optional<
4263 std::vector<
4264 std::shared_ptr<types::IReference>
4265 >
4266 >& supplemental_semantic_ids() const override {
4267 return instance_->supplemental_semantic_ids();
4268 }
4269
4270 common::optional<
4271 std::vector<
4272 std::shared_ptr<types::IReference>
4273 >
4274 >& mutable_supplemental_semantic_ids() override {
4275 return instance_->mutable_supplemental_semantic_ids();
4276 }
4277
4278 void set_supplemental_semantic_ids(
4279 common::optional<
4280 std::vector<
4281 std::shared_ptr<types::IReference>
4282 >
4283 > value
4284 ) override {
4285 instance_->set_supplemental_semantic_ids(value);
4286 }
4287
4288 const common::optional<
4289 std::vector<
4290 std::shared_ptr<types::IQualifier>
4291 >
4292 >& qualifiers() const override {
4293 return instance_->qualifiers();
4294 }
4295
4296 common::optional<
4297 std::vector<
4298 std::shared_ptr<types::IQualifier>
4299 >
4300 >& mutable_qualifiers() override {
4301 return instance_->mutable_qualifiers();
4302 }
4303
4304 void set_qualifiers(
4305 common::optional<
4306 std::vector<
4307 std::shared_ptr<types::IQualifier>
4308 >
4309 > value
4310 ) override {
4311 instance_->set_qualifiers(value);
4312 }
4313
4314 const common::optional<
4315 std::vector<
4316 std::shared_ptr<types::IEmbeddedDataSpecification>
4317 >
4318 >& embedded_data_specifications() const override {
4319 return instance_->embedded_data_specifications();
4320 }
4321
4322 common::optional<
4323 std::vector<
4324 std::shared_ptr<types::IEmbeddedDataSpecification>
4325 >
4326 >& mutable_embedded_data_specifications() override {
4327 return instance_->mutable_embedded_data_specifications();
4328 }
4329
4330 void set_embedded_data_specifications(
4331 common::optional<
4332 std::vector<
4333 std::shared_ptr<types::IEmbeddedDataSpecification>
4334 >
4335 > value
4336 ) override {
4337 instance_->set_embedded_data_specifications(value);
4338 }
4339
4340 const common::optional<
4341 std::vector<std::uint8_t>
4342 >& value() const override {
4343 return instance_->value();
4344 }
4345
4346 common::optional<
4347 std::vector<std::uint8_t>
4348 >& mutable_value() override {
4349 return instance_->mutable_value();
4350 }
4351
4352 void set_value(
4353 common::optional<
4354 std::vector<std::uint8_t>
4355 > value
4356 ) override {
4357 instance_->set_value(value);
4358 }
4359
4360 const std::wstring& content_type() const override {
4361 return instance_->content_type();
4362 }
4363
4364 std::wstring& mutable_content_type() override {
4365 return instance_->mutable_content_type();
4366 }
4367
4368 void set_content_type(
4369 std::wstring value
4370 ) override {
4371 instance_->set_content_type(value);
4372 }
4373
4374 std::wstring CategoryOrDefault() const override {
4375 return instance_->CategoryOrDefault();
4376 }
4377
4378 const std::shared_ptr<E>& enhancement() const {
4379 return enhancement_;
4380 }
4381
4382 std::shared_ptr<E>& mutable_enhancement() {
4383 return enhancement_;
4384 }
4385
4386 void set_enhancement(
4387 std::shared_ptr<E> value
4388 ) {
4389 enhancement_ = std::move(value);
4390 }
4391
4392 EnhancedBlob(
4393 std::shared_ptr<types::IBlob> instance,
4394 std::shared_ptr<E> enhancement
4395 ) :
4396 instance_(instance),
4397 enhancement_(enhancement) {
4398 // Intentionally empty.
4399 }
4400
4401 virtual ~EnhancedBlob() = default;
4402
4403 private:
4404 std::shared_ptr<types::IBlob> instance_;
4405 std::shared_ptr<E> enhancement_;
4406};
4407
4408template<class E>
4409class EnhancedFile
4410 : virtual public types::IFile,
4411 virtual public IEnhanced<E> {
4412 public:
4413 types::ModelType model_type() const override {
4415 }
4416
4417 const common::optional<
4418 std::vector<
4419 std::shared_ptr<types::IExtension>
4420 >
4421 >& extensions() const override {
4422 return instance_->extensions();
4423 }
4424
4425 common::optional<
4426 std::vector<
4427 std::shared_ptr<types::IExtension>
4428 >
4429 >& mutable_extensions() override {
4430 return instance_->mutable_extensions();
4431 }
4432
4433 void set_extensions(
4434 common::optional<
4435 std::vector<
4436 std::shared_ptr<types::IExtension>
4437 >
4438 > value
4439 ) override {
4440 instance_->set_extensions(value);
4441 }
4442
4443 const common::optional<std::wstring>& category() const override {
4444 return instance_->category();
4445 }
4446
4447 common::optional<std::wstring>& mutable_category() override {
4448 return instance_->mutable_category();
4449 }
4450
4451 void set_category(
4452 common::optional<std::wstring> value
4453 ) override {
4454 instance_->set_category(value);
4455 }
4456
4457 const common::optional<std::wstring>& id_short() const override {
4458 return instance_->id_short();
4459 }
4460
4461 common::optional<std::wstring>& mutable_id_short() override {
4462 return instance_->mutable_id_short();
4463 }
4464
4465 void set_id_short(
4466 common::optional<std::wstring> value
4467 ) override {
4468 instance_->set_id_short(value);
4469 }
4470
4471 const common::optional<
4472 std::vector<
4473 std::shared_ptr<types::ILangStringNameType>
4474 >
4475 >& display_name() const override {
4476 return instance_->display_name();
4477 }
4478
4479 common::optional<
4480 std::vector<
4481 std::shared_ptr<types::ILangStringNameType>
4482 >
4483 >& mutable_display_name() override {
4484 return instance_->mutable_display_name();
4485 }
4486
4487 void set_display_name(
4488 common::optional<
4489 std::vector<
4490 std::shared_ptr<types::ILangStringNameType>
4491 >
4492 > value
4493 ) override {
4494 instance_->set_display_name(value);
4495 }
4496
4497 const common::optional<
4498 std::vector<
4499 std::shared_ptr<types::ILangStringTextType>
4500 >
4501 >& description() const override {
4502 return instance_->description();
4503 }
4504
4505 common::optional<
4506 std::vector<
4507 std::shared_ptr<types::ILangStringTextType>
4508 >
4509 >& mutable_description() override {
4510 return instance_->mutable_description();
4511 }
4512
4513 void set_description(
4514 common::optional<
4515 std::vector<
4516 std::shared_ptr<types::ILangStringTextType>
4517 >
4518 > value
4519 ) override {
4520 instance_->set_description(value);
4521 }
4522
4523 const common::optional<
4524 std::shared_ptr<types::IReference>
4525 >& semantic_id() const override {
4526 return instance_->semantic_id();
4527 }
4528
4529 common::optional<
4530 std::shared_ptr<types::IReference>
4531 >& mutable_semantic_id() override {
4532 return instance_->mutable_semantic_id();
4533 }
4534
4535 void set_semantic_id(
4536 common::optional<
4537 std::shared_ptr<types::IReference>
4538 > value
4539 ) override {
4540 instance_->set_semantic_id(value);
4541 }
4542
4543 const common::optional<
4544 std::vector<
4545 std::shared_ptr<types::IReference>
4546 >
4547 >& supplemental_semantic_ids() const override {
4548 return instance_->supplemental_semantic_ids();
4549 }
4550
4551 common::optional<
4552 std::vector<
4553 std::shared_ptr<types::IReference>
4554 >
4555 >& mutable_supplemental_semantic_ids() override {
4556 return instance_->mutable_supplemental_semantic_ids();
4557 }
4558
4559 void set_supplemental_semantic_ids(
4560 common::optional<
4561 std::vector<
4562 std::shared_ptr<types::IReference>
4563 >
4564 > value
4565 ) override {
4566 instance_->set_supplemental_semantic_ids(value);
4567 }
4568
4569 const common::optional<
4570 std::vector<
4571 std::shared_ptr<types::IQualifier>
4572 >
4573 >& qualifiers() const override {
4574 return instance_->qualifiers();
4575 }
4576
4577 common::optional<
4578 std::vector<
4579 std::shared_ptr<types::IQualifier>
4580 >
4581 >& mutable_qualifiers() override {
4582 return instance_->mutable_qualifiers();
4583 }
4584
4585 void set_qualifiers(
4586 common::optional<
4587 std::vector<
4588 std::shared_ptr<types::IQualifier>
4589 >
4590 > value
4591 ) override {
4592 instance_->set_qualifiers(value);
4593 }
4594
4595 const common::optional<
4596 std::vector<
4597 std::shared_ptr<types::IEmbeddedDataSpecification>
4598 >
4599 >& embedded_data_specifications() const override {
4600 return instance_->embedded_data_specifications();
4601 }
4602
4603 common::optional<
4604 std::vector<
4605 std::shared_ptr<types::IEmbeddedDataSpecification>
4606 >
4607 >& mutable_embedded_data_specifications() override {
4608 return instance_->mutable_embedded_data_specifications();
4609 }
4610
4611 void set_embedded_data_specifications(
4612 common::optional<
4613 std::vector<
4614 std::shared_ptr<types::IEmbeddedDataSpecification>
4615 >
4616 > value
4617 ) override {
4618 instance_->set_embedded_data_specifications(value);
4619 }
4620
4621 const common::optional<std::wstring>& value() const override {
4622 return instance_->value();
4623 }
4624
4625 common::optional<std::wstring>& mutable_value() override {
4626 return instance_->mutable_value();
4627 }
4628
4629 void set_value(
4630 common::optional<std::wstring> value
4631 ) override {
4632 instance_->set_value(value);
4633 }
4634
4635 const std::wstring& content_type() const override {
4636 return instance_->content_type();
4637 }
4638
4639 std::wstring& mutable_content_type() override {
4640 return instance_->mutable_content_type();
4641 }
4642
4643 void set_content_type(
4644 std::wstring value
4645 ) override {
4646 instance_->set_content_type(value);
4647 }
4648
4649 std::wstring CategoryOrDefault() const override {
4650 return instance_->CategoryOrDefault();
4651 }
4652
4653 const std::shared_ptr<E>& enhancement() const {
4654 return enhancement_;
4655 }
4656
4657 std::shared_ptr<E>& mutable_enhancement() {
4658 return enhancement_;
4659 }
4660
4661 void set_enhancement(
4662 std::shared_ptr<E> value
4663 ) {
4664 enhancement_ = std::move(value);
4665 }
4666
4667 EnhancedFile(
4668 std::shared_ptr<types::IFile> instance,
4669 std::shared_ptr<E> enhancement
4670 ) :
4671 instance_(instance),
4672 enhancement_(enhancement) {
4673 // Intentionally empty.
4674 }
4675
4676 virtual ~EnhancedFile() = default;
4677
4678 private:
4679 std::shared_ptr<types::IFile> instance_;
4680 std::shared_ptr<E> enhancement_;
4681};
4682
4683template<class E>
4684class EnhancedAnnotatedRelationshipElement
4685 : virtual public types::IAnnotatedRelationshipElement,
4686 virtual public IEnhanced<E> {
4687 public:
4688 types::ModelType model_type() const override {
4690 }
4691
4692 const common::optional<
4693 std::vector<
4694 std::shared_ptr<types::IExtension>
4695 >
4696 >& extensions() const override {
4697 return instance_->extensions();
4698 }
4699
4700 common::optional<
4701 std::vector<
4702 std::shared_ptr<types::IExtension>
4703 >
4704 >& mutable_extensions() override {
4705 return instance_->mutable_extensions();
4706 }
4707
4708 void set_extensions(
4709 common::optional<
4710 std::vector<
4711 std::shared_ptr<types::IExtension>
4712 >
4713 > value
4714 ) override {
4715 instance_->set_extensions(value);
4716 }
4717
4718 const common::optional<std::wstring>& category() const override {
4719 return instance_->category();
4720 }
4721
4722 common::optional<std::wstring>& mutable_category() override {
4723 return instance_->mutable_category();
4724 }
4725
4726 void set_category(
4727 common::optional<std::wstring> value
4728 ) override {
4729 instance_->set_category(value);
4730 }
4731
4732 const common::optional<std::wstring>& id_short() const override {
4733 return instance_->id_short();
4734 }
4735
4736 common::optional<std::wstring>& mutable_id_short() override {
4737 return instance_->mutable_id_short();
4738 }
4739
4740 void set_id_short(
4741 common::optional<std::wstring> value
4742 ) override {
4743 instance_->set_id_short(value);
4744 }
4745
4746 const common::optional<
4747 std::vector<
4748 std::shared_ptr<types::ILangStringNameType>
4749 >
4750 >& display_name() const override {
4751 return instance_->display_name();
4752 }
4753
4754 common::optional<
4755 std::vector<
4756 std::shared_ptr<types::ILangStringNameType>
4757 >
4758 >& mutable_display_name() override {
4759 return instance_->mutable_display_name();
4760 }
4761
4762 void set_display_name(
4763 common::optional<
4764 std::vector<
4765 std::shared_ptr<types::ILangStringNameType>
4766 >
4767 > value
4768 ) override {
4769 instance_->set_display_name(value);
4770 }
4771
4772 const common::optional<
4773 std::vector<
4774 std::shared_ptr<types::ILangStringTextType>
4775 >
4776 >& description() const override {
4777 return instance_->description();
4778 }
4779
4780 common::optional<
4781 std::vector<
4782 std::shared_ptr<types::ILangStringTextType>
4783 >
4784 >& mutable_description() override {
4785 return instance_->mutable_description();
4786 }
4787
4788 void set_description(
4789 common::optional<
4790 std::vector<
4791 std::shared_ptr<types::ILangStringTextType>
4792 >
4793 > value
4794 ) override {
4795 instance_->set_description(value);
4796 }
4797
4798 const common::optional<
4799 std::shared_ptr<types::IReference>
4800 >& semantic_id() const override {
4801 return instance_->semantic_id();
4802 }
4803
4804 common::optional<
4805 std::shared_ptr<types::IReference>
4806 >& mutable_semantic_id() override {
4807 return instance_->mutable_semantic_id();
4808 }
4809
4810 void set_semantic_id(
4811 common::optional<
4812 std::shared_ptr<types::IReference>
4813 > value
4814 ) override {
4815 instance_->set_semantic_id(value);
4816 }
4817
4818 const common::optional<
4819 std::vector<
4820 std::shared_ptr<types::IReference>
4821 >
4822 >& supplemental_semantic_ids() const override {
4823 return instance_->supplemental_semantic_ids();
4824 }
4825
4826 common::optional<
4827 std::vector<
4828 std::shared_ptr<types::IReference>
4829 >
4830 >& mutable_supplemental_semantic_ids() override {
4831 return instance_->mutable_supplemental_semantic_ids();
4832 }
4833
4834 void set_supplemental_semantic_ids(
4835 common::optional<
4836 std::vector<
4837 std::shared_ptr<types::IReference>
4838 >
4839 > value
4840 ) override {
4841 instance_->set_supplemental_semantic_ids(value);
4842 }
4843
4844 const common::optional<
4845 std::vector<
4846 std::shared_ptr<types::IQualifier>
4847 >
4848 >& qualifiers() const override {
4849 return instance_->qualifiers();
4850 }
4851
4852 common::optional<
4853 std::vector<
4854 std::shared_ptr<types::IQualifier>
4855 >
4856 >& mutable_qualifiers() override {
4857 return instance_->mutable_qualifiers();
4858 }
4859
4860 void set_qualifiers(
4861 common::optional<
4862 std::vector<
4863 std::shared_ptr<types::IQualifier>
4864 >
4865 > value
4866 ) override {
4867 instance_->set_qualifiers(value);
4868 }
4869
4870 const common::optional<
4871 std::vector<
4872 std::shared_ptr<types::IEmbeddedDataSpecification>
4873 >
4874 >& embedded_data_specifications() const override {
4875 return instance_->embedded_data_specifications();
4876 }
4877
4878 common::optional<
4879 std::vector<
4880 std::shared_ptr<types::IEmbeddedDataSpecification>
4881 >
4882 >& mutable_embedded_data_specifications() override {
4883 return instance_->mutable_embedded_data_specifications();
4884 }
4885
4886 void set_embedded_data_specifications(
4887 common::optional<
4888 std::vector<
4889 std::shared_ptr<types::IEmbeddedDataSpecification>
4890 >
4891 > value
4892 ) override {
4893 instance_->set_embedded_data_specifications(value);
4894 }
4895
4896 const std::shared_ptr<types::IReference>& first() const override {
4897 return instance_->first();
4898 }
4899
4900 std::shared_ptr<types::IReference>& mutable_first() override {
4901 return instance_->mutable_first();
4902 }
4903
4904 void set_first(
4905 std::shared_ptr<types::IReference> value
4906 ) override {
4907 instance_->set_first(value);
4908 }
4909
4910 const std::shared_ptr<types::IReference>& second() const override {
4911 return instance_->second();
4912 }
4913
4914 std::shared_ptr<types::IReference>& mutable_second() override {
4915 return instance_->mutable_second();
4916 }
4917
4918 void set_second(
4919 std::shared_ptr<types::IReference> 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 {
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 types::EntityType entity_type() const override {
5220 return instance_->entity_type();
5221 }
5222
5223 types::EntityType& mutable_entity_type() override {
5224 return instance_->mutable_entity_type();
5225 }
5226
5227 void set_entity_type(
5228 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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 std::shared_ptr<types::IReference>& value_id() const override {
7284 return instance_->value_id();
7285 }
7286
7287 std::shared_ptr<types::IReference>& mutable_value_id() override {
7288 return instance_->mutable_value_id();
7289 }
7290
7291 void set_value_id(
7292 std::shared_ptr<types::IReference> value
7293 ) override {
7294 instance_->set_value_id(value);
7295 }
7296
7297 const std::shared_ptr<E>& enhancement() const {
7298 return enhancement_;
7299 }
7300
7301 std::shared_ptr<E>& mutable_enhancement() {
7302 return enhancement_;
7303 }
7304
7305 void set_enhancement(
7306 std::shared_ptr<E> value
7307 ) {
7308 enhancement_ = std::move(value);
7309 }
7310
7311 EnhancedValueReferencePair(
7312 std::shared_ptr<types::IValueReferencePair> instance,
7313 std::shared_ptr<E> enhancement
7314 ) :
7315 instance_(instance),
7316 enhancement_(enhancement) {
7317 // Intentionally empty.
7318 }
7319
7320 virtual ~EnhancedValueReferencePair() = default;
7321
7322 private:
7323 std::shared_ptr<types::IValueReferencePair> instance_;
7324 std::shared_ptr<E> enhancement_;
7325};
7326
7327template<class E>
7328class EnhancedValueList
7329 : virtual public types::IValueList,
7330 virtual public IEnhanced<E> {
7331 public:
7332 types::ModelType model_type() const override {
7334 }
7335
7336 const std::vector<
7337 std::shared_ptr<types::IValueReferencePair>
7338 >& value_reference_pairs() const override {
7339 return instance_->value_reference_pairs();
7340 }
7341
7342 std::vector<
7343 std::shared_ptr<types::IValueReferencePair>
7344 >& mutable_value_reference_pairs() override {
7345 return instance_->mutable_value_reference_pairs();
7346 }
7347
7348 void set_value_reference_pairs(
7349 std::vector<
7350 std::shared_ptr<types::IValueReferencePair>
7351 > value
7352 ) override {
7353 instance_->set_value_reference_pairs(value);
7354 }
7355
7356 const std::shared_ptr<E>& enhancement() const {
7357 return enhancement_;
7358 }
7359
7360 std::shared_ptr<E>& mutable_enhancement() {
7361 return enhancement_;
7362 }
7363
7364 void set_enhancement(
7365 std::shared_ptr<E> value
7366 ) {
7367 enhancement_ = std::move(value);
7368 }
7369
7370 EnhancedValueList(
7371 std::shared_ptr<types::IValueList> instance,
7372 std::shared_ptr<E> enhancement
7373 ) :
7374 instance_(instance),
7375 enhancement_(enhancement) {
7376 // Intentionally empty.
7377 }
7378
7379 virtual ~EnhancedValueList() = default;
7380
7381 private:
7382 std::shared_ptr<types::IValueList> instance_;
7383 std::shared_ptr<E> enhancement_;
7384};
7385
7386template<class E>
7387class EnhancedLangStringPreferredNameTypeIec61360
7389 virtual public IEnhanced<E> {
7390 public:
7391 types::ModelType model_type() const override {
7393 }
7394
7395 const std::wstring& language() const override {
7396 return instance_->language();
7397 }
7398
7399 std::wstring& mutable_language() override {
7400 return instance_->mutable_language();
7401 }
7402
7403 void set_language(
7404 std::wstring value
7405 ) override {
7406 instance_->set_language(value);
7407 }
7408
7409 const std::wstring& text() const override {
7410 return instance_->text();
7411 }
7412
7413 std::wstring& mutable_text() override {
7414 return instance_->mutable_text();
7415 }
7416
7417 void set_text(
7418 std::wstring value
7419 ) override {
7420 instance_->set_text(value);
7421 }
7422
7423 const std::shared_ptr<E>& enhancement() const {
7424 return enhancement_;
7425 }
7426
7427 std::shared_ptr<E>& mutable_enhancement() {
7428 return enhancement_;
7429 }
7430
7431 void set_enhancement(
7432 std::shared_ptr<E> value
7433 ) {
7434 enhancement_ = std::move(value);
7435 }
7436
7437 EnhancedLangStringPreferredNameTypeIec61360(
7438 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> instance,
7439 std::shared_ptr<E> enhancement
7440 ) :
7441 instance_(instance),
7442 enhancement_(enhancement) {
7443 // Intentionally empty.
7444 }
7445
7446 virtual ~EnhancedLangStringPreferredNameTypeIec61360() = default;
7447
7448 private:
7449 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> instance_;
7450 std::shared_ptr<E> enhancement_;
7451};
7452
7453template<class E>
7454class EnhancedLangStringShortNameTypeIec61360
7456 virtual public IEnhanced<E> {
7457 public:
7458 types::ModelType model_type() const override {
7460 }
7461
7462 const std::wstring& language() const override {
7463 return instance_->language();
7464 }
7465
7466 std::wstring& mutable_language() override {
7467 return instance_->mutable_language();
7468 }
7469
7470 void set_language(
7471 std::wstring value
7472 ) override {
7473 instance_->set_language(value);
7474 }
7475
7476 const std::wstring& text() const override {
7477 return instance_->text();
7478 }
7479
7480 std::wstring& mutable_text() override {
7481 return instance_->mutable_text();
7482 }
7483
7484 void set_text(
7485 std::wstring value
7486 ) override {
7487 instance_->set_text(value);
7488 }
7489
7490 const std::shared_ptr<E>& enhancement() const {
7491 return enhancement_;
7492 }
7493
7494 std::shared_ptr<E>& mutable_enhancement() {
7495 return enhancement_;
7496 }
7497
7498 void set_enhancement(
7499 std::shared_ptr<E> value
7500 ) {
7501 enhancement_ = std::move(value);
7502 }
7503
7504 EnhancedLangStringShortNameTypeIec61360(
7505 std::shared_ptr<types::ILangStringShortNameTypeIec61360> instance,
7506 std::shared_ptr<E> enhancement
7507 ) :
7508 instance_(instance),
7509 enhancement_(enhancement) {
7510 // Intentionally empty.
7511 }
7512
7513 virtual ~EnhancedLangStringShortNameTypeIec61360() = default;
7514
7515 private:
7516 std::shared_ptr<types::ILangStringShortNameTypeIec61360> instance_;
7517 std::shared_ptr<E> enhancement_;
7518};
7519
7520template<class E>
7521class EnhancedLangStringDefinitionTypeIec61360
7523 virtual public IEnhanced<E> {
7524 public:
7525 types::ModelType model_type() const override {
7527 }
7528
7529 const std::wstring& language() const override {
7530 return instance_->language();
7531 }
7532
7533 std::wstring& mutable_language() override {
7534 return instance_->mutable_language();
7535 }
7536
7537 void set_language(
7538 std::wstring value
7539 ) override {
7540 instance_->set_language(value);
7541 }
7542
7543 const std::wstring& text() const override {
7544 return instance_->text();
7545 }
7546
7547 std::wstring& mutable_text() override {
7548 return instance_->mutable_text();
7549 }
7550
7551 void set_text(
7552 std::wstring value
7553 ) override {
7554 instance_->set_text(value);
7555 }
7556
7557 const std::shared_ptr<E>& enhancement() const {
7558 return enhancement_;
7559 }
7560
7561 std::shared_ptr<E>& mutable_enhancement() {
7562 return enhancement_;
7563 }
7564
7565 void set_enhancement(
7566 std::shared_ptr<E> value
7567 ) {
7568 enhancement_ = std::move(value);
7569 }
7570
7571 EnhancedLangStringDefinitionTypeIec61360(
7572 std::shared_ptr<types::ILangStringDefinitionTypeIec61360> instance,
7573 std::shared_ptr<E> enhancement
7574 ) :
7575 instance_(instance),
7576 enhancement_(enhancement) {
7577 // Intentionally empty.
7578 }
7579
7580 virtual ~EnhancedLangStringDefinitionTypeIec61360() = default;
7581
7582 private:
7583 std::shared_ptr<types::ILangStringDefinitionTypeIec61360> instance_;
7584 std::shared_ptr<E> enhancement_;
7585};
7586
7587template<class E>
7588class EnhancedDataSpecificationIec61360
7589 : virtual public types::IDataSpecificationIec61360,
7590 virtual public IEnhanced<E> {
7591 public:
7592 types::ModelType model_type() const override {
7594 }
7595
7596 const std::vector<
7597 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7598 >& preferred_name() const override {
7599 return instance_->preferred_name();
7600 }
7601
7602 std::vector<
7603 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7604 >& mutable_preferred_name() override {
7605 return instance_->mutable_preferred_name();
7606 }
7607
7608 void set_preferred_name(
7609 std::vector<
7610 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
7611 > value
7612 ) override {
7613 instance_->set_preferred_name(value);
7614 }
7615
7616 const common::optional<
7617 std::vector<
7618 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7619 >
7620 >& short_name() const override {
7621 return instance_->short_name();
7622 }
7623
7624 common::optional<
7625 std::vector<
7626 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7627 >
7628 >& mutable_short_name() override {
7629 return instance_->mutable_short_name();
7630 }
7631
7632 void set_short_name(
7633 common::optional<
7634 std::vector<
7635 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
7636 >
7637 > value
7638 ) override {
7639 instance_->set_short_name(value);
7640 }
7641
7642 const common::optional<std::wstring>& unit() const override {
7643 return instance_->unit();
7644 }
7645
7646 common::optional<std::wstring>& mutable_unit() override {
7647 return instance_->mutable_unit();
7648 }
7649
7650 void set_unit(
7651 common::optional<std::wstring> value
7652 ) override {
7653 instance_->set_unit(value);
7654 }
7655
7656 const common::optional<
7657 std::shared_ptr<types::IReference>
7658 >& unit_id() const override {
7659 return instance_->unit_id();
7660 }
7661
7662 common::optional<
7663 std::shared_ptr<types::IReference>
7664 >& mutable_unit_id() override {
7665 return instance_->mutable_unit_id();
7666 }
7667
7668 void set_unit_id(
7669 common::optional<
7670 std::shared_ptr<types::IReference>
7671 > value
7672 ) override {
7673 instance_->set_unit_id(value);
7674 }
7675
7676 const common::optional<std::wstring>& source_of_definition() const override {
7677 return instance_->source_of_definition();
7678 }
7679
7680 common::optional<std::wstring>& mutable_source_of_definition() override {
7681 return instance_->mutable_source_of_definition();
7682 }
7683
7684 void set_source_of_definition(
7685 common::optional<std::wstring> value
7686 ) override {
7687 instance_->set_source_of_definition(value);
7688 }
7689
7690 const common::optional<std::wstring>& symbol() const override {
7691 return instance_->symbol();
7692 }
7693
7694 common::optional<std::wstring>& mutable_symbol() override {
7695 return instance_->mutable_symbol();
7696 }
7697
7698 void set_symbol(
7699 common::optional<std::wstring> value
7700 ) override {
7701 instance_->set_symbol(value);
7702 }
7703
7704 const common::optional<types::DataTypeIec61360>& data_type() const override {
7705 return instance_->data_type();
7706 }
7707
7708 common::optional<types::DataTypeIec61360>& mutable_data_type() override {
7709 return instance_->mutable_data_type();
7710 }
7711
7712 void set_data_type(
7713 common::optional<types::DataTypeIec61360> value
7714 ) override {
7715 instance_->set_data_type(value);
7716 }
7717
7718 const common::optional<
7719 std::vector<
7720 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7721 >
7722 >& definition() const override {
7723 return instance_->definition();
7724 }
7725
7726 common::optional<
7727 std::vector<
7728 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7729 >
7730 >& mutable_definition() override {
7731 return instance_->mutable_definition();
7732 }
7733
7734 void set_definition(
7735 common::optional<
7736 std::vector<
7737 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
7738 >
7739 > value
7740 ) override {
7741 instance_->set_definition(value);
7742 }
7743
7744 const common::optional<std::wstring>& value_format() const override {
7745 return instance_->value_format();
7746 }
7747
7748 common::optional<std::wstring>& mutable_value_format() override {
7749 return instance_->mutable_value_format();
7750 }
7751
7752 void set_value_format(
7753 common::optional<std::wstring> value
7754 ) override {
7755 instance_->set_value_format(value);
7756 }
7757
7758 const common::optional<
7759 std::shared_ptr<types::IValueList>
7760 >& value_list() const override {
7761 return instance_->value_list();
7762 }
7763
7764 common::optional<
7765 std::shared_ptr<types::IValueList>
7766 >& mutable_value_list() override {
7767 return instance_->mutable_value_list();
7768 }
7769
7770 void set_value_list(
7771 common::optional<
7772 std::shared_ptr<types::IValueList>
7773 > value
7774 ) override {
7775 instance_->set_value_list(value);
7776 }
7777
7778 const common::optional<std::wstring>& value() const override {
7779 return instance_->value();
7780 }
7781
7782 common::optional<std::wstring>& mutable_value() override {
7783 return instance_->mutable_value();
7784 }
7785
7786 void set_value(
7787 common::optional<std::wstring> value
7788 ) override {
7789 instance_->set_value(value);
7790 }
7791
7792 const common::optional<
7793 std::shared_ptr<types::ILevelType>
7794 >& level_type() const override {
7795 return instance_->level_type();
7796 }
7797
7798 common::optional<
7799 std::shared_ptr<types::ILevelType>
7800 >& mutable_level_type() override {
7801 return instance_->mutable_level_type();
7802 }
7803
7804 void set_level_type(
7805 common::optional<
7806 std::shared_ptr<types::ILevelType>
7807 > value
7808 ) override {
7809 instance_->set_level_type(value);
7810 }
7811
7812 const std::shared_ptr<E>& enhancement() const {
7813 return enhancement_;
7814 }
7815
7816 std::shared_ptr<E>& mutable_enhancement() {
7817 return enhancement_;
7818 }
7819
7820 void set_enhancement(
7821 std::shared_ptr<E> value
7822 ) {
7823 enhancement_ = std::move(value);
7824 }
7825
7826 EnhancedDataSpecificationIec61360(
7827 std::shared_ptr<types::IDataSpecificationIec61360> instance,
7828 std::shared_ptr<E> enhancement
7829 ) :
7830 instance_(instance),
7831 enhancement_(enhancement) {
7832 // Intentionally empty.
7833 }
7834
7835 virtual ~EnhancedDataSpecificationIec61360() = default;
7836
7837 private:
7838 std::shared_ptr<types::IDataSpecificationIec61360> instance_;
7839 std::shared_ptr<E> enhancement_;
7840};
7841
7851template<typename E>
7852std::shared_ptr<types::IExtension> WrapExtension(
7853 const std::shared_ptr<types::IExtension>& that,
7854 const std::function<
7855 std::shared_ptr<E>(
7856 const std::shared_ptr<types::IClass>&
7857 )
7858 >& factory
7859) {
7860 // We assume that we already checked whether `that` has been enhanced
7861 // in the caller.
7862
7863 if (that->semantic_id().has_value()) {
7864 const std::shared_ptr<types::IReference>& value(
7865 that->semantic_id().value()
7866 );
7867
7868 std::shared_ptr<
7870 > wrapped(
7871 Wrap<E>(
7872 value,
7873 factory
7874 )
7875 );
7876
7877 that->set_semantic_id(
7878 common::make_optional(
7879 std::move(wrapped)
7880 )
7881 );
7882 }
7883
7884 if (that->supplemental_semantic_ids().has_value()) {
7885 const std::vector<
7886 std::shared_ptr<types::IReference>
7887 >& value(
7888 that->supplemental_semantic_ids().value()
7889 );
7890 const std::size_t size = value.size();
7891
7892 std::vector<
7893 std::shared_ptr<types::IReference>
7894 > wrapped;
7895 wrapped.reserve(size);
7896
7897 for (
7898 const std::shared_ptr<types::IReference>& item
7899 : value
7900 ) {
7901 wrapped.emplace_back(
7902 Wrap<E>(
7903 item,
7904 factory
7905 )
7906 );
7907 }
7908
7909 that->set_supplemental_semantic_ids(
7910 common::make_optional(
7911 std::move(wrapped)
7912 )
7913 );
7914 }
7915
7916 if (that->refers_to().has_value()) {
7917 const std::vector<
7918 std::shared_ptr<types::IReference>
7919 >& value(
7920 that->refers_to().value()
7921 );
7922 const std::size_t size = value.size();
7923
7924 std::vector<
7925 std::shared_ptr<types::IReference>
7926 > wrapped;
7927 wrapped.reserve(size);
7928
7929 for (
7930 const std::shared_ptr<types::IReference>& item
7931 : value
7932 ) {
7933 wrapped.emplace_back(
7934 Wrap<E>(
7935 item,
7936 factory
7937 )
7938 );
7939 }
7940
7941 that->set_refers_to(
7942 common::make_optional(
7943 std::move(wrapped)
7944 )
7945 );
7946 }
7947
7948 std::shared_ptr<E> enh(
7949 factory(that)
7950 );
7951 return (enh == nullptr)
7952 ? that
7953 : std::shared_ptr<types::IExtension>(
7954 new EnhancedExtension<E>(
7955 that,
7956 enh
7957 )
7958 );
7959}
7960
7970template<typename E>
7971std::shared_ptr<types::IAdministrativeInformation> WrapAdministrativeInformation(
7972 const std::shared_ptr<types::IAdministrativeInformation>& that,
7973 const std::function<
7974 std::shared_ptr<E>(
7975 const std::shared_ptr<types::IClass>&
7976 )
7977 >& factory
7978) {
7979 // We assume that we already checked whether `that` has been enhanced
7980 // in the caller.
7981
7982 if (that->embedded_data_specifications().has_value()) {
7983 const std::vector<
7984 std::shared_ptr<types::IEmbeddedDataSpecification>
7985 >& value(
7986 that->embedded_data_specifications().value()
7987 );
7988 const std::size_t size = value.size();
7989
7990 std::vector<
7991 std::shared_ptr<types::IEmbeddedDataSpecification>
7992 > wrapped;
7993 wrapped.reserve(size);
7994
7995 for (
7996 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
7997 : value
7998 ) {
7999 wrapped.emplace_back(
8000 Wrap<E>(
8001 item,
8002 factory
8003 )
8004 );
8005 }
8006
8007 that->set_embedded_data_specifications(
8008 common::make_optional(
8009 std::move(wrapped)
8010 )
8011 );
8012 }
8013
8014 if (that->creator().has_value()) {
8015 const std::shared_ptr<types::IReference>& value(
8016 that->creator().value()
8017 );
8018
8019 std::shared_ptr<
8021 > wrapped(
8022 Wrap<E>(
8023 value,
8024 factory
8025 )
8026 );
8027
8028 that->set_creator(
8029 common::make_optional(
8030 std::move(wrapped)
8031 )
8032 );
8033 }
8034
8035 std::shared_ptr<E> enh(
8036 factory(that)
8037 );
8038 return (enh == nullptr)
8039 ? that
8040 : std::shared_ptr<types::IAdministrativeInformation>(
8041 new EnhancedAdministrativeInformation<E>(
8042 that,
8043 enh
8044 )
8045 );
8046}
8047
8057template<typename E>
8058std::shared_ptr<types::IQualifier> WrapQualifier(
8059 const std::shared_ptr<types::IQualifier>& that,
8060 const std::function<
8061 std::shared_ptr<E>(
8062 const std::shared_ptr<types::IClass>&
8063 )
8064 >& factory
8065) {
8066 // We assume that we already checked whether `that` has been enhanced
8067 // in the caller.
8068
8069 if (that->semantic_id().has_value()) {
8070 const std::shared_ptr<types::IReference>& value(
8071 that->semantic_id().value()
8072 );
8073
8074 std::shared_ptr<
8076 > wrapped(
8077 Wrap<E>(
8078 value,
8079 factory
8080 )
8081 );
8082
8083 that->set_semantic_id(
8084 common::make_optional(
8085 std::move(wrapped)
8086 )
8087 );
8088 }
8089
8090 if (that->supplemental_semantic_ids().has_value()) {
8091 const std::vector<
8092 std::shared_ptr<types::IReference>
8093 >& value(
8094 that->supplemental_semantic_ids().value()
8095 );
8096 const std::size_t size = value.size();
8097
8098 std::vector<
8099 std::shared_ptr<types::IReference>
8100 > wrapped;
8101 wrapped.reserve(size);
8102
8103 for (
8104 const std::shared_ptr<types::IReference>& item
8105 : value
8106 ) {
8107 wrapped.emplace_back(
8108 Wrap<E>(
8109 item,
8110 factory
8111 )
8112 );
8113 }
8114
8115 that->set_supplemental_semantic_ids(
8116 common::make_optional(
8117 std::move(wrapped)
8118 )
8119 );
8120 }
8121
8122 if (that->value_id().has_value()) {
8123 const std::shared_ptr<types::IReference>& value(
8124 that->value_id().value()
8125 );
8126
8127 std::shared_ptr<
8129 > wrapped(
8130 Wrap<E>(
8131 value,
8132 factory
8133 )
8134 );
8135
8136 that->set_value_id(
8137 common::make_optional(
8138 std::move(wrapped)
8139 )
8140 );
8141 }
8142
8143 std::shared_ptr<E> enh(
8144 factory(that)
8145 );
8146 return (enh == nullptr)
8147 ? that
8148 : std::shared_ptr<types::IQualifier>(
8149 new EnhancedQualifier<E>(
8150 that,
8151 enh
8152 )
8153 );
8154}
8155
8165template<typename E>
8166std::shared_ptr<types::IAssetAdministrationShell> WrapAssetAdministrationShell(
8167 const std::shared_ptr<types::IAssetAdministrationShell>& that,
8168 const std::function<
8169 std::shared_ptr<E>(
8170 const std::shared_ptr<types::IClass>&
8171 )
8172 >& factory
8173) {
8174 // We assume that we already checked whether `that` has been enhanced
8175 // in the caller.
8176
8177 if (that->extensions().has_value()) {
8178 const std::vector<
8179 std::shared_ptr<types::IExtension>
8180 >& value(
8181 that->extensions().value()
8182 );
8183 const std::size_t size = value.size();
8184
8185 std::vector<
8186 std::shared_ptr<types::IExtension>
8187 > wrapped;
8188 wrapped.reserve(size);
8189
8190 for (
8191 const std::shared_ptr<types::IExtension>& item
8192 : value
8193 ) {
8194 wrapped.emplace_back(
8195 Wrap<E>(
8196 item,
8197 factory
8198 )
8199 );
8200 }
8201
8202 that->set_extensions(
8203 common::make_optional(
8204 std::move(wrapped)
8205 )
8206 );
8207 }
8208
8209 if (that->display_name().has_value()) {
8210 const std::vector<
8211 std::shared_ptr<types::ILangStringNameType>
8212 >& value(
8213 that->display_name().value()
8214 );
8215 const std::size_t size = value.size();
8216
8217 std::vector<
8218 std::shared_ptr<types::ILangStringNameType>
8219 > wrapped;
8220 wrapped.reserve(size);
8221
8222 for (
8223 const std::shared_ptr<types::ILangStringNameType>& item
8224 : value
8225 ) {
8226 wrapped.emplace_back(
8227 Wrap<E>(
8228 item,
8229 factory
8230 )
8231 );
8232 }
8233
8234 that->set_display_name(
8235 common::make_optional(
8236 std::move(wrapped)
8237 )
8238 );
8239 }
8240
8241 if (that->description().has_value()) {
8242 const std::vector<
8243 std::shared_ptr<types::ILangStringTextType>
8244 >& value(
8245 that->description().value()
8246 );
8247 const std::size_t size = value.size();
8248
8249 std::vector<
8250 std::shared_ptr<types::ILangStringTextType>
8251 > wrapped;
8252 wrapped.reserve(size);
8253
8254 for (
8255 const std::shared_ptr<types::ILangStringTextType>& item
8256 : value
8257 ) {
8258 wrapped.emplace_back(
8259 Wrap<E>(
8260 item,
8261 factory
8262 )
8263 );
8264 }
8265
8266 that->set_description(
8267 common::make_optional(
8268 std::move(wrapped)
8269 )
8270 );
8271 }
8272
8273 if (that->administration().has_value()) {
8274 const std::shared_ptr<types::IAdministrativeInformation>& value(
8275 that->administration().value()
8276 );
8277
8278 std::shared_ptr<
8280 > wrapped(
8281 Wrap<E>(
8282 value,
8283 factory
8284 )
8285 );
8286
8287 that->set_administration(
8288 common::make_optional(
8289 std::move(wrapped)
8290 )
8291 );
8292 }
8293
8294 if (that->embedded_data_specifications().has_value()) {
8295 const std::vector<
8296 std::shared_ptr<types::IEmbeddedDataSpecification>
8297 >& value(
8298 that->embedded_data_specifications().value()
8299 );
8300 const std::size_t size = value.size();
8301
8302 std::vector<
8303 std::shared_ptr<types::IEmbeddedDataSpecification>
8304 > wrapped;
8305 wrapped.reserve(size);
8306
8307 for (
8308 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
8309 : value
8310 ) {
8311 wrapped.emplace_back(
8312 Wrap<E>(
8313 item,
8314 factory
8315 )
8316 );
8317 }
8318
8319 that->set_embedded_data_specifications(
8320 common::make_optional(
8321 std::move(wrapped)
8322 )
8323 );
8324 }
8325
8326 if (that->derived_from().has_value()) {
8327 const std::shared_ptr<types::IReference>& value(
8328 that->derived_from().value()
8329 );
8330
8331 std::shared_ptr<
8333 > wrapped(
8334 Wrap<E>(
8335 value,
8336 factory
8337 )
8338 );
8339
8340 that->set_derived_from(
8341 common::make_optional(
8342 std::move(wrapped)
8343 )
8344 );
8345 }
8346
8347 that->set_asset_information(
8348 Wrap<E>(
8349 that->asset_information(),
8350 factory
8351 )
8352 );
8353
8354 if (that->submodels().has_value()) {
8355 const std::vector<
8356 std::shared_ptr<types::IReference>
8357 >& value(
8358 that->submodels().value()
8359 );
8360 const std::size_t size = value.size();
8361
8362 std::vector<
8363 std::shared_ptr<types::IReference>
8364 > wrapped;
8365 wrapped.reserve(size);
8366
8367 for (
8368 const std::shared_ptr<types::IReference>& item
8369 : value
8370 ) {
8371 wrapped.emplace_back(
8372 Wrap<E>(
8373 item,
8374 factory
8375 )
8376 );
8377 }
8378
8379 that->set_submodels(
8380 common::make_optional(
8381 std::move(wrapped)
8382 )
8383 );
8384 }
8385
8386 std::shared_ptr<E> enh(
8387 factory(that)
8388 );
8389 return (enh == nullptr)
8390 ? that
8391 : std::shared_ptr<types::IAssetAdministrationShell>(
8392 new EnhancedAssetAdministrationShell<E>(
8393 that,
8394 enh
8395 )
8396 );
8397}
8398
8408template<typename E>
8409std::shared_ptr<types::IAssetInformation> WrapAssetInformation(
8410 const std::shared_ptr<types::IAssetInformation>& that,
8411 const std::function<
8412 std::shared_ptr<E>(
8413 const std::shared_ptr<types::IClass>&
8414 )
8415 >& factory
8416) {
8417 // We assume that we already checked whether `that` has been enhanced
8418 // in the caller.
8419
8420 if (that->specific_asset_ids().has_value()) {
8421 const std::vector<
8422 std::shared_ptr<types::ISpecificAssetId>
8423 >& value(
8424 that->specific_asset_ids().value()
8425 );
8426 const std::size_t size = value.size();
8427
8428 std::vector<
8429 std::shared_ptr<types::ISpecificAssetId>
8430 > wrapped;
8431 wrapped.reserve(size);
8432
8433 for (
8434 const std::shared_ptr<types::ISpecificAssetId>& item
8435 : value
8436 ) {
8437 wrapped.emplace_back(
8438 Wrap<E>(
8439 item,
8440 factory
8441 )
8442 );
8443 }
8444
8445 that->set_specific_asset_ids(
8446 common::make_optional(
8447 std::move(wrapped)
8448 )
8449 );
8450 }
8451
8452 if (that->default_thumbnail().has_value()) {
8453 const std::shared_ptr<types::IResource>& value(
8454 that->default_thumbnail().value()
8455 );
8456
8457 std::shared_ptr<
8459 > wrapped(
8460 Wrap<E>(
8461 value,
8462 factory
8463 )
8464 );
8465
8466 that->set_default_thumbnail(
8467 common::make_optional(
8468 std::move(wrapped)
8469 )
8470 );
8471 }
8472
8473 std::shared_ptr<E> enh(
8474 factory(that)
8475 );
8476 return (enh == nullptr)
8477 ? that
8478 : std::shared_ptr<types::IAssetInformation>(
8479 new EnhancedAssetInformation<E>(
8480 that,
8481 enh
8482 )
8483 );
8484}
8485
8495template<typename E>
8496std::shared_ptr<types::IResource> WrapResource(
8497 const std::shared_ptr<types::IResource>& that,
8498 const std::function<
8499 std::shared_ptr<E>(
8500 const std::shared_ptr<types::IClass>&
8501 )
8502 >& factory
8503) {
8504 // We assume that we already checked whether `that` has been enhanced
8505 // in the caller.
8506
8507 // No properties to be recursively enhanced.
8508
8509 std::shared_ptr<E> enh(
8510 factory(that)
8511 );
8512 return (enh == nullptr)
8513 ? that
8514 : std::shared_ptr<types::IResource>(
8515 new EnhancedResource<E>(
8516 that,
8517 enh
8518 )
8519 );
8520}
8521
8531template<typename E>
8532std::shared_ptr<types::ISpecificAssetId> WrapSpecificAssetId(
8533 const std::shared_ptr<types::ISpecificAssetId>& that,
8534 const std::function<
8535 std::shared_ptr<E>(
8536 const std::shared_ptr<types::IClass>&
8537 )
8538 >& factory
8539) {
8540 // We assume that we already checked whether `that` has been enhanced
8541 // in the caller.
8542
8543 if (that->semantic_id().has_value()) {
8544 const std::shared_ptr<types::IReference>& value(
8545 that->semantic_id().value()
8546 );
8547
8548 std::shared_ptr<
8550 > wrapped(
8551 Wrap<E>(
8552 value,
8553 factory
8554 )
8555 );
8556
8557 that->set_semantic_id(
8558 common::make_optional(
8559 std::move(wrapped)
8560 )
8561 );
8562 }
8563
8564 if (that->supplemental_semantic_ids().has_value()) {
8565 const std::vector<
8566 std::shared_ptr<types::IReference>
8567 >& value(
8568 that->supplemental_semantic_ids().value()
8569 );
8570 const std::size_t size = value.size();
8571
8572 std::vector<
8573 std::shared_ptr<types::IReference>
8574 > wrapped;
8575 wrapped.reserve(size);
8576
8577 for (
8578 const std::shared_ptr<types::IReference>& item
8579 : value
8580 ) {
8581 wrapped.emplace_back(
8582 Wrap<E>(
8583 item,
8584 factory
8585 )
8586 );
8587 }
8588
8589 that->set_supplemental_semantic_ids(
8590 common::make_optional(
8591 std::move(wrapped)
8592 )
8593 );
8594 }
8595
8596 if (that->external_subject_id().has_value()) {
8597 const std::shared_ptr<types::IReference>& value(
8598 that->external_subject_id().value()
8599 );
8600
8601 std::shared_ptr<
8603 > wrapped(
8604 Wrap<E>(
8605 value,
8606 factory
8607 )
8608 );
8609
8610 that->set_external_subject_id(
8611 common::make_optional(
8612 std::move(wrapped)
8613 )
8614 );
8615 }
8616
8617 std::shared_ptr<E> enh(
8618 factory(that)
8619 );
8620 return (enh == nullptr)
8621 ? that
8622 : std::shared_ptr<types::ISpecificAssetId>(
8623 new EnhancedSpecificAssetId<E>(
8624 that,
8625 enh
8626 )
8627 );
8628}
8629
8639template<typename E>
8640std::shared_ptr<types::ISubmodel> WrapSubmodel(
8641 const std::shared_ptr<types::ISubmodel>& that,
8642 const std::function<
8643 std::shared_ptr<E>(
8644 const std::shared_ptr<types::IClass>&
8645 )
8646 >& factory
8647) {
8648 // We assume that we already checked whether `that` has been enhanced
8649 // in the caller.
8650
8651 if (that->extensions().has_value()) {
8652 const std::vector<
8653 std::shared_ptr<types::IExtension>
8654 >& value(
8655 that->extensions().value()
8656 );
8657 const std::size_t size = value.size();
8658
8659 std::vector<
8660 std::shared_ptr<types::IExtension>
8661 > wrapped;
8662 wrapped.reserve(size);
8663
8664 for (
8665 const std::shared_ptr<types::IExtension>& item
8666 : value
8667 ) {
8668 wrapped.emplace_back(
8669 Wrap<E>(
8670 item,
8671 factory
8672 )
8673 );
8674 }
8675
8676 that->set_extensions(
8677 common::make_optional(
8678 std::move(wrapped)
8679 )
8680 );
8681 }
8682
8683 if (that->display_name().has_value()) {
8684 const std::vector<
8685 std::shared_ptr<types::ILangStringNameType>
8686 >& value(
8687 that->display_name().value()
8688 );
8689 const std::size_t size = value.size();
8690
8691 std::vector<
8692 std::shared_ptr<types::ILangStringNameType>
8693 > wrapped;
8694 wrapped.reserve(size);
8695
8696 for (
8697 const std::shared_ptr<types::ILangStringNameType>& item
8698 : value
8699 ) {
8700 wrapped.emplace_back(
8701 Wrap<E>(
8702 item,
8703 factory
8704 )
8705 );
8706 }
8707
8708 that->set_display_name(
8709 common::make_optional(
8710 std::move(wrapped)
8711 )
8712 );
8713 }
8714
8715 if (that->description().has_value()) {
8716 const std::vector<
8717 std::shared_ptr<types::ILangStringTextType>
8718 >& value(
8719 that->description().value()
8720 );
8721 const std::size_t size = value.size();
8722
8723 std::vector<
8724 std::shared_ptr<types::ILangStringTextType>
8725 > wrapped;
8726 wrapped.reserve(size);
8727
8728 for (
8729 const std::shared_ptr<types::ILangStringTextType>& item
8730 : value
8731 ) {
8732 wrapped.emplace_back(
8733 Wrap<E>(
8734 item,
8735 factory
8736 )
8737 );
8738 }
8739
8740 that->set_description(
8741 common::make_optional(
8742 std::move(wrapped)
8743 )
8744 );
8745 }
8746
8747 if (that->administration().has_value()) {
8748 const std::shared_ptr<types::IAdministrativeInformation>& value(
8749 that->administration().value()
8750 );
8751
8752 std::shared_ptr<
8754 > wrapped(
8755 Wrap<E>(
8756 value,
8757 factory
8758 )
8759 );
8760
8761 that->set_administration(
8762 common::make_optional(
8763 std::move(wrapped)
8764 )
8765 );
8766 }
8767
8768 if (that->semantic_id().has_value()) {
8769 const std::shared_ptr<types::IReference>& value(
8770 that->semantic_id().value()
8771 );
8772
8773 std::shared_ptr<
8775 > wrapped(
8776 Wrap<E>(
8777 value,
8778 factory
8779 )
8780 );
8781
8782 that->set_semantic_id(
8783 common::make_optional(
8784 std::move(wrapped)
8785 )
8786 );
8787 }
8788
8789 if (that->supplemental_semantic_ids().has_value()) {
8790 const std::vector<
8791 std::shared_ptr<types::IReference>
8792 >& value(
8793 that->supplemental_semantic_ids().value()
8794 );
8795 const std::size_t size = value.size();
8796
8797 std::vector<
8798 std::shared_ptr<types::IReference>
8799 > wrapped;
8800 wrapped.reserve(size);
8801
8802 for (
8803 const std::shared_ptr<types::IReference>& item
8804 : value
8805 ) {
8806 wrapped.emplace_back(
8807 Wrap<E>(
8808 item,
8809 factory
8810 )
8811 );
8812 }
8813
8814 that->set_supplemental_semantic_ids(
8815 common::make_optional(
8816 std::move(wrapped)
8817 )
8818 );
8819 }
8820
8821 if (that->qualifiers().has_value()) {
8822 const std::vector<
8823 std::shared_ptr<types::IQualifier>
8824 >& value(
8825 that->qualifiers().value()
8826 );
8827 const std::size_t size = value.size();
8828
8829 std::vector<
8830 std::shared_ptr<types::IQualifier>
8831 > wrapped;
8832 wrapped.reserve(size);
8833
8834 for (
8835 const std::shared_ptr<types::IQualifier>& item
8836 : value
8837 ) {
8838 wrapped.emplace_back(
8839 Wrap<E>(
8840 item,
8841 factory
8842 )
8843 );
8844 }
8845
8846 that->set_qualifiers(
8847 common::make_optional(
8848 std::move(wrapped)
8849 )
8850 );
8851 }
8852
8853 if (that->embedded_data_specifications().has_value()) {
8854 const std::vector<
8855 std::shared_ptr<types::IEmbeddedDataSpecification>
8856 >& value(
8857 that->embedded_data_specifications().value()
8858 );
8859 const std::size_t size = value.size();
8860
8861 std::vector<
8862 std::shared_ptr<types::IEmbeddedDataSpecification>
8863 > wrapped;
8864 wrapped.reserve(size);
8865
8866 for (
8867 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
8868 : value
8869 ) {
8870 wrapped.emplace_back(
8871 Wrap<E>(
8872 item,
8873 factory
8874 )
8875 );
8876 }
8877
8878 that->set_embedded_data_specifications(
8879 common::make_optional(
8880 std::move(wrapped)
8881 )
8882 );
8883 }
8884
8885 if (that->submodel_elements().has_value()) {
8886 const std::vector<
8887 std::shared_ptr<types::ISubmodelElement>
8888 >& value(
8889 that->submodel_elements().value()
8890 );
8891 const std::size_t size = value.size();
8892
8893 std::vector<
8894 std::shared_ptr<types::ISubmodelElement>
8895 > wrapped;
8896 wrapped.reserve(size);
8897
8898 for (
8899 const std::shared_ptr<types::ISubmodelElement>& item
8900 : value
8901 ) {
8902 wrapped.emplace_back(
8903 Wrap<E>(
8904 item,
8905 factory
8906 )
8907 );
8908 }
8909
8910 that->set_submodel_elements(
8911 common::make_optional(
8912 std::move(wrapped)
8913 )
8914 );
8915 }
8916
8917 std::shared_ptr<E> enh(
8918 factory(that)
8919 );
8920 return (enh == nullptr)
8921 ? that
8922 : std::shared_ptr<types::ISubmodel>(
8923 new EnhancedSubmodel<E>(
8924 that,
8925 enh
8926 )
8927 );
8928}
8929
8939template<typename E>
8940std::shared_ptr<types::IRelationshipElement> WrapRelationshipElement(
8941 const std::shared_ptr<types::IRelationshipElement>& that,
8942 const std::function<
8943 std::shared_ptr<E>(
8944 const std::shared_ptr<types::IClass>&
8945 )
8946 >& factory
8947) {
8948 // We assume that we already checked whether `that` has been enhanced
8949 // in the caller.
8950
8951 if (that->extensions().has_value()) {
8952 const std::vector<
8953 std::shared_ptr<types::IExtension>
8954 >& value(
8955 that->extensions().value()
8956 );
8957 const std::size_t size = value.size();
8958
8959 std::vector<
8960 std::shared_ptr<types::IExtension>
8961 > wrapped;
8962 wrapped.reserve(size);
8963
8964 for (
8965 const std::shared_ptr<types::IExtension>& item
8966 : value
8967 ) {
8968 wrapped.emplace_back(
8969 Wrap<E>(
8970 item,
8971 factory
8972 )
8973 );
8974 }
8975
8976 that->set_extensions(
8977 common::make_optional(
8978 std::move(wrapped)
8979 )
8980 );
8981 }
8982
8983 if (that->display_name().has_value()) {
8984 const std::vector<
8985 std::shared_ptr<types::ILangStringNameType>
8986 >& value(
8987 that->display_name().value()
8988 );
8989 const std::size_t size = value.size();
8990
8991 std::vector<
8992 std::shared_ptr<types::ILangStringNameType>
8993 > wrapped;
8994 wrapped.reserve(size);
8995
8996 for (
8997 const std::shared_ptr<types::ILangStringNameType>& item
8998 : value
8999 ) {
9000 wrapped.emplace_back(
9001 Wrap<E>(
9002 item,
9003 factory
9004 )
9005 );
9006 }
9007
9008 that->set_display_name(
9009 common::make_optional(
9010 std::move(wrapped)
9011 )
9012 );
9013 }
9014
9015 if (that->description().has_value()) {
9016 const std::vector<
9017 std::shared_ptr<types::ILangStringTextType>
9018 >& value(
9019 that->description().value()
9020 );
9021 const std::size_t size = value.size();
9022
9023 std::vector<
9024 std::shared_ptr<types::ILangStringTextType>
9025 > wrapped;
9026 wrapped.reserve(size);
9027
9028 for (
9029 const std::shared_ptr<types::ILangStringTextType>& item
9030 : value
9031 ) {
9032 wrapped.emplace_back(
9033 Wrap<E>(
9034 item,
9035 factory
9036 )
9037 );
9038 }
9039
9040 that->set_description(
9041 common::make_optional(
9042 std::move(wrapped)
9043 )
9044 );
9045 }
9046
9047 if (that->semantic_id().has_value()) {
9048 const std::shared_ptr<types::IReference>& value(
9049 that->semantic_id().value()
9050 );
9051
9052 std::shared_ptr<
9054 > wrapped(
9055 Wrap<E>(
9056 value,
9057 factory
9058 )
9059 );
9060
9061 that->set_semantic_id(
9062 common::make_optional(
9063 std::move(wrapped)
9064 )
9065 );
9066 }
9067
9068 if (that->supplemental_semantic_ids().has_value()) {
9069 const std::vector<
9070 std::shared_ptr<types::IReference>
9071 >& value(
9072 that->supplemental_semantic_ids().value()
9073 );
9074 const std::size_t size = value.size();
9075
9076 std::vector<
9077 std::shared_ptr<types::IReference>
9078 > wrapped;
9079 wrapped.reserve(size);
9080
9081 for (
9082 const std::shared_ptr<types::IReference>& item
9083 : value
9084 ) {
9085 wrapped.emplace_back(
9086 Wrap<E>(
9087 item,
9088 factory
9089 )
9090 );
9091 }
9092
9093 that->set_supplemental_semantic_ids(
9094 common::make_optional(
9095 std::move(wrapped)
9096 )
9097 );
9098 }
9099
9100 if (that->qualifiers().has_value()) {
9101 const std::vector<
9102 std::shared_ptr<types::IQualifier>
9103 >& value(
9104 that->qualifiers().value()
9105 );
9106 const std::size_t size = value.size();
9107
9108 std::vector<
9109 std::shared_ptr<types::IQualifier>
9110 > wrapped;
9111 wrapped.reserve(size);
9112
9113 for (
9114 const std::shared_ptr<types::IQualifier>& item
9115 : value
9116 ) {
9117 wrapped.emplace_back(
9118 Wrap<E>(
9119 item,
9120 factory
9121 )
9122 );
9123 }
9124
9125 that->set_qualifiers(
9126 common::make_optional(
9127 std::move(wrapped)
9128 )
9129 );
9130 }
9131
9132 if (that->embedded_data_specifications().has_value()) {
9133 const std::vector<
9134 std::shared_ptr<types::IEmbeddedDataSpecification>
9135 >& value(
9136 that->embedded_data_specifications().value()
9137 );
9138 const std::size_t size = value.size();
9139
9140 std::vector<
9141 std::shared_ptr<types::IEmbeddedDataSpecification>
9142 > wrapped;
9143 wrapped.reserve(size);
9144
9145 for (
9146 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9147 : value
9148 ) {
9149 wrapped.emplace_back(
9150 Wrap<E>(
9151 item,
9152 factory
9153 )
9154 );
9155 }
9156
9157 that->set_embedded_data_specifications(
9158 common::make_optional(
9159 std::move(wrapped)
9160 )
9161 );
9162 }
9163
9164 that->set_first(
9165 Wrap<E>(
9166 that->first(),
9167 factory
9168 )
9169 );
9170
9171 that->set_second(
9172 Wrap<E>(
9173 that->second(),
9174 factory
9175 )
9176 );
9177
9178 std::shared_ptr<E> enh(
9179 factory(that)
9180 );
9181 return (enh == nullptr)
9182 ? that
9183 : std::shared_ptr<types::IRelationshipElement>(
9184 new EnhancedRelationshipElement<E>(
9185 that,
9186 enh
9187 )
9188 );
9189}
9190
9200template<typename E>
9201std::shared_ptr<types::ISubmodelElementList> WrapSubmodelElementList(
9202 const std::shared_ptr<types::ISubmodelElementList>& that,
9203 const std::function<
9204 std::shared_ptr<E>(
9205 const std::shared_ptr<types::IClass>&
9206 )
9207 >& factory
9208) {
9209 // We assume that we already checked whether `that` has been enhanced
9210 // in the caller.
9211
9212 if (that->extensions().has_value()) {
9213 const std::vector<
9214 std::shared_ptr<types::IExtension>
9215 >& value(
9216 that->extensions().value()
9217 );
9218 const std::size_t size = value.size();
9219
9220 std::vector<
9221 std::shared_ptr<types::IExtension>
9222 > wrapped;
9223 wrapped.reserve(size);
9224
9225 for (
9226 const std::shared_ptr<types::IExtension>& item
9227 : value
9228 ) {
9229 wrapped.emplace_back(
9230 Wrap<E>(
9231 item,
9232 factory
9233 )
9234 );
9235 }
9236
9237 that->set_extensions(
9238 common::make_optional(
9239 std::move(wrapped)
9240 )
9241 );
9242 }
9243
9244 if (that->display_name().has_value()) {
9245 const std::vector<
9246 std::shared_ptr<types::ILangStringNameType>
9247 >& value(
9248 that->display_name().value()
9249 );
9250 const std::size_t size = value.size();
9251
9252 std::vector<
9253 std::shared_ptr<types::ILangStringNameType>
9254 > wrapped;
9255 wrapped.reserve(size);
9256
9257 for (
9258 const std::shared_ptr<types::ILangStringNameType>& item
9259 : value
9260 ) {
9261 wrapped.emplace_back(
9262 Wrap<E>(
9263 item,
9264 factory
9265 )
9266 );
9267 }
9268
9269 that->set_display_name(
9270 common::make_optional(
9271 std::move(wrapped)
9272 )
9273 );
9274 }
9275
9276 if (that->description().has_value()) {
9277 const std::vector<
9278 std::shared_ptr<types::ILangStringTextType>
9279 >& value(
9280 that->description().value()
9281 );
9282 const std::size_t size = value.size();
9283
9284 std::vector<
9285 std::shared_ptr<types::ILangStringTextType>
9286 > wrapped;
9287 wrapped.reserve(size);
9288
9289 for (
9290 const std::shared_ptr<types::ILangStringTextType>& item
9291 : value
9292 ) {
9293 wrapped.emplace_back(
9294 Wrap<E>(
9295 item,
9296 factory
9297 )
9298 );
9299 }
9300
9301 that->set_description(
9302 common::make_optional(
9303 std::move(wrapped)
9304 )
9305 );
9306 }
9307
9308 if (that->semantic_id().has_value()) {
9309 const std::shared_ptr<types::IReference>& value(
9310 that->semantic_id().value()
9311 );
9312
9313 std::shared_ptr<
9315 > wrapped(
9316 Wrap<E>(
9317 value,
9318 factory
9319 )
9320 );
9321
9322 that->set_semantic_id(
9323 common::make_optional(
9324 std::move(wrapped)
9325 )
9326 );
9327 }
9328
9329 if (that->supplemental_semantic_ids().has_value()) {
9330 const std::vector<
9331 std::shared_ptr<types::IReference>
9332 >& value(
9333 that->supplemental_semantic_ids().value()
9334 );
9335 const std::size_t size = value.size();
9336
9337 std::vector<
9338 std::shared_ptr<types::IReference>
9339 > wrapped;
9340 wrapped.reserve(size);
9341
9342 for (
9343 const std::shared_ptr<types::IReference>& item
9344 : value
9345 ) {
9346 wrapped.emplace_back(
9347 Wrap<E>(
9348 item,
9349 factory
9350 )
9351 );
9352 }
9353
9354 that->set_supplemental_semantic_ids(
9355 common::make_optional(
9356 std::move(wrapped)
9357 )
9358 );
9359 }
9360
9361 if (that->qualifiers().has_value()) {
9362 const std::vector<
9363 std::shared_ptr<types::IQualifier>
9364 >& value(
9365 that->qualifiers().value()
9366 );
9367 const std::size_t size = value.size();
9368
9369 std::vector<
9370 std::shared_ptr<types::IQualifier>
9371 > wrapped;
9372 wrapped.reserve(size);
9373
9374 for (
9375 const std::shared_ptr<types::IQualifier>& item
9376 : value
9377 ) {
9378 wrapped.emplace_back(
9379 Wrap<E>(
9380 item,
9381 factory
9382 )
9383 );
9384 }
9385
9386 that->set_qualifiers(
9387 common::make_optional(
9388 std::move(wrapped)
9389 )
9390 );
9391 }
9392
9393 if (that->embedded_data_specifications().has_value()) {
9394 const std::vector<
9395 std::shared_ptr<types::IEmbeddedDataSpecification>
9396 >& value(
9397 that->embedded_data_specifications().value()
9398 );
9399 const std::size_t size = value.size();
9400
9401 std::vector<
9402 std::shared_ptr<types::IEmbeddedDataSpecification>
9403 > wrapped;
9404 wrapped.reserve(size);
9405
9406 for (
9407 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9408 : value
9409 ) {
9410 wrapped.emplace_back(
9411 Wrap<E>(
9412 item,
9413 factory
9414 )
9415 );
9416 }
9417
9418 that->set_embedded_data_specifications(
9419 common::make_optional(
9420 std::move(wrapped)
9421 )
9422 );
9423 }
9424
9425 if (that->semantic_id_list_element().has_value()) {
9426 const std::shared_ptr<types::IReference>& value(
9427 that->semantic_id_list_element().value()
9428 );
9429
9430 std::shared_ptr<
9432 > wrapped(
9433 Wrap<E>(
9434 value,
9435 factory
9436 )
9437 );
9438
9439 that->set_semantic_id_list_element(
9440 common::make_optional(
9441 std::move(wrapped)
9442 )
9443 );
9444 }
9445
9446 if (that->value().has_value()) {
9447 const std::vector<
9448 std::shared_ptr<types::ISubmodelElement>
9449 >& value(
9450 that->value().value()
9451 );
9452 const std::size_t size = value.size();
9453
9454 std::vector<
9455 std::shared_ptr<types::ISubmodelElement>
9456 > wrapped;
9457 wrapped.reserve(size);
9458
9459 for (
9460 const std::shared_ptr<types::ISubmodelElement>& item
9461 : value
9462 ) {
9463 wrapped.emplace_back(
9464 Wrap<E>(
9465 item,
9466 factory
9467 )
9468 );
9469 }
9470
9471 that->set_value(
9472 common::make_optional(
9473 std::move(wrapped)
9474 )
9475 );
9476 }
9477
9478 std::shared_ptr<E> enh(
9479 factory(that)
9480 );
9481 return (enh == nullptr)
9482 ? that
9483 : std::shared_ptr<types::ISubmodelElementList>(
9484 new EnhancedSubmodelElementList<E>(
9485 that,
9486 enh
9487 )
9488 );
9489}
9490
9500template<typename E>
9501std::shared_ptr<types::ISubmodelElementCollection> WrapSubmodelElementCollection(
9502 const std::shared_ptr<types::ISubmodelElementCollection>& that,
9503 const std::function<
9504 std::shared_ptr<E>(
9505 const std::shared_ptr<types::IClass>&
9506 )
9507 >& factory
9508) {
9509 // We assume that we already checked whether `that` has been enhanced
9510 // in the caller.
9511
9512 if (that->extensions().has_value()) {
9513 const std::vector<
9514 std::shared_ptr<types::IExtension>
9515 >& value(
9516 that->extensions().value()
9517 );
9518 const std::size_t size = value.size();
9519
9520 std::vector<
9521 std::shared_ptr<types::IExtension>
9522 > wrapped;
9523 wrapped.reserve(size);
9524
9525 for (
9526 const std::shared_ptr<types::IExtension>& item
9527 : value
9528 ) {
9529 wrapped.emplace_back(
9530 Wrap<E>(
9531 item,
9532 factory
9533 )
9534 );
9535 }
9536
9537 that->set_extensions(
9538 common::make_optional(
9539 std::move(wrapped)
9540 )
9541 );
9542 }
9543
9544 if (that->display_name().has_value()) {
9545 const std::vector<
9546 std::shared_ptr<types::ILangStringNameType>
9547 >& value(
9548 that->display_name().value()
9549 );
9550 const std::size_t size = value.size();
9551
9552 std::vector<
9553 std::shared_ptr<types::ILangStringNameType>
9554 > wrapped;
9555 wrapped.reserve(size);
9556
9557 for (
9558 const std::shared_ptr<types::ILangStringNameType>& item
9559 : value
9560 ) {
9561 wrapped.emplace_back(
9562 Wrap<E>(
9563 item,
9564 factory
9565 )
9566 );
9567 }
9568
9569 that->set_display_name(
9570 common::make_optional(
9571 std::move(wrapped)
9572 )
9573 );
9574 }
9575
9576 if (that->description().has_value()) {
9577 const std::vector<
9578 std::shared_ptr<types::ILangStringTextType>
9579 >& value(
9580 that->description().value()
9581 );
9582 const std::size_t size = value.size();
9583
9584 std::vector<
9585 std::shared_ptr<types::ILangStringTextType>
9586 > wrapped;
9587 wrapped.reserve(size);
9588
9589 for (
9590 const std::shared_ptr<types::ILangStringTextType>& item
9591 : value
9592 ) {
9593 wrapped.emplace_back(
9594 Wrap<E>(
9595 item,
9596 factory
9597 )
9598 );
9599 }
9600
9601 that->set_description(
9602 common::make_optional(
9603 std::move(wrapped)
9604 )
9605 );
9606 }
9607
9608 if (that->semantic_id().has_value()) {
9609 const std::shared_ptr<types::IReference>& value(
9610 that->semantic_id().value()
9611 );
9612
9613 std::shared_ptr<
9615 > wrapped(
9616 Wrap<E>(
9617 value,
9618 factory
9619 )
9620 );
9621
9622 that->set_semantic_id(
9623 common::make_optional(
9624 std::move(wrapped)
9625 )
9626 );
9627 }
9628
9629 if (that->supplemental_semantic_ids().has_value()) {
9630 const std::vector<
9631 std::shared_ptr<types::IReference>
9632 >& value(
9633 that->supplemental_semantic_ids().value()
9634 );
9635 const std::size_t size = value.size();
9636
9637 std::vector<
9638 std::shared_ptr<types::IReference>
9639 > wrapped;
9640 wrapped.reserve(size);
9641
9642 for (
9643 const std::shared_ptr<types::IReference>& item
9644 : value
9645 ) {
9646 wrapped.emplace_back(
9647 Wrap<E>(
9648 item,
9649 factory
9650 )
9651 );
9652 }
9653
9654 that->set_supplemental_semantic_ids(
9655 common::make_optional(
9656 std::move(wrapped)
9657 )
9658 );
9659 }
9660
9661 if (that->qualifiers().has_value()) {
9662 const std::vector<
9663 std::shared_ptr<types::IQualifier>
9664 >& value(
9665 that->qualifiers().value()
9666 );
9667 const std::size_t size = value.size();
9668
9669 std::vector<
9670 std::shared_ptr<types::IQualifier>
9671 > wrapped;
9672 wrapped.reserve(size);
9673
9674 for (
9675 const std::shared_ptr<types::IQualifier>& item
9676 : value
9677 ) {
9678 wrapped.emplace_back(
9679 Wrap<E>(
9680 item,
9681 factory
9682 )
9683 );
9684 }
9685
9686 that->set_qualifiers(
9687 common::make_optional(
9688 std::move(wrapped)
9689 )
9690 );
9691 }
9692
9693 if (that->embedded_data_specifications().has_value()) {
9694 const std::vector<
9695 std::shared_ptr<types::IEmbeddedDataSpecification>
9696 >& value(
9697 that->embedded_data_specifications().value()
9698 );
9699 const std::size_t size = value.size();
9700
9701 std::vector<
9702 std::shared_ptr<types::IEmbeddedDataSpecification>
9703 > wrapped;
9704 wrapped.reserve(size);
9705
9706 for (
9707 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9708 : value
9709 ) {
9710 wrapped.emplace_back(
9711 Wrap<E>(
9712 item,
9713 factory
9714 )
9715 );
9716 }
9717
9718 that->set_embedded_data_specifications(
9719 common::make_optional(
9720 std::move(wrapped)
9721 )
9722 );
9723 }
9724
9725 if (that->value().has_value()) {
9726 const std::vector<
9727 std::shared_ptr<types::ISubmodelElement>
9728 >& value(
9729 that->value().value()
9730 );
9731 const std::size_t size = value.size();
9732
9733 std::vector<
9734 std::shared_ptr<types::ISubmodelElement>
9735 > wrapped;
9736 wrapped.reserve(size);
9737
9738 for (
9739 const std::shared_ptr<types::ISubmodelElement>& item
9740 : value
9741 ) {
9742 wrapped.emplace_back(
9743 Wrap<E>(
9744 item,
9745 factory
9746 )
9747 );
9748 }
9749
9750 that->set_value(
9751 common::make_optional(
9752 std::move(wrapped)
9753 )
9754 );
9755 }
9756
9757 std::shared_ptr<E> enh(
9758 factory(that)
9759 );
9760 return (enh == nullptr)
9761 ? that
9762 : std::shared_ptr<types::ISubmodelElementCollection>(
9763 new EnhancedSubmodelElementCollection<E>(
9764 that,
9765 enh
9766 )
9767 );
9768}
9769
9779template<typename E>
9780std::shared_ptr<types::IProperty> WrapProperty(
9781 const std::shared_ptr<types::IProperty>& that,
9782 const std::function<
9783 std::shared_ptr<E>(
9784 const std::shared_ptr<types::IClass>&
9785 )
9786 >& factory
9787) {
9788 // We assume that we already checked whether `that` has been enhanced
9789 // in the caller.
9790
9791 if (that->extensions().has_value()) {
9792 const std::vector<
9793 std::shared_ptr<types::IExtension>
9794 >& value(
9795 that->extensions().value()
9796 );
9797 const std::size_t size = value.size();
9798
9799 std::vector<
9800 std::shared_ptr<types::IExtension>
9801 > wrapped;
9802 wrapped.reserve(size);
9803
9804 for (
9805 const std::shared_ptr<types::IExtension>& item
9806 : value
9807 ) {
9808 wrapped.emplace_back(
9809 Wrap<E>(
9810 item,
9811 factory
9812 )
9813 );
9814 }
9815
9816 that->set_extensions(
9817 common::make_optional(
9818 std::move(wrapped)
9819 )
9820 );
9821 }
9822
9823 if (that->display_name().has_value()) {
9824 const std::vector<
9825 std::shared_ptr<types::ILangStringNameType>
9826 >& value(
9827 that->display_name().value()
9828 );
9829 const std::size_t size = value.size();
9830
9831 std::vector<
9832 std::shared_ptr<types::ILangStringNameType>
9833 > wrapped;
9834 wrapped.reserve(size);
9835
9836 for (
9837 const std::shared_ptr<types::ILangStringNameType>& item
9838 : value
9839 ) {
9840 wrapped.emplace_back(
9841 Wrap<E>(
9842 item,
9843 factory
9844 )
9845 );
9846 }
9847
9848 that->set_display_name(
9849 common::make_optional(
9850 std::move(wrapped)
9851 )
9852 );
9853 }
9854
9855 if (that->description().has_value()) {
9856 const std::vector<
9857 std::shared_ptr<types::ILangStringTextType>
9858 >& value(
9859 that->description().value()
9860 );
9861 const std::size_t size = value.size();
9862
9863 std::vector<
9864 std::shared_ptr<types::ILangStringTextType>
9865 > wrapped;
9866 wrapped.reserve(size);
9867
9868 for (
9869 const std::shared_ptr<types::ILangStringTextType>& item
9870 : value
9871 ) {
9872 wrapped.emplace_back(
9873 Wrap<E>(
9874 item,
9875 factory
9876 )
9877 );
9878 }
9879
9880 that->set_description(
9881 common::make_optional(
9882 std::move(wrapped)
9883 )
9884 );
9885 }
9886
9887 if (that->semantic_id().has_value()) {
9888 const std::shared_ptr<types::IReference>& value(
9889 that->semantic_id().value()
9890 );
9891
9892 std::shared_ptr<
9894 > wrapped(
9895 Wrap<E>(
9896 value,
9897 factory
9898 )
9899 );
9900
9901 that->set_semantic_id(
9902 common::make_optional(
9903 std::move(wrapped)
9904 )
9905 );
9906 }
9907
9908 if (that->supplemental_semantic_ids().has_value()) {
9909 const std::vector<
9910 std::shared_ptr<types::IReference>
9911 >& value(
9912 that->supplemental_semantic_ids().value()
9913 );
9914 const std::size_t size = value.size();
9915
9916 std::vector<
9917 std::shared_ptr<types::IReference>
9918 > wrapped;
9919 wrapped.reserve(size);
9920
9921 for (
9922 const std::shared_ptr<types::IReference>& item
9923 : value
9924 ) {
9925 wrapped.emplace_back(
9926 Wrap<E>(
9927 item,
9928 factory
9929 )
9930 );
9931 }
9932
9933 that->set_supplemental_semantic_ids(
9934 common::make_optional(
9935 std::move(wrapped)
9936 )
9937 );
9938 }
9939
9940 if (that->qualifiers().has_value()) {
9941 const std::vector<
9942 std::shared_ptr<types::IQualifier>
9943 >& value(
9944 that->qualifiers().value()
9945 );
9946 const std::size_t size = value.size();
9947
9948 std::vector<
9949 std::shared_ptr<types::IQualifier>
9950 > wrapped;
9951 wrapped.reserve(size);
9952
9953 for (
9954 const std::shared_ptr<types::IQualifier>& item
9955 : value
9956 ) {
9957 wrapped.emplace_back(
9958 Wrap<E>(
9959 item,
9960 factory
9961 )
9962 );
9963 }
9964
9965 that->set_qualifiers(
9966 common::make_optional(
9967 std::move(wrapped)
9968 )
9969 );
9970 }
9971
9972 if (that->embedded_data_specifications().has_value()) {
9973 const std::vector<
9974 std::shared_ptr<types::IEmbeddedDataSpecification>
9975 >& value(
9976 that->embedded_data_specifications().value()
9977 );
9978 const std::size_t size = value.size();
9979
9980 std::vector<
9981 std::shared_ptr<types::IEmbeddedDataSpecification>
9982 > wrapped;
9983 wrapped.reserve(size);
9984
9985 for (
9986 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
9987 : value
9988 ) {
9989 wrapped.emplace_back(
9990 Wrap<E>(
9991 item,
9992 factory
9993 )
9994 );
9995 }
9996
9997 that->set_embedded_data_specifications(
9998 common::make_optional(
9999 std::move(wrapped)
10000 )
10001 );
10002 }
10003
10004 if (that->value_id().has_value()) {
10005 const std::shared_ptr<types::IReference>& value(
10006 that->value_id().value()
10007 );
10008
10009 std::shared_ptr<
10011 > wrapped(
10012 Wrap<E>(
10013 value,
10014 factory
10015 )
10016 );
10017
10018 that->set_value_id(
10019 common::make_optional(
10020 std::move(wrapped)
10021 )
10022 );
10023 }
10024
10025 std::shared_ptr<E> enh(
10026 factory(that)
10027 );
10028 return (enh == nullptr)
10029 ? that
10030 : std::shared_ptr<types::IProperty>(
10031 new EnhancedProperty<E>(
10032 that,
10033 enh
10034 )
10035 );
10036}
10037
10047template<typename E>
10048std::shared_ptr<types::IMultiLanguageProperty> WrapMultiLanguageProperty(
10049 const std::shared_ptr<types::IMultiLanguageProperty>& that,
10050 const std::function<
10051 std::shared_ptr<E>(
10052 const std::shared_ptr<types::IClass>&
10053 )
10054 >& factory
10055) {
10056 // We assume that we already checked whether `that` has been enhanced
10057 // in the caller.
10058
10059 if (that->extensions().has_value()) {
10060 const std::vector<
10061 std::shared_ptr<types::IExtension>
10062 >& value(
10063 that->extensions().value()
10064 );
10065 const std::size_t size = value.size();
10066
10067 std::vector<
10068 std::shared_ptr<types::IExtension>
10069 > wrapped;
10070 wrapped.reserve(size);
10071
10072 for (
10073 const std::shared_ptr<types::IExtension>& item
10074 : value
10075 ) {
10076 wrapped.emplace_back(
10077 Wrap<E>(
10078 item,
10079 factory
10080 )
10081 );
10082 }
10083
10084 that->set_extensions(
10085 common::make_optional(
10086 std::move(wrapped)
10087 )
10088 );
10089 }
10090
10091 if (that->display_name().has_value()) {
10092 const std::vector<
10093 std::shared_ptr<types::ILangStringNameType>
10094 >& value(
10095 that->display_name().value()
10096 );
10097 const std::size_t size = value.size();
10098
10099 std::vector<
10100 std::shared_ptr<types::ILangStringNameType>
10101 > wrapped;
10102 wrapped.reserve(size);
10103
10104 for (
10105 const std::shared_ptr<types::ILangStringNameType>& item
10106 : value
10107 ) {
10108 wrapped.emplace_back(
10109 Wrap<E>(
10110 item,
10111 factory
10112 )
10113 );
10114 }
10115
10116 that->set_display_name(
10117 common::make_optional(
10118 std::move(wrapped)
10119 )
10120 );
10121 }
10122
10123 if (that->description().has_value()) {
10124 const std::vector<
10125 std::shared_ptr<types::ILangStringTextType>
10126 >& value(
10127 that->description().value()
10128 );
10129 const std::size_t size = value.size();
10130
10131 std::vector<
10132 std::shared_ptr<types::ILangStringTextType>
10133 > wrapped;
10134 wrapped.reserve(size);
10135
10136 for (
10137 const std::shared_ptr<types::ILangStringTextType>& item
10138 : value
10139 ) {
10140 wrapped.emplace_back(
10141 Wrap<E>(
10142 item,
10143 factory
10144 )
10145 );
10146 }
10147
10148 that->set_description(
10149 common::make_optional(
10150 std::move(wrapped)
10151 )
10152 );
10153 }
10154
10155 if (that->semantic_id().has_value()) {
10156 const std::shared_ptr<types::IReference>& value(
10157 that->semantic_id().value()
10158 );
10159
10160 std::shared_ptr<
10162 > wrapped(
10163 Wrap<E>(
10164 value,
10165 factory
10166 )
10167 );
10168
10169 that->set_semantic_id(
10170 common::make_optional(
10171 std::move(wrapped)
10172 )
10173 );
10174 }
10175
10176 if (that->supplemental_semantic_ids().has_value()) {
10177 const std::vector<
10178 std::shared_ptr<types::IReference>
10179 >& value(
10180 that->supplemental_semantic_ids().value()
10181 );
10182 const std::size_t size = value.size();
10183
10184 std::vector<
10185 std::shared_ptr<types::IReference>
10186 > wrapped;
10187 wrapped.reserve(size);
10188
10189 for (
10190 const std::shared_ptr<types::IReference>& item
10191 : value
10192 ) {
10193 wrapped.emplace_back(
10194 Wrap<E>(
10195 item,
10196 factory
10197 )
10198 );
10199 }
10200
10201 that->set_supplemental_semantic_ids(
10202 common::make_optional(
10203 std::move(wrapped)
10204 )
10205 );
10206 }
10207
10208 if (that->qualifiers().has_value()) {
10209 const std::vector<
10210 std::shared_ptr<types::IQualifier>
10211 >& value(
10212 that->qualifiers().value()
10213 );
10214 const std::size_t size = value.size();
10215
10216 std::vector<
10217 std::shared_ptr<types::IQualifier>
10218 > wrapped;
10219 wrapped.reserve(size);
10220
10221 for (
10222 const std::shared_ptr<types::IQualifier>& item
10223 : value
10224 ) {
10225 wrapped.emplace_back(
10226 Wrap<E>(
10227 item,
10228 factory
10229 )
10230 );
10231 }
10232
10233 that->set_qualifiers(
10234 common::make_optional(
10235 std::move(wrapped)
10236 )
10237 );
10238 }
10239
10240 if (that->embedded_data_specifications().has_value()) {
10241 const std::vector<
10242 std::shared_ptr<types::IEmbeddedDataSpecification>
10243 >& value(
10244 that->embedded_data_specifications().value()
10245 );
10246 const std::size_t size = value.size();
10247
10248 std::vector<
10249 std::shared_ptr<types::IEmbeddedDataSpecification>
10250 > wrapped;
10251 wrapped.reserve(size);
10252
10253 for (
10254 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10255 : value
10256 ) {
10257 wrapped.emplace_back(
10258 Wrap<E>(
10259 item,
10260 factory
10261 )
10262 );
10263 }
10264
10265 that->set_embedded_data_specifications(
10266 common::make_optional(
10267 std::move(wrapped)
10268 )
10269 );
10270 }
10271
10272 if (that->value().has_value()) {
10273 const std::vector<
10274 std::shared_ptr<types::ILangStringTextType>
10275 >& value(
10276 that->value().value()
10277 );
10278 const std::size_t size = value.size();
10279
10280 std::vector<
10281 std::shared_ptr<types::ILangStringTextType>
10282 > wrapped;
10283 wrapped.reserve(size);
10284
10285 for (
10286 const std::shared_ptr<types::ILangStringTextType>& item
10287 : value
10288 ) {
10289 wrapped.emplace_back(
10290 Wrap<E>(
10291 item,
10292 factory
10293 )
10294 );
10295 }
10296
10297 that->set_value(
10298 common::make_optional(
10299 std::move(wrapped)
10300 )
10301 );
10302 }
10303
10304 if (that->value_id().has_value()) {
10305 const std::shared_ptr<types::IReference>& value(
10306 that->value_id().value()
10307 );
10308
10309 std::shared_ptr<
10311 > wrapped(
10312 Wrap<E>(
10313 value,
10314 factory
10315 )
10316 );
10317
10318 that->set_value_id(
10319 common::make_optional(
10320 std::move(wrapped)
10321 )
10322 );
10323 }
10324
10325 std::shared_ptr<E> enh(
10326 factory(that)
10327 );
10328 return (enh == nullptr)
10329 ? that
10330 : std::shared_ptr<types::IMultiLanguageProperty>(
10331 new EnhancedMultiLanguageProperty<E>(
10332 that,
10333 enh
10334 )
10335 );
10336}
10337
10347template<typename E>
10348std::shared_ptr<types::IRange> WrapRange(
10349 const std::shared_ptr<types::IRange>& that,
10350 const std::function<
10351 std::shared_ptr<E>(
10352 const std::shared_ptr<types::IClass>&
10353 )
10354 >& factory
10355) {
10356 // We assume that we already checked whether `that` has been enhanced
10357 // in the caller.
10358
10359 if (that->extensions().has_value()) {
10360 const std::vector<
10361 std::shared_ptr<types::IExtension>
10362 >& value(
10363 that->extensions().value()
10364 );
10365 const std::size_t size = value.size();
10366
10367 std::vector<
10368 std::shared_ptr<types::IExtension>
10369 > wrapped;
10370 wrapped.reserve(size);
10371
10372 for (
10373 const std::shared_ptr<types::IExtension>& item
10374 : value
10375 ) {
10376 wrapped.emplace_back(
10377 Wrap<E>(
10378 item,
10379 factory
10380 )
10381 );
10382 }
10383
10384 that->set_extensions(
10385 common::make_optional(
10386 std::move(wrapped)
10387 )
10388 );
10389 }
10390
10391 if (that->display_name().has_value()) {
10392 const std::vector<
10393 std::shared_ptr<types::ILangStringNameType>
10394 >& value(
10395 that->display_name().value()
10396 );
10397 const std::size_t size = value.size();
10398
10399 std::vector<
10400 std::shared_ptr<types::ILangStringNameType>
10401 > wrapped;
10402 wrapped.reserve(size);
10403
10404 for (
10405 const std::shared_ptr<types::ILangStringNameType>& item
10406 : value
10407 ) {
10408 wrapped.emplace_back(
10409 Wrap<E>(
10410 item,
10411 factory
10412 )
10413 );
10414 }
10415
10416 that->set_display_name(
10417 common::make_optional(
10418 std::move(wrapped)
10419 )
10420 );
10421 }
10422
10423 if (that->description().has_value()) {
10424 const std::vector<
10425 std::shared_ptr<types::ILangStringTextType>
10426 >& value(
10427 that->description().value()
10428 );
10429 const std::size_t size = value.size();
10430
10431 std::vector<
10432 std::shared_ptr<types::ILangStringTextType>
10433 > wrapped;
10434 wrapped.reserve(size);
10435
10436 for (
10437 const std::shared_ptr<types::ILangStringTextType>& item
10438 : value
10439 ) {
10440 wrapped.emplace_back(
10441 Wrap<E>(
10442 item,
10443 factory
10444 )
10445 );
10446 }
10447
10448 that->set_description(
10449 common::make_optional(
10450 std::move(wrapped)
10451 )
10452 );
10453 }
10454
10455 if (that->semantic_id().has_value()) {
10456 const std::shared_ptr<types::IReference>& value(
10457 that->semantic_id().value()
10458 );
10459
10460 std::shared_ptr<
10462 > wrapped(
10463 Wrap<E>(
10464 value,
10465 factory
10466 )
10467 );
10468
10469 that->set_semantic_id(
10470 common::make_optional(
10471 std::move(wrapped)
10472 )
10473 );
10474 }
10475
10476 if (that->supplemental_semantic_ids().has_value()) {
10477 const std::vector<
10478 std::shared_ptr<types::IReference>
10479 >& value(
10480 that->supplemental_semantic_ids().value()
10481 );
10482 const std::size_t size = value.size();
10483
10484 std::vector<
10485 std::shared_ptr<types::IReference>
10486 > wrapped;
10487 wrapped.reserve(size);
10488
10489 for (
10490 const std::shared_ptr<types::IReference>& item
10491 : value
10492 ) {
10493 wrapped.emplace_back(
10494 Wrap<E>(
10495 item,
10496 factory
10497 )
10498 );
10499 }
10500
10501 that->set_supplemental_semantic_ids(
10502 common::make_optional(
10503 std::move(wrapped)
10504 )
10505 );
10506 }
10507
10508 if (that->qualifiers().has_value()) {
10509 const std::vector<
10510 std::shared_ptr<types::IQualifier>
10511 >& value(
10512 that->qualifiers().value()
10513 );
10514 const std::size_t size = value.size();
10515
10516 std::vector<
10517 std::shared_ptr<types::IQualifier>
10518 > wrapped;
10519 wrapped.reserve(size);
10520
10521 for (
10522 const std::shared_ptr<types::IQualifier>& item
10523 : value
10524 ) {
10525 wrapped.emplace_back(
10526 Wrap<E>(
10527 item,
10528 factory
10529 )
10530 );
10531 }
10532
10533 that->set_qualifiers(
10534 common::make_optional(
10535 std::move(wrapped)
10536 )
10537 );
10538 }
10539
10540 if (that->embedded_data_specifications().has_value()) {
10541 const std::vector<
10542 std::shared_ptr<types::IEmbeddedDataSpecification>
10543 >& value(
10544 that->embedded_data_specifications().value()
10545 );
10546 const std::size_t size = value.size();
10547
10548 std::vector<
10549 std::shared_ptr<types::IEmbeddedDataSpecification>
10550 > wrapped;
10551 wrapped.reserve(size);
10552
10553 for (
10554 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10555 : value
10556 ) {
10557 wrapped.emplace_back(
10558 Wrap<E>(
10559 item,
10560 factory
10561 )
10562 );
10563 }
10564
10565 that->set_embedded_data_specifications(
10566 common::make_optional(
10567 std::move(wrapped)
10568 )
10569 );
10570 }
10571
10572 std::shared_ptr<E> enh(
10573 factory(that)
10574 );
10575 return (enh == nullptr)
10576 ? that
10577 : std::shared_ptr<types::IRange>(
10578 new EnhancedRange<E>(
10579 that,
10580 enh
10581 )
10582 );
10583}
10584
10594template<typename E>
10595std::shared_ptr<types::IReferenceElement> WrapReferenceElement(
10596 const std::shared_ptr<types::IReferenceElement>& that,
10597 const std::function<
10598 std::shared_ptr<E>(
10599 const std::shared_ptr<types::IClass>&
10600 )
10601 >& factory
10602) {
10603 // We assume that we already checked whether `that` has been enhanced
10604 // in the caller.
10605
10606 if (that->extensions().has_value()) {
10607 const std::vector<
10608 std::shared_ptr<types::IExtension>
10609 >& value(
10610 that->extensions().value()
10611 );
10612 const std::size_t size = value.size();
10613
10614 std::vector<
10615 std::shared_ptr<types::IExtension>
10616 > wrapped;
10617 wrapped.reserve(size);
10618
10619 for (
10620 const std::shared_ptr<types::IExtension>& item
10621 : value
10622 ) {
10623 wrapped.emplace_back(
10624 Wrap<E>(
10625 item,
10626 factory
10627 )
10628 );
10629 }
10630
10631 that->set_extensions(
10632 common::make_optional(
10633 std::move(wrapped)
10634 )
10635 );
10636 }
10637
10638 if (that->display_name().has_value()) {
10639 const std::vector<
10640 std::shared_ptr<types::ILangStringNameType>
10641 >& value(
10642 that->display_name().value()
10643 );
10644 const std::size_t size = value.size();
10645
10646 std::vector<
10647 std::shared_ptr<types::ILangStringNameType>
10648 > wrapped;
10649 wrapped.reserve(size);
10650
10651 for (
10652 const std::shared_ptr<types::ILangStringNameType>& item
10653 : value
10654 ) {
10655 wrapped.emplace_back(
10656 Wrap<E>(
10657 item,
10658 factory
10659 )
10660 );
10661 }
10662
10663 that->set_display_name(
10664 common::make_optional(
10665 std::move(wrapped)
10666 )
10667 );
10668 }
10669
10670 if (that->description().has_value()) {
10671 const std::vector<
10672 std::shared_ptr<types::ILangStringTextType>
10673 >& value(
10674 that->description().value()
10675 );
10676 const std::size_t size = value.size();
10677
10678 std::vector<
10679 std::shared_ptr<types::ILangStringTextType>
10680 > wrapped;
10681 wrapped.reserve(size);
10682
10683 for (
10684 const std::shared_ptr<types::ILangStringTextType>& item
10685 : value
10686 ) {
10687 wrapped.emplace_back(
10688 Wrap<E>(
10689 item,
10690 factory
10691 )
10692 );
10693 }
10694
10695 that->set_description(
10696 common::make_optional(
10697 std::move(wrapped)
10698 )
10699 );
10700 }
10701
10702 if (that->semantic_id().has_value()) {
10703 const std::shared_ptr<types::IReference>& value(
10704 that->semantic_id().value()
10705 );
10706
10707 std::shared_ptr<
10709 > wrapped(
10710 Wrap<E>(
10711 value,
10712 factory
10713 )
10714 );
10715
10716 that->set_semantic_id(
10717 common::make_optional(
10718 std::move(wrapped)
10719 )
10720 );
10721 }
10722
10723 if (that->supplemental_semantic_ids().has_value()) {
10724 const std::vector<
10725 std::shared_ptr<types::IReference>
10726 >& value(
10727 that->supplemental_semantic_ids().value()
10728 );
10729 const std::size_t size = value.size();
10730
10731 std::vector<
10732 std::shared_ptr<types::IReference>
10733 > wrapped;
10734 wrapped.reserve(size);
10735
10736 for (
10737 const std::shared_ptr<types::IReference>& item
10738 : value
10739 ) {
10740 wrapped.emplace_back(
10741 Wrap<E>(
10742 item,
10743 factory
10744 )
10745 );
10746 }
10747
10748 that->set_supplemental_semantic_ids(
10749 common::make_optional(
10750 std::move(wrapped)
10751 )
10752 );
10753 }
10754
10755 if (that->qualifiers().has_value()) {
10756 const std::vector<
10757 std::shared_ptr<types::IQualifier>
10758 >& value(
10759 that->qualifiers().value()
10760 );
10761 const std::size_t size = value.size();
10762
10763 std::vector<
10764 std::shared_ptr<types::IQualifier>
10765 > wrapped;
10766 wrapped.reserve(size);
10767
10768 for (
10769 const std::shared_ptr<types::IQualifier>& item
10770 : value
10771 ) {
10772 wrapped.emplace_back(
10773 Wrap<E>(
10774 item,
10775 factory
10776 )
10777 );
10778 }
10779
10780 that->set_qualifiers(
10781 common::make_optional(
10782 std::move(wrapped)
10783 )
10784 );
10785 }
10786
10787 if (that->embedded_data_specifications().has_value()) {
10788 const std::vector<
10789 std::shared_ptr<types::IEmbeddedDataSpecification>
10790 >& value(
10791 that->embedded_data_specifications().value()
10792 );
10793 const std::size_t size = value.size();
10794
10795 std::vector<
10796 std::shared_ptr<types::IEmbeddedDataSpecification>
10797 > wrapped;
10798 wrapped.reserve(size);
10799
10800 for (
10801 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
10802 : value
10803 ) {
10804 wrapped.emplace_back(
10805 Wrap<E>(
10806 item,
10807 factory
10808 )
10809 );
10810 }
10811
10812 that->set_embedded_data_specifications(
10813 common::make_optional(
10814 std::move(wrapped)
10815 )
10816 );
10817 }
10818
10819 if (that->value().has_value()) {
10820 const std::shared_ptr<types::IReference>& value(
10821 that->value().value()
10822 );
10823
10824 std::shared_ptr<
10826 > wrapped(
10827 Wrap<E>(
10828 value,
10829 factory
10830 )
10831 );
10832
10833 that->set_value(
10834 common::make_optional(
10835 std::move(wrapped)
10836 )
10837 );
10838 }
10839
10840 std::shared_ptr<E> enh(
10841 factory(that)
10842 );
10843 return (enh == nullptr)
10844 ? that
10845 : std::shared_ptr<types::IReferenceElement>(
10846 new EnhancedReferenceElement<E>(
10847 that,
10848 enh
10849 )
10850 );
10851}
10852
10862template<typename E>
10863std::shared_ptr<types::IBlob> WrapBlob(
10864 const std::shared_ptr<types::IBlob>& that,
10865 const std::function<
10866 std::shared_ptr<E>(
10867 const std::shared_ptr<types::IClass>&
10868 )
10869 >& factory
10870) {
10871 // We assume that we already checked whether `that` has been enhanced
10872 // in the caller.
10873
10874 if (that->extensions().has_value()) {
10875 const std::vector<
10876 std::shared_ptr<types::IExtension>
10877 >& value(
10878 that->extensions().value()
10879 );
10880 const std::size_t size = value.size();
10881
10882 std::vector<
10883 std::shared_ptr<types::IExtension>
10884 > wrapped;
10885 wrapped.reserve(size);
10886
10887 for (
10888 const std::shared_ptr<types::IExtension>& item
10889 : value
10890 ) {
10891 wrapped.emplace_back(
10892 Wrap<E>(
10893 item,
10894 factory
10895 )
10896 );
10897 }
10898
10899 that->set_extensions(
10900 common::make_optional(
10901 std::move(wrapped)
10902 )
10903 );
10904 }
10905
10906 if (that->display_name().has_value()) {
10907 const std::vector<
10908 std::shared_ptr<types::ILangStringNameType>
10909 >& value(
10910 that->display_name().value()
10911 );
10912 const std::size_t size = value.size();
10913
10914 std::vector<
10915 std::shared_ptr<types::ILangStringNameType>
10916 > wrapped;
10917 wrapped.reserve(size);
10918
10919 for (
10920 const std::shared_ptr<types::ILangStringNameType>& item
10921 : value
10922 ) {
10923 wrapped.emplace_back(
10924 Wrap<E>(
10925 item,
10926 factory
10927 )
10928 );
10929 }
10930
10931 that->set_display_name(
10932 common::make_optional(
10933 std::move(wrapped)
10934 )
10935 );
10936 }
10937
10938 if (that->description().has_value()) {
10939 const std::vector<
10940 std::shared_ptr<types::ILangStringTextType>
10941 >& value(
10942 that->description().value()
10943 );
10944 const std::size_t size = value.size();
10945
10946 std::vector<
10947 std::shared_ptr<types::ILangStringTextType>
10948 > wrapped;
10949 wrapped.reserve(size);
10950
10951 for (
10952 const std::shared_ptr<types::ILangStringTextType>& item
10953 : value
10954 ) {
10955 wrapped.emplace_back(
10956 Wrap<E>(
10957 item,
10958 factory
10959 )
10960 );
10961 }
10962
10963 that->set_description(
10964 common::make_optional(
10965 std::move(wrapped)
10966 )
10967 );
10968 }
10969
10970 if (that->semantic_id().has_value()) {
10971 const std::shared_ptr<types::IReference>& value(
10972 that->semantic_id().value()
10973 );
10974
10975 std::shared_ptr<
10977 > wrapped(
10978 Wrap<E>(
10979 value,
10980 factory
10981 )
10982 );
10983
10984 that->set_semantic_id(
10985 common::make_optional(
10986 std::move(wrapped)
10987 )
10988 );
10989 }
10990
10991 if (that->supplemental_semantic_ids().has_value()) {
10992 const std::vector<
10993 std::shared_ptr<types::IReference>
10994 >& value(
10995 that->supplemental_semantic_ids().value()
10996 );
10997 const std::size_t size = value.size();
10998
10999 std::vector<
11000 std::shared_ptr<types::IReference>
11001 > wrapped;
11002 wrapped.reserve(size);
11003
11004 for (
11005 const std::shared_ptr<types::IReference>& item
11006 : value
11007 ) {
11008 wrapped.emplace_back(
11009 Wrap<E>(
11010 item,
11011 factory
11012 )
11013 );
11014 }
11015
11016 that->set_supplemental_semantic_ids(
11017 common::make_optional(
11018 std::move(wrapped)
11019 )
11020 );
11021 }
11022
11023 if (that->qualifiers().has_value()) {
11024 const std::vector<
11025 std::shared_ptr<types::IQualifier>
11026 >& value(
11027 that->qualifiers().value()
11028 );
11029 const std::size_t size = value.size();
11030
11031 std::vector<
11032 std::shared_ptr<types::IQualifier>
11033 > wrapped;
11034 wrapped.reserve(size);
11035
11036 for (
11037 const std::shared_ptr<types::IQualifier>& item
11038 : value
11039 ) {
11040 wrapped.emplace_back(
11041 Wrap<E>(
11042 item,
11043 factory
11044 )
11045 );
11046 }
11047
11048 that->set_qualifiers(
11049 common::make_optional(
11050 std::move(wrapped)
11051 )
11052 );
11053 }
11054
11055 if (that->embedded_data_specifications().has_value()) {
11056 const std::vector<
11057 std::shared_ptr<types::IEmbeddedDataSpecification>
11058 >& value(
11059 that->embedded_data_specifications().value()
11060 );
11061 const std::size_t size = value.size();
11062
11063 std::vector<
11064 std::shared_ptr<types::IEmbeddedDataSpecification>
11065 > wrapped;
11066 wrapped.reserve(size);
11067
11068 for (
11069 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11070 : value
11071 ) {
11072 wrapped.emplace_back(
11073 Wrap<E>(
11074 item,
11075 factory
11076 )
11077 );
11078 }
11079
11080 that->set_embedded_data_specifications(
11081 common::make_optional(
11082 std::move(wrapped)
11083 )
11084 );
11085 }
11086
11087 std::shared_ptr<E> enh(
11088 factory(that)
11089 );
11090 return (enh == nullptr)
11091 ? that
11092 : std::shared_ptr<types::IBlob>(
11093 new EnhancedBlob<E>(
11094 that,
11095 enh
11096 )
11097 );
11098}
11099
11109template<typename E>
11110std::shared_ptr<types::IFile> WrapFile(
11111 const std::shared_ptr<types::IFile>& that,
11112 const std::function<
11113 std::shared_ptr<E>(
11114 const std::shared_ptr<types::IClass>&
11115 )
11116 >& factory
11117) {
11118 // We assume that we already checked whether `that` has been enhanced
11119 // in the caller.
11120
11121 if (that->extensions().has_value()) {
11122 const std::vector<
11123 std::shared_ptr<types::IExtension>
11124 >& value(
11125 that->extensions().value()
11126 );
11127 const std::size_t size = value.size();
11128
11129 std::vector<
11130 std::shared_ptr<types::IExtension>
11131 > wrapped;
11132 wrapped.reserve(size);
11133
11134 for (
11135 const std::shared_ptr<types::IExtension>& item
11136 : value
11137 ) {
11138 wrapped.emplace_back(
11139 Wrap<E>(
11140 item,
11141 factory
11142 )
11143 );
11144 }
11145
11146 that->set_extensions(
11147 common::make_optional(
11148 std::move(wrapped)
11149 )
11150 );
11151 }
11152
11153 if (that->display_name().has_value()) {
11154 const std::vector<
11155 std::shared_ptr<types::ILangStringNameType>
11156 >& value(
11157 that->display_name().value()
11158 );
11159 const std::size_t size = value.size();
11160
11161 std::vector<
11162 std::shared_ptr<types::ILangStringNameType>
11163 > wrapped;
11164 wrapped.reserve(size);
11165
11166 for (
11167 const std::shared_ptr<types::ILangStringNameType>& item
11168 : value
11169 ) {
11170 wrapped.emplace_back(
11171 Wrap<E>(
11172 item,
11173 factory
11174 )
11175 );
11176 }
11177
11178 that->set_display_name(
11179 common::make_optional(
11180 std::move(wrapped)
11181 )
11182 );
11183 }
11184
11185 if (that->description().has_value()) {
11186 const std::vector<
11187 std::shared_ptr<types::ILangStringTextType>
11188 >& value(
11189 that->description().value()
11190 );
11191 const std::size_t size = value.size();
11192
11193 std::vector<
11194 std::shared_ptr<types::ILangStringTextType>
11195 > wrapped;
11196 wrapped.reserve(size);
11197
11198 for (
11199 const std::shared_ptr<types::ILangStringTextType>& item
11200 : value
11201 ) {
11202 wrapped.emplace_back(
11203 Wrap<E>(
11204 item,
11205 factory
11206 )
11207 );
11208 }
11209
11210 that->set_description(
11211 common::make_optional(
11212 std::move(wrapped)
11213 )
11214 );
11215 }
11216
11217 if (that->semantic_id().has_value()) {
11218 const std::shared_ptr<types::IReference>& value(
11219 that->semantic_id().value()
11220 );
11221
11222 std::shared_ptr<
11224 > wrapped(
11225 Wrap<E>(
11226 value,
11227 factory
11228 )
11229 );
11230
11231 that->set_semantic_id(
11232 common::make_optional(
11233 std::move(wrapped)
11234 )
11235 );
11236 }
11237
11238 if (that->supplemental_semantic_ids().has_value()) {
11239 const std::vector<
11240 std::shared_ptr<types::IReference>
11241 >& value(
11242 that->supplemental_semantic_ids().value()
11243 );
11244 const std::size_t size = value.size();
11245
11246 std::vector<
11247 std::shared_ptr<types::IReference>
11248 > wrapped;
11249 wrapped.reserve(size);
11250
11251 for (
11252 const std::shared_ptr<types::IReference>& item
11253 : value
11254 ) {
11255 wrapped.emplace_back(
11256 Wrap<E>(
11257 item,
11258 factory
11259 )
11260 );
11261 }
11262
11263 that->set_supplemental_semantic_ids(
11264 common::make_optional(
11265 std::move(wrapped)
11266 )
11267 );
11268 }
11269
11270 if (that->qualifiers().has_value()) {
11271 const std::vector<
11272 std::shared_ptr<types::IQualifier>
11273 >& value(
11274 that->qualifiers().value()
11275 );
11276 const std::size_t size = value.size();
11277
11278 std::vector<
11279 std::shared_ptr<types::IQualifier>
11280 > wrapped;
11281 wrapped.reserve(size);
11282
11283 for (
11284 const std::shared_ptr<types::IQualifier>& item
11285 : value
11286 ) {
11287 wrapped.emplace_back(
11288 Wrap<E>(
11289 item,
11290 factory
11291 )
11292 );
11293 }
11294
11295 that->set_qualifiers(
11296 common::make_optional(
11297 std::move(wrapped)
11298 )
11299 );
11300 }
11301
11302 if (that->embedded_data_specifications().has_value()) {
11303 const std::vector<
11304 std::shared_ptr<types::IEmbeddedDataSpecification>
11305 >& value(
11306 that->embedded_data_specifications().value()
11307 );
11308 const std::size_t size = value.size();
11309
11310 std::vector<
11311 std::shared_ptr<types::IEmbeddedDataSpecification>
11312 > wrapped;
11313 wrapped.reserve(size);
11314
11315 for (
11316 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11317 : value
11318 ) {
11319 wrapped.emplace_back(
11320 Wrap<E>(
11321 item,
11322 factory
11323 )
11324 );
11325 }
11326
11327 that->set_embedded_data_specifications(
11328 common::make_optional(
11329 std::move(wrapped)
11330 )
11331 );
11332 }
11333
11334 std::shared_ptr<E> enh(
11335 factory(that)
11336 );
11337 return (enh == nullptr)
11338 ? that
11339 : std::shared_ptr<types::IFile>(
11340 new EnhancedFile<E>(
11341 that,
11342 enh
11343 )
11344 );
11345}
11346
11356template<typename E>
11357std::shared_ptr<types::IAnnotatedRelationshipElement> WrapAnnotatedRelationshipElement(
11358 const std::shared_ptr<types::IAnnotatedRelationshipElement>& that,
11359 const std::function<
11360 std::shared_ptr<E>(
11361 const std::shared_ptr<types::IClass>&
11362 )
11363 >& factory
11364) {
11365 // We assume that we already checked whether `that` has been enhanced
11366 // in the caller.
11367
11368 if (that->extensions().has_value()) {
11369 const std::vector<
11370 std::shared_ptr<types::IExtension>
11371 >& value(
11372 that->extensions().value()
11373 );
11374 const std::size_t size = value.size();
11375
11376 std::vector<
11377 std::shared_ptr<types::IExtension>
11378 > wrapped;
11379 wrapped.reserve(size);
11380
11381 for (
11382 const std::shared_ptr<types::IExtension>& item
11383 : value
11384 ) {
11385 wrapped.emplace_back(
11386 Wrap<E>(
11387 item,
11388 factory
11389 )
11390 );
11391 }
11392
11393 that->set_extensions(
11394 common::make_optional(
11395 std::move(wrapped)
11396 )
11397 );
11398 }
11399
11400 if (that->display_name().has_value()) {
11401 const std::vector<
11402 std::shared_ptr<types::ILangStringNameType>
11403 >& value(
11404 that->display_name().value()
11405 );
11406 const std::size_t size = value.size();
11407
11408 std::vector<
11409 std::shared_ptr<types::ILangStringNameType>
11410 > wrapped;
11411 wrapped.reserve(size);
11412
11413 for (
11414 const std::shared_ptr<types::ILangStringNameType>& item
11415 : value
11416 ) {
11417 wrapped.emplace_back(
11418 Wrap<E>(
11419 item,
11420 factory
11421 )
11422 );
11423 }
11424
11425 that->set_display_name(
11426 common::make_optional(
11427 std::move(wrapped)
11428 )
11429 );
11430 }
11431
11432 if (that->description().has_value()) {
11433 const std::vector<
11434 std::shared_ptr<types::ILangStringTextType>
11435 >& value(
11436 that->description().value()
11437 );
11438 const std::size_t size = value.size();
11439
11440 std::vector<
11441 std::shared_ptr<types::ILangStringTextType>
11442 > wrapped;
11443 wrapped.reserve(size);
11444
11445 for (
11446 const std::shared_ptr<types::ILangStringTextType>& item
11447 : value
11448 ) {
11449 wrapped.emplace_back(
11450 Wrap<E>(
11451 item,
11452 factory
11453 )
11454 );
11455 }
11456
11457 that->set_description(
11458 common::make_optional(
11459 std::move(wrapped)
11460 )
11461 );
11462 }
11463
11464 if (that->semantic_id().has_value()) {
11465 const std::shared_ptr<types::IReference>& value(
11466 that->semantic_id().value()
11467 );
11468
11469 std::shared_ptr<
11471 > wrapped(
11472 Wrap<E>(
11473 value,
11474 factory
11475 )
11476 );
11477
11478 that->set_semantic_id(
11479 common::make_optional(
11480 std::move(wrapped)
11481 )
11482 );
11483 }
11484
11485 if (that->supplemental_semantic_ids().has_value()) {
11486 const std::vector<
11487 std::shared_ptr<types::IReference>
11488 >& value(
11489 that->supplemental_semantic_ids().value()
11490 );
11491 const std::size_t size = value.size();
11492
11493 std::vector<
11494 std::shared_ptr<types::IReference>
11495 > wrapped;
11496 wrapped.reserve(size);
11497
11498 for (
11499 const std::shared_ptr<types::IReference>& item
11500 : value
11501 ) {
11502 wrapped.emplace_back(
11503 Wrap<E>(
11504 item,
11505 factory
11506 )
11507 );
11508 }
11509
11510 that->set_supplemental_semantic_ids(
11511 common::make_optional(
11512 std::move(wrapped)
11513 )
11514 );
11515 }
11516
11517 if (that->qualifiers().has_value()) {
11518 const std::vector<
11519 std::shared_ptr<types::IQualifier>
11520 >& value(
11521 that->qualifiers().value()
11522 );
11523 const std::size_t size = value.size();
11524
11525 std::vector<
11526 std::shared_ptr<types::IQualifier>
11527 > wrapped;
11528 wrapped.reserve(size);
11529
11530 for (
11531 const std::shared_ptr<types::IQualifier>& item
11532 : value
11533 ) {
11534 wrapped.emplace_back(
11535 Wrap<E>(
11536 item,
11537 factory
11538 )
11539 );
11540 }
11541
11542 that->set_qualifiers(
11543 common::make_optional(
11544 std::move(wrapped)
11545 )
11546 );
11547 }
11548
11549 if (that->embedded_data_specifications().has_value()) {
11550 const std::vector<
11551 std::shared_ptr<types::IEmbeddedDataSpecification>
11552 >& value(
11553 that->embedded_data_specifications().value()
11554 );
11555 const std::size_t size = value.size();
11556
11557 std::vector<
11558 std::shared_ptr<types::IEmbeddedDataSpecification>
11559 > wrapped;
11560 wrapped.reserve(size);
11561
11562 for (
11563 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11564 : value
11565 ) {
11566 wrapped.emplace_back(
11567 Wrap<E>(
11568 item,
11569 factory
11570 )
11571 );
11572 }
11573
11574 that->set_embedded_data_specifications(
11575 common::make_optional(
11576 std::move(wrapped)
11577 )
11578 );
11579 }
11580
11581 that->set_first(
11582 Wrap<E>(
11583 that->first(),
11584 factory
11585 )
11586 );
11587
11588 that->set_second(
11589 Wrap<E>(
11590 that->second(),
11591 factory
11592 )
11593 );
11594
11595 if (that->annotations().has_value()) {
11596 const std::vector<
11597 std::shared_ptr<types::IDataElement>
11598 >& value(
11599 that->annotations().value()
11600 );
11601 const std::size_t size = value.size();
11602
11603 std::vector<
11604 std::shared_ptr<types::IDataElement>
11605 > wrapped;
11606 wrapped.reserve(size);
11607
11608 for (
11609 const std::shared_ptr<types::IDataElement>& item
11610 : value
11611 ) {
11612 wrapped.emplace_back(
11613 Wrap<E>(
11614 item,
11615 factory
11616 )
11617 );
11618 }
11619
11620 that->set_annotations(
11621 common::make_optional(
11622 std::move(wrapped)
11623 )
11624 );
11625 }
11626
11627 std::shared_ptr<E> enh(
11628 factory(that)
11629 );
11630 return (enh == nullptr)
11631 ? that
11632 : std::shared_ptr<types::IAnnotatedRelationshipElement>(
11633 new EnhancedAnnotatedRelationshipElement<E>(
11634 that,
11635 enh
11636 )
11637 );
11638}
11639
11649template<typename E>
11650std::shared_ptr<types::IEntity> WrapEntity(
11651 const std::shared_ptr<types::IEntity>& that,
11652 const std::function<
11653 std::shared_ptr<E>(
11654 const std::shared_ptr<types::IClass>&
11655 )
11656 >& factory
11657) {
11658 // We assume that we already checked whether `that` has been enhanced
11659 // in the caller.
11660
11661 if (that->extensions().has_value()) {
11662 const std::vector<
11663 std::shared_ptr<types::IExtension>
11664 >& value(
11665 that->extensions().value()
11666 );
11667 const std::size_t size = value.size();
11668
11669 std::vector<
11670 std::shared_ptr<types::IExtension>
11671 > wrapped;
11672 wrapped.reserve(size);
11673
11674 for (
11675 const std::shared_ptr<types::IExtension>& item
11676 : value
11677 ) {
11678 wrapped.emplace_back(
11679 Wrap<E>(
11680 item,
11681 factory
11682 )
11683 );
11684 }
11685
11686 that->set_extensions(
11687 common::make_optional(
11688 std::move(wrapped)
11689 )
11690 );
11691 }
11692
11693 if (that->display_name().has_value()) {
11694 const std::vector<
11695 std::shared_ptr<types::ILangStringNameType>
11696 >& value(
11697 that->display_name().value()
11698 );
11699 const std::size_t size = value.size();
11700
11701 std::vector<
11702 std::shared_ptr<types::ILangStringNameType>
11703 > wrapped;
11704 wrapped.reserve(size);
11705
11706 for (
11707 const std::shared_ptr<types::ILangStringNameType>& item
11708 : value
11709 ) {
11710 wrapped.emplace_back(
11711 Wrap<E>(
11712 item,
11713 factory
11714 )
11715 );
11716 }
11717
11718 that->set_display_name(
11719 common::make_optional(
11720 std::move(wrapped)
11721 )
11722 );
11723 }
11724
11725 if (that->description().has_value()) {
11726 const std::vector<
11727 std::shared_ptr<types::ILangStringTextType>
11728 >& value(
11729 that->description().value()
11730 );
11731 const std::size_t size = value.size();
11732
11733 std::vector<
11734 std::shared_ptr<types::ILangStringTextType>
11735 > wrapped;
11736 wrapped.reserve(size);
11737
11738 for (
11739 const std::shared_ptr<types::ILangStringTextType>& item
11740 : value
11741 ) {
11742 wrapped.emplace_back(
11743 Wrap<E>(
11744 item,
11745 factory
11746 )
11747 );
11748 }
11749
11750 that->set_description(
11751 common::make_optional(
11752 std::move(wrapped)
11753 )
11754 );
11755 }
11756
11757 if (that->semantic_id().has_value()) {
11758 const std::shared_ptr<types::IReference>& value(
11759 that->semantic_id().value()
11760 );
11761
11762 std::shared_ptr<
11764 > wrapped(
11765 Wrap<E>(
11766 value,
11767 factory
11768 )
11769 );
11770
11771 that->set_semantic_id(
11772 common::make_optional(
11773 std::move(wrapped)
11774 )
11775 );
11776 }
11777
11778 if (that->supplemental_semantic_ids().has_value()) {
11779 const std::vector<
11780 std::shared_ptr<types::IReference>
11781 >& value(
11782 that->supplemental_semantic_ids().value()
11783 );
11784 const std::size_t size = value.size();
11785
11786 std::vector<
11787 std::shared_ptr<types::IReference>
11788 > wrapped;
11789 wrapped.reserve(size);
11790
11791 for (
11792 const std::shared_ptr<types::IReference>& item
11793 : value
11794 ) {
11795 wrapped.emplace_back(
11796 Wrap<E>(
11797 item,
11798 factory
11799 )
11800 );
11801 }
11802
11803 that->set_supplemental_semantic_ids(
11804 common::make_optional(
11805 std::move(wrapped)
11806 )
11807 );
11808 }
11809
11810 if (that->qualifiers().has_value()) {
11811 const std::vector<
11812 std::shared_ptr<types::IQualifier>
11813 >& value(
11814 that->qualifiers().value()
11815 );
11816 const std::size_t size = value.size();
11817
11818 std::vector<
11819 std::shared_ptr<types::IQualifier>
11820 > wrapped;
11821 wrapped.reserve(size);
11822
11823 for (
11824 const std::shared_ptr<types::IQualifier>& item
11825 : value
11826 ) {
11827 wrapped.emplace_back(
11828 Wrap<E>(
11829 item,
11830 factory
11831 )
11832 );
11833 }
11834
11835 that->set_qualifiers(
11836 common::make_optional(
11837 std::move(wrapped)
11838 )
11839 );
11840 }
11841
11842 if (that->embedded_data_specifications().has_value()) {
11843 const std::vector<
11844 std::shared_ptr<types::IEmbeddedDataSpecification>
11845 >& value(
11846 that->embedded_data_specifications().value()
11847 );
11848 const std::size_t size = value.size();
11849
11850 std::vector<
11851 std::shared_ptr<types::IEmbeddedDataSpecification>
11852 > wrapped;
11853 wrapped.reserve(size);
11854
11855 for (
11856 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
11857 : value
11858 ) {
11859 wrapped.emplace_back(
11860 Wrap<E>(
11861 item,
11862 factory
11863 )
11864 );
11865 }
11866
11867 that->set_embedded_data_specifications(
11868 common::make_optional(
11869 std::move(wrapped)
11870 )
11871 );
11872 }
11873
11874 if (that->statements().has_value()) {
11875 const std::vector<
11876 std::shared_ptr<types::ISubmodelElement>
11877 >& value(
11878 that->statements().value()
11879 );
11880 const std::size_t size = value.size();
11881
11882 std::vector<
11883 std::shared_ptr<types::ISubmodelElement>
11884 > wrapped;
11885 wrapped.reserve(size);
11886
11887 for (
11888 const std::shared_ptr<types::ISubmodelElement>& item
11889 : value
11890 ) {
11891 wrapped.emplace_back(
11892 Wrap<E>(
11893 item,
11894 factory
11895 )
11896 );
11897 }
11898
11899 that->set_statements(
11900 common::make_optional(
11901 std::move(wrapped)
11902 )
11903 );
11904 }
11905
11906 if (that->specific_asset_ids().has_value()) {
11907 const std::vector<
11908 std::shared_ptr<types::ISpecificAssetId>
11909 >& value(
11910 that->specific_asset_ids().value()
11911 );
11912 const std::size_t size = value.size();
11913
11914 std::vector<
11915 std::shared_ptr<types::ISpecificAssetId>
11916 > wrapped;
11917 wrapped.reserve(size);
11918
11919 for (
11920 const std::shared_ptr<types::ISpecificAssetId>& item
11921 : value
11922 ) {
11923 wrapped.emplace_back(
11924 Wrap<E>(
11925 item,
11926 factory
11927 )
11928 );
11929 }
11930
11931 that->set_specific_asset_ids(
11932 common::make_optional(
11933 std::move(wrapped)
11934 )
11935 );
11936 }
11937
11938 std::shared_ptr<E> enh(
11939 factory(that)
11940 );
11941 return (enh == nullptr)
11942 ? that
11943 : std::shared_ptr<types::IEntity>(
11944 new EnhancedEntity<E>(
11945 that,
11946 enh
11947 )
11948 );
11949}
11950
11960template<typename E>
11961std::shared_ptr<types::IEventPayload> WrapEventPayload(
11962 const std::shared_ptr<types::IEventPayload>& that,
11963 const std::function<
11964 std::shared_ptr<E>(
11965 const std::shared_ptr<types::IClass>&
11966 )
11967 >& factory
11968) {
11969 // We assume that we already checked whether `that` has been enhanced
11970 // in the caller.
11971
11972 that->set_source(
11973 Wrap<E>(
11974 that->source(),
11975 factory
11976 )
11977 );
11978
11979 if (that->source_semantic_id().has_value()) {
11980 const std::shared_ptr<types::IReference>& value(
11981 that->source_semantic_id().value()
11982 );
11983
11984 std::shared_ptr<
11986 > wrapped(
11987 Wrap<E>(
11988 value,
11989 factory
11990 )
11991 );
11992
11993 that->set_source_semantic_id(
11994 common::make_optional(
11995 std::move(wrapped)
11996 )
11997 );
11998 }
11999
12000 that->set_observable_reference(
12001 Wrap<E>(
12002 that->observable_reference(),
12003 factory
12004 )
12005 );
12006
12007 if (that->observable_semantic_id().has_value()) {
12008 const std::shared_ptr<types::IReference>& value(
12009 that->observable_semantic_id().value()
12010 );
12011
12012 std::shared_ptr<
12014 > wrapped(
12015 Wrap<E>(
12016 value,
12017 factory
12018 )
12019 );
12020
12021 that->set_observable_semantic_id(
12022 common::make_optional(
12023 std::move(wrapped)
12024 )
12025 );
12026 }
12027
12028 if (that->subject_id().has_value()) {
12029 const std::shared_ptr<types::IReference>& value(
12030 that->subject_id().value()
12031 );
12032
12033 std::shared_ptr<
12035 > wrapped(
12036 Wrap<E>(
12037 value,
12038 factory
12039 )
12040 );
12041
12042 that->set_subject_id(
12043 common::make_optional(
12044 std::move(wrapped)
12045 )
12046 );
12047 }
12048
12049 std::shared_ptr<E> enh(
12050 factory(that)
12051 );
12052 return (enh == nullptr)
12053 ? that
12054 : std::shared_ptr<types::IEventPayload>(
12055 new EnhancedEventPayload<E>(
12056 that,
12057 enh
12058 )
12059 );
12060}
12061
12071template<typename E>
12072std::shared_ptr<types::IBasicEventElement> WrapBasicEventElement(
12073 const std::shared_ptr<types::IBasicEventElement>& that,
12074 const std::function<
12075 std::shared_ptr<E>(
12076 const std::shared_ptr<types::IClass>&
12077 )
12078 >& factory
12079) {
12080 // We assume that we already checked whether `that` has been enhanced
12081 // in the caller.
12082
12083 if (that->extensions().has_value()) {
12084 const std::vector<
12085 std::shared_ptr<types::IExtension>
12086 >& value(
12087 that->extensions().value()
12088 );
12089 const std::size_t size = value.size();
12090
12091 std::vector<
12092 std::shared_ptr<types::IExtension>
12093 > wrapped;
12094 wrapped.reserve(size);
12095
12096 for (
12097 const std::shared_ptr<types::IExtension>& item
12098 : value
12099 ) {
12100 wrapped.emplace_back(
12101 Wrap<E>(
12102 item,
12103 factory
12104 )
12105 );
12106 }
12107
12108 that->set_extensions(
12109 common::make_optional(
12110 std::move(wrapped)
12111 )
12112 );
12113 }
12114
12115 if (that->display_name().has_value()) {
12116 const std::vector<
12117 std::shared_ptr<types::ILangStringNameType>
12118 >& value(
12119 that->display_name().value()
12120 );
12121 const std::size_t size = value.size();
12122
12123 std::vector<
12124 std::shared_ptr<types::ILangStringNameType>
12125 > wrapped;
12126 wrapped.reserve(size);
12127
12128 for (
12129 const std::shared_ptr<types::ILangStringNameType>& item
12130 : value
12131 ) {
12132 wrapped.emplace_back(
12133 Wrap<E>(
12134 item,
12135 factory
12136 )
12137 );
12138 }
12139
12140 that->set_display_name(
12141 common::make_optional(
12142 std::move(wrapped)
12143 )
12144 );
12145 }
12146
12147 if (that->description().has_value()) {
12148 const std::vector<
12149 std::shared_ptr<types::ILangStringTextType>
12150 >& value(
12151 that->description().value()
12152 );
12153 const std::size_t size = value.size();
12154
12155 std::vector<
12156 std::shared_ptr<types::ILangStringTextType>
12157 > wrapped;
12158 wrapped.reserve(size);
12159
12160 for (
12161 const std::shared_ptr<types::ILangStringTextType>& item
12162 : value
12163 ) {
12164 wrapped.emplace_back(
12165 Wrap<E>(
12166 item,
12167 factory
12168 )
12169 );
12170 }
12171
12172 that->set_description(
12173 common::make_optional(
12174 std::move(wrapped)
12175 )
12176 );
12177 }
12178
12179 if (that->semantic_id().has_value()) {
12180 const std::shared_ptr<types::IReference>& value(
12181 that->semantic_id().value()
12182 );
12183
12184 std::shared_ptr<
12186 > wrapped(
12187 Wrap<E>(
12188 value,
12189 factory
12190 )
12191 );
12192
12193 that->set_semantic_id(
12194 common::make_optional(
12195 std::move(wrapped)
12196 )
12197 );
12198 }
12199
12200 if (that->supplemental_semantic_ids().has_value()) {
12201 const std::vector<
12202 std::shared_ptr<types::IReference>
12203 >& value(
12204 that->supplemental_semantic_ids().value()
12205 );
12206 const std::size_t size = value.size();
12207
12208 std::vector<
12209 std::shared_ptr<types::IReference>
12210 > wrapped;
12211 wrapped.reserve(size);
12212
12213 for (
12214 const std::shared_ptr<types::IReference>& item
12215 : value
12216 ) {
12217 wrapped.emplace_back(
12218 Wrap<E>(
12219 item,
12220 factory
12221 )
12222 );
12223 }
12224
12225 that->set_supplemental_semantic_ids(
12226 common::make_optional(
12227 std::move(wrapped)
12228 )
12229 );
12230 }
12231
12232 if (that->qualifiers().has_value()) {
12233 const std::vector<
12234 std::shared_ptr<types::IQualifier>
12235 >& value(
12236 that->qualifiers().value()
12237 );
12238 const std::size_t size = value.size();
12239
12240 std::vector<
12241 std::shared_ptr<types::IQualifier>
12242 > wrapped;
12243 wrapped.reserve(size);
12244
12245 for (
12246 const std::shared_ptr<types::IQualifier>& item
12247 : value
12248 ) {
12249 wrapped.emplace_back(
12250 Wrap<E>(
12251 item,
12252 factory
12253 )
12254 );
12255 }
12256
12257 that->set_qualifiers(
12258 common::make_optional(
12259 std::move(wrapped)
12260 )
12261 );
12262 }
12263
12264 if (that->embedded_data_specifications().has_value()) {
12265 const std::vector<
12266 std::shared_ptr<types::IEmbeddedDataSpecification>
12267 >& value(
12268 that->embedded_data_specifications().value()
12269 );
12270 const std::size_t size = value.size();
12271
12272 std::vector<
12273 std::shared_ptr<types::IEmbeddedDataSpecification>
12274 > wrapped;
12275 wrapped.reserve(size);
12276
12277 for (
12278 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12279 : value
12280 ) {
12281 wrapped.emplace_back(
12282 Wrap<E>(
12283 item,
12284 factory
12285 )
12286 );
12287 }
12288
12289 that->set_embedded_data_specifications(
12290 common::make_optional(
12291 std::move(wrapped)
12292 )
12293 );
12294 }
12295
12296 that->set_observed(
12297 Wrap<E>(
12298 that->observed(),
12299 factory
12300 )
12301 );
12302
12303 if (that->message_broker().has_value()) {
12304 const std::shared_ptr<types::IReference>& value(
12305 that->message_broker().value()
12306 );
12307
12308 std::shared_ptr<
12310 > wrapped(
12311 Wrap<E>(
12312 value,
12313 factory
12314 )
12315 );
12316
12317 that->set_message_broker(
12318 common::make_optional(
12319 std::move(wrapped)
12320 )
12321 );
12322 }
12323
12324 std::shared_ptr<E> enh(
12325 factory(that)
12326 );
12327 return (enh == nullptr)
12328 ? that
12329 : std::shared_ptr<types::IBasicEventElement>(
12330 new EnhancedBasicEventElement<E>(
12331 that,
12332 enh
12333 )
12334 );
12335}
12336
12346template<typename E>
12347std::shared_ptr<types::IOperation> WrapOperation(
12348 const std::shared_ptr<types::IOperation>& that,
12349 const std::function<
12350 std::shared_ptr<E>(
12351 const std::shared_ptr<types::IClass>&
12352 )
12353 >& factory
12354) {
12355 // We assume that we already checked whether `that` has been enhanced
12356 // in the caller.
12357
12358 if (that->extensions().has_value()) {
12359 const std::vector<
12360 std::shared_ptr<types::IExtension>
12361 >& value(
12362 that->extensions().value()
12363 );
12364 const std::size_t size = value.size();
12365
12366 std::vector<
12367 std::shared_ptr<types::IExtension>
12368 > wrapped;
12369 wrapped.reserve(size);
12370
12371 for (
12372 const std::shared_ptr<types::IExtension>& item
12373 : value
12374 ) {
12375 wrapped.emplace_back(
12376 Wrap<E>(
12377 item,
12378 factory
12379 )
12380 );
12381 }
12382
12383 that->set_extensions(
12384 common::make_optional(
12385 std::move(wrapped)
12386 )
12387 );
12388 }
12389
12390 if (that->display_name().has_value()) {
12391 const std::vector<
12392 std::shared_ptr<types::ILangStringNameType>
12393 >& value(
12394 that->display_name().value()
12395 );
12396 const std::size_t size = value.size();
12397
12398 std::vector<
12399 std::shared_ptr<types::ILangStringNameType>
12400 > wrapped;
12401 wrapped.reserve(size);
12402
12403 for (
12404 const std::shared_ptr<types::ILangStringNameType>& item
12405 : value
12406 ) {
12407 wrapped.emplace_back(
12408 Wrap<E>(
12409 item,
12410 factory
12411 )
12412 );
12413 }
12414
12415 that->set_display_name(
12416 common::make_optional(
12417 std::move(wrapped)
12418 )
12419 );
12420 }
12421
12422 if (that->description().has_value()) {
12423 const std::vector<
12424 std::shared_ptr<types::ILangStringTextType>
12425 >& value(
12426 that->description().value()
12427 );
12428 const std::size_t size = value.size();
12429
12430 std::vector<
12431 std::shared_ptr<types::ILangStringTextType>
12432 > wrapped;
12433 wrapped.reserve(size);
12434
12435 for (
12436 const std::shared_ptr<types::ILangStringTextType>& item
12437 : value
12438 ) {
12439 wrapped.emplace_back(
12440 Wrap<E>(
12441 item,
12442 factory
12443 )
12444 );
12445 }
12446
12447 that->set_description(
12448 common::make_optional(
12449 std::move(wrapped)
12450 )
12451 );
12452 }
12453
12454 if (that->semantic_id().has_value()) {
12455 const std::shared_ptr<types::IReference>& value(
12456 that->semantic_id().value()
12457 );
12458
12459 std::shared_ptr<
12461 > wrapped(
12462 Wrap<E>(
12463 value,
12464 factory
12465 )
12466 );
12467
12468 that->set_semantic_id(
12469 common::make_optional(
12470 std::move(wrapped)
12471 )
12472 );
12473 }
12474
12475 if (that->supplemental_semantic_ids().has_value()) {
12476 const std::vector<
12477 std::shared_ptr<types::IReference>
12478 >& value(
12479 that->supplemental_semantic_ids().value()
12480 );
12481 const std::size_t size = value.size();
12482
12483 std::vector<
12484 std::shared_ptr<types::IReference>
12485 > wrapped;
12486 wrapped.reserve(size);
12487
12488 for (
12489 const std::shared_ptr<types::IReference>& item
12490 : value
12491 ) {
12492 wrapped.emplace_back(
12493 Wrap<E>(
12494 item,
12495 factory
12496 )
12497 );
12498 }
12499
12500 that->set_supplemental_semantic_ids(
12501 common::make_optional(
12502 std::move(wrapped)
12503 )
12504 );
12505 }
12506
12507 if (that->qualifiers().has_value()) {
12508 const std::vector<
12509 std::shared_ptr<types::IQualifier>
12510 >& value(
12511 that->qualifiers().value()
12512 );
12513 const std::size_t size = value.size();
12514
12515 std::vector<
12516 std::shared_ptr<types::IQualifier>
12517 > wrapped;
12518 wrapped.reserve(size);
12519
12520 for (
12521 const std::shared_ptr<types::IQualifier>& item
12522 : value
12523 ) {
12524 wrapped.emplace_back(
12525 Wrap<E>(
12526 item,
12527 factory
12528 )
12529 );
12530 }
12531
12532 that->set_qualifiers(
12533 common::make_optional(
12534 std::move(wrapped)
12535 )
12536 );
12537 }
12538
12539 if (that->embedded_data_specifications().has_value()) {
12540 const std::vector<
12541 std::shared_ptr<types::IEmbeddedDataSpecification>
12542 >& value(
12543 that->embedded_data_specifications().value()
12544 );
12545 const std::size_t size = value.size();
12546
12547 std::vector<
12548 std::shared_ptr<types::IEmbeddedDataSpecification>
12549 > wrapped;
12550 wrapped.reserve(size);
12551
12552 for (
12553 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12554 : value
12555 ) {
12556 wrapped.emplace_back(
12557 Wrap<E>(
12558 item,
12559 factory
12560 )
12561 );
12562 }
12563
12564 that->set_embedded_data_specifications(
12565 common::make_optional(
12566 std::move(wrapped)
12567 )
12568 );
12569 }
12570
12571 if (that->input_variables().has_value()) {
12572 const std::vector<
12573 std::shared_ptr<types::IOperationVariable>
12574 >& value(
12575 that->input_variables().value()
12576 );
12577 const std::size_t size = value.size();
12578
12579 std::vector<
12580 std::shared_ptr<types::IOperationVariable>
12581 > wrapped;
12582 wrapped.reserve(size);
12583
12584 for (
12585 const std::shared_ptr<types::IOperationVariable>& item
12586 : value
12587 ) {
12588 wrapped.emplace_back(
12589 Wrap<E>(
12590 item,
12591 factory
12592 )
12593 );
12594 }
12595
12596 that->set_input_variables(
12597 common::make_optional(
12598 std::move(wrapped)
12599 )
12600 );
12601 }
12602
12603 if (that->output_variables().has_value()) {
12604 const std::vector<
12605 std::shared_ptr<types::IOperationVariable>
12606 >& value(
12607 that->output_variables().value()
12608 );
12609 const std::size_t size = value.size();
12610
12611 std::vector<
12612 std::shared_ptr<types::IOperationVariable>
12613 > wrapped;
12614 wrapped.reserve(size);
12615
12616 for (
12617 const std::shared_ptr<types::IOperationVariable>& item
12618 : value
12619 ) {
12620 wrapped.emplace_back(
12621 Wrap<E>(
12622 item,
12623 factory
12624 )
12625 );
12626 }
12627
12628 that->set_output_variables(
12629 common::make_optional(
12630 std::move(wrapped)
12631 )
12632 );
12633 }
12634
12635 if (that->inoutput_variables().has_value()) {
12636 const std::vector<
12637 std::shared_ptr<types::IOperationVariable>
12638 >& value(
12639 that->inoutput_variables().value()
12640 );
12641 const std::size_t size = value.size();
12642
12643 std::vector<
12644 std::shared_ptr<types::IOperationVariable>
12645 > wrapped;
12646 wrapped.reserve(size);
12647
12648 for (
12649 const std::shared_ptr<types::IOperationVariable>& item
12650 : value
12651 ) {
12652 wrapped.emplace_back(
12653 Wrap<E>(
12654 item,
12655 factory
12656 )
12657 );
12658 }
12659
12660 that->set_inoutput_variables(
12661 common::make_optional(
12662 std::move(wrapped)
12663 )
12664 );
12665 }
12666
12667 std::shared_ptr<E> enh(
12668 factory(that)
12669 );
12670 return (enh == nullptr)
12671 ? that
12672 : std::shared_ptr<types::IOperation>(
12673 new EnhancedOperation<E>(
12674 that,
12675 enh
12676 )
12677 );
12678}
12679
12689template<typename E>
12690std::shared_ptr<types::IOperationVariable> WrapOperationVariable(
12691 const std::shared_ptr<types::IOperationVariable>& that,
12692 const std::function<
12693 std::shared_ptr<E>(
12694 const std::shared_ptr<types::IClass>&
12695 )
12696 >& factory
12697) {
12698 // We assume that we already checked whether `that` has been enhanced
12699 // in the caller.
12700
12701 that->set_value(
12702 Wrap<E>(
12703 that->value(),
12704 factory
12705 )
12706 );
12707
12708 std::shared_ptr<E> enh(
12709 factory(that)
12710 );
12711 return (enh == nullptr)
12712 ? that
12713 : std::shared_ptr<types::IOperationVariable>(
12714 new EnhancedOperationVariable<E>(
12715 that,
12716 enh
12717 )
12718 );
12719}
12720
12730template<typename E>
12731std::shared_ptr<types::ICapability> WrapCapability(
12732 const std::shared_ptr<types::ICapability>& that,
12733 const std::function<
12734 std::shared_ptr<E>(
12735 const std::shared_ptr<types::IClass>&
12736 )
12737 >& factory
12738) {
12739 // We assume that we already checked whether `that` has been enhanced
12740 // in the caller.
12741
12742 if (that->extensions().has_value()) {
12743 const std::vector<
12744 std::shared_ptr<types::IExtension>
12745 >& value(
12746 that->extensions().value()
12747 );
12748 const std::size_t size = value.size();
12749
12750 std::vector<
12751 std::shared_ptr<types::IExtension>
12752 > wrapped;
12753 wrapped.reserve(size);
12754
12755 for (
12756 const std::shared_ptr<types::IExtension>& item
12757 : value
12758 ) {
12759 wrapped.emplace_back(
12760 Wrap<E>(
12761 item,
12762 factory
12763 )
12764 );
12765 }
12766
12767 that->set_extensions(
12768 common::make_optional(
12769 std::move(wrapped)
12770 )
12771 );
12772 }
12773
12774 if (that->display_name().has_value()) {
12775 const std::vector<
12776 std::shared_ptr<types::ILangStringNameType>
12777 >& value(
12778 that->display_name().value()
12779 );
12780 const std::size_t size = value.size();
12781
12782 std::vector<
12783 std::shared_ptr<types::ILangStringNameType>
12784 > wrapped;
12785 wrapped.reserve(size);
12786
12787 for (
12788 const std::shared_ptr<types::ILangStringNameType>& item
12789 : value
12790 ) {
12791 wrapped.emplace_back(
12792 Wrap<E>(
12793 item,
12794 factory
12795 )
12796 );
12797 }
12798
12799 that->set_display_name(
12800 common::make_optional(
12801 std::move(wrapped)
12802 )
12803 );
12804 }
12805
12806 if (that->description().has_value()) {
12807 const std::vector<
12808 std::shared_ptr<types::ILangStringTextType>
12809 >& value(
12810 that->description().value()
12811 );
12812 const std::size_t size = value.size();
12813
12814 std::vector<
12815 std::shared_ptr<types::ILangStringTextType>
12816 > wrapped;
12817 wrapped.reserve(size);
12818
12819 for (
12820 const std::shared_ptr<types::ILangStringTextType>& item
12821 : value
12822 ) {
12823 wrapped.emplace_back(
12824 Wrap<E>(
12825 item,
12826 factory
12827 )
12828 );
12829 }
12830
12831 that->set_description(
12832 common::make_optional(
12833 std::move(wrapped)
12834 )
12835 );
12836 }
12837
12838 if (that->semantic_id().has_value()) {
12839 const std::shared_ptr<types::IReference>& value(
12840 that->semantic_id().value()
12841 );
12842
12843 std::shared_ptr<
12845 > wrapped(
12846 Wrap<E>(
12847 value,
12848 factory
12849 )
12850 );
12851
12852 that->set_semantic_id(
12853 common::make_optional(
12854 std::move(wrapped)
12855 )
12856 );
12857 }
12858
12859 if (that->supplemental_semantic_ids().has_value()) {
12860 const std::vector<
12861 std::shared_ptr<types::IReference>
12862 >& value(
12863 that->supplemental_semantic_ids().value()
12864 );
12865 const std::size_t size = value.size();
12866
12867 std::vector<
12868 std::shared_ptr<types::IReference>
12869 > wrapped;
12870 wrapped.reserve(size);
12871
12872 for (
12873 const std::shared_ptr<types::IReference>& item
12874 : value
12875 ) {
12876 wrapped.emplace_back(
12877 Wrap<E>(
12878 item,
12879 factory
12880 )
12881 );
12882 }
12883
12884 that->set_supplemental_semantic_ids(
12885 common::make_optional(
12886 std::move(wrapped)
12887 )
12888 );
12889 }
12890
12891 if (that->qualifiers().has_value()) {
12892 const std::vector<
12893 std::shared_ptr<types::IQualifier>
12894 >& value(
12895 that->qualifiers().value()
12896 );
12897 const std::size_t size = value.size();
12898
12899 std::vector<
12900 std::shared_ptr<types::IQualifier>
12901 > wrapped;
12902 wrapped.reserve(size);
12903
12904 for (
12905 const std::shared_ptr<types::IQualifier>& item
12906 : value
12907 ) {
12908 wrapped.emplace_back(
12909 Wrap<E>(
12910 item,
12911 factory
12912 )
12913 );
12914 }
12915
12916 that->set_qualifiers(
12917 common::make_optional(
12918 std::move(wrapped)
12919 )
12920 );
12921 }
12922
12923 if (that->embedded_data_specifications().has_value()) {
12924 const std::vector<
12925 std::shared_ptr<types::IEmbeddedDataSpecification>
12926 >& value(
12927 that->embedded_data_specifications().value()
12928 );
12929 const std::size_t size = value.size();
12930
12931 std::vector<
12932 std::shared_ptr<types::IEmbeddedDataSpecification>
12933 > wrapped;
12934 wrapped.reserve(size);
12935
12936 for (
12937 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
12938 : value
12939 ) {
12940 wrapped.emplace_back(
12941 Wrap<E>(
12942 item,
12943 factory
12944 )
12945 );
12946 }
12947
12948 that->set_embedded_data_specifications(
12949 common::make_optional(
12950 std::move(wrapped)
12951 )
12952 );
12953 }
12954
12955 std::shared_ptr<E> enh(
12956 factory(that)
12957 );
12958 return (enh == nullptr)
12959 ? that
12960 : std::shared_ptr<types::ICapability>(
12961 new EnhancedCapability<E>(
12962 that,
12963 enh
12964 )
12965 );
12966}
12967
12977template<typename E>
12978std::shared_ptr<types::IConceptDescription> WrapConceptDescription(
12979 const std::shared_ptr<types::IConceptDescription>& that,
12980 const std::function<
12981 std::shared_ptr<E>(
12982 const std::shared_ptr<types::IClass>&
12983 )
12984 >& factory
12985) {
12986 // We assume that we already checked whether `that` has been enhanced
12987 // in the caller.
12988
12989 if (that->extensions().has_value()) {
12990 const std::vector<
12991 std::shared_ptr<types::IExtension>
12992 >& value(
12993 that->extensions().value()
12994 );
12995 const std::size_t size = value.size();
12996
12997 std::vector<
12998 std::shared_ptr<types::IExtension>
12999 > wrapped;
13000 wrapped.reserve(size);
13001
13002 for (
13003 const std::shared_ptr<types::IExtension>& item
13004 : value
13005 ) {
13006 wrapped.emplace_back(
13007 Wrap<E>(
13008 item,
13009 factory
13010 )
13011 );
13012 }
13013
13014 that->set_extensions(
13015 common::make_optional(
13016 std::move(wrapped)
13017 )
13018 );
13019 }
13020
13021 if (that->display_name().has_value()) {
13022 const std::vector<
13023 std::shared_ptr<types::ILangStringNameType>
13024 >& value(
13025 that->display_name().value()
13026 );
13027 const std::size_t size = value.size();
13028
13029 std::vector<
13030 std::shared_ptr<types::ILangStringNameType>
13031 > wrapped;
13032 wrapped.reserve(size);
13033
13034 for (
13035 const std::shared_ptr<types::ILangStringNameType>& item
13036 : value
13037 ) {
13038 wrapped.emplace_back(
13039 Wrap<E>(
13040 item,
13041 factory
13042 )
13043 );
13044 }
13045
13046 that->set_display_name(
13047 common::make_optional(
13048 std::move(wrapped)
13049 )
13050 );
13051 }
13052
13053 if (that->description().has_value()) {
13054 const std::vector<
13055 std::shared_ptr<types::ILangStringTextType>
13056 >& value(
13057 that->description().value()
13058 );
13059 const std::size_t size = value.size();
13060
13061 std::vector<
13062 std::shared_ptr<types::ILangStringTextType>
13063 > wrapped;
13064 wrapped.reserve(size);
13065
13066 for (
13067 const std::shared_ptr<types::ILangStringTextType>& item
13068 : value
13069 ) {
13070 wrapped.emplace_back(
13071 Wrap<E>(
13072 item,
13073 factory
13074 )
13075 );
13076 }
13077
13078 that->set_description(
13079 common::make_optional(
13080 std::move(wrapped)
13081 )
13082 );
13083 }
13084
13085 if (that->administration().has_value()) {
13086 const std::shared_ptr<types::IAdministrativeInformation>& value(
13087 that->administration().value()
13088 );
13089
13090 std::shared_ptr<
13092 > wrapped(
13093 Wrap<E>(
13094 value,
13095 factory
13096 )
13097 );
13098
13099 that->set_administration(
13100 common::make_optional(
13101 std::move(wrapped)
13102 )
13103 );
13104 }
13105
13106 if (that->embedded_data_specifications().has_value()) {
13107 const std::vector<
13108 std::shared_ptr<types::IEmbeddedDataSpecification>
13109 >& value(
13110 that->embedded_data_specifications().value()
13111 );
13112 const std::size_t size = value.size();
13113
13114 std::vector<
13115 std::shared_ptr<types::IEmbeddedDataSpecification>
13116 > wrapped;
13117 wrapped.reserve(size);
13118
13119 for (
13120 const std::shared_ptr<types::IEmbeddedDataSpecification>& item
13121 : value
13122 ) {
13123 wrapped.emplace_back(
13124 Wrap<E>(
13125 item,
13126 factory
13127 )
13128 );
13129 }
13130
13131 that->set_embedded_data_specifications(
13132 common::make_optional(
13133 std::move(wrapped)
13134 )
13135 );
13136 }
13137
13138 if (that->is_case_of().has_value()) {
13139 const std::vector<
13140 std::shared_ptr<types::IReference>
13141 >& value(
13142 that->is_case_of().value()
13143 );
13144 const std::size_t size = value.size();
13145
13146 std::vector<
13147 std::shared_ptr<types::IReference>
13148 > wrapped;
13149 wrapped.reserve(size);
13150
13151 for (
13152 const std::shared_ptr<types::IReference>& item
13153 : value
13154 ) {
13155 wrapped.emplace_back(
13156 Wrap<E>(
13157 item,
13158 factory
13159 )
13160 );
13161 }
13162
13163 that->set_is_case_of(
13164 common::make_optional(
13165 std::move(wrapped)
13166 )
13167 );
13168 }
13169
13170 std::shared_ptr<E> enh(
13171 factory(that)
13172 );
13173 return (enh == nullptr)
13174 ? that
13175 : std::shared_ptr<types::IConceptDescription>(
13176 new EnhancedConceptDescription<E>(
13177 that,
13178 enh
13179 )
13180 );
13181}
13182
13192template<typename E>
13193std::shared_ptr<types::IReference> WrapReference(
13194 const std::shared_ptr<types::IReference>& that,
13195 const std::function<
13196 std::shared_ptr<E>(
13197 const std::shared_ptr<types::IClass>&
13198 )
13199 >& factory
13200) {
13201 // We assume that we already checked whether `that` has been enhanced
13202 // in the caller.
13203
13204 if (that->referred_semantic_id().has_value()) {
13205 const std::shared_ptr<types::IReference>& value(
13206 that->referred_semantic_id().value()
13207 );
13208
13209 std::shared_ptr<
13211 > wrapped(
13212 Wrap<E>(
13213 value,
13214 factory
13215 )
13216 );
13217
13218 that->set_referred_semantic_id(
13219 common::make_optional(
13220 std::move(wrapped)
13221 )
13222 );
13223 }
13224
13225 {
13226 const std::vector<
13227 std::shared_ptr<types::IKey>
13228 >& value(
13229 that->keys()
13230 );
13231 const std::size_t size = value.size();
13232
13233 std::vector<
13234 std::shared_ptr<types::IKey>
13235 > wrapped;
13236 wrapped.reserve(size);
13237
13238 for (
13239 const std::shared_ptr<types::IKey>& item
13240 : value
13241 ) {
13242 wrapped.emplace_back(
13243 Wrap<E>(
13244 item,
13245 factory
13246 )
13247 );
13248 }
13249
13250 that->set_keys(
13251 std::move(wrapped)
13252 );
13253 }
13254
13255 std::shared_ptr<E> enh(
13256 factory(that)
13257 );
13258 return (enh == nullptr)
13259 ? that
13260 : std::shared_ptr<types::IReference>(
13261 new EnhancedReference<E>(
13262 that,
13263 enh
13264 )
13265 );
13266}
13267
13277template<typename E>
13278std::shared_ptr<types::IKey> WrapKey(
13279 const std::shared_ptr<types::IKey>& that,
13280 const std::function<
13281 std::shared_ptr<E>(
13282 const std::shared_ptr<types::IClass>&
13283 )
13284 >& factory
13285) {
13286 // We assume that we already checked whether `that` has been enhanced
13287 // in the caller.
13288
13289 // No properties to be recursively enhanced.
13290
13291 std::shared_ptr<E> enh(
13292 factory(that)
13293 );
13294 return (enh == nullptr)
13295 ? that
13296 : std::shared_ptr<types::IKey>(
13297 new EnhancedKey<E>(
13298 that,
13299 enh
13300 )
13301 );
13302}
13303
13313template<typename E>
13314std::shared_ptr<types::ILangStringNameType> WrapLangStringNameType(
13315 const std::shared_ptr<types::ILangStringNameType>& that,
13316 const std::function<
13317 std::shared_ptr<E>(
13318 const std::shared_ptr<types::IClass>&
13319 )
13320 >& factory
13321) {
13322 // We assume that we already checked whether `that` has been enhanced
13323 // in the caller.
13324
13325 // No properties to be recursively enhanced.
13326
13327 std::shared_ptr<E> enh(
13328 factory(that)
13329 );
13330 return (enh == nullptr)
13331 ? that
13332 : std::shared_ptr<types::ILangStringNameType>(
13333 new EnhancedLangStringNameType<E>(
13334 that,
13335 enh
13336 )
13337 );
13338}
13339
13349template<typename E>
13350std::shared_ptr<types::ILangStringTextType> WrapLangStringTextType(
13351 const std::shared_ptr<types::ILangStringTextType>& that,
13352 const std::function<
13353 std::shared_ptr<E>(
13354 const std::shared_ptr<types::IClass>&
13355 )
13356 >& factory
13357) {
13358 // We assume that we already checked whether `that` has been enhanced
13359 // in the caller.
13360
13361 // No properties to be recursively enhanced.
13362
13363 std::shared_ptr<E> enh(
13364 factory(that)
13365 );
13366 return (enh == nullptr)
13367 ? that
13368 : std::shared_ptr<types::ILangStringTextType>(
13369 new EnhancedLangStringTextType<E>(
13370 that,
13371 enh
13372 )
13373 );
13374}
13375
13385template<typename E>
13386std::shared_ptr<types::IEnvironment> WrapEnvironment(
13387 const std::shared_ptr<types::IEnvironment>& that,
13388 const std::function<
13389 std::shared_ptr<E>(
13390 const std::shared_ptr<types::IClass>&
13391 )
13392 >& factory
13393) {
13394 // We assume that we already checked whether `that` has been enhanced
13395 // in the caller.
13396
13397 if (that->asset_administration_shells().has_value()) {
13398 const std::vector<
13399 std::shared_ptr<types::IAssetAdministrationShell>
13400 >& value(
13401 that->asset_administration_shells().value()
13402 );
13403 const std::size_t size = value.size();
13404
13405 std::vector<
13406 std::shared_ptr<types::IAssetAdministrationShell>
13407 > wrapped;
13408 wrapped.reserve(size);
13409
13410 for (
13411 const std::shared_ptr<types::IAssetAdministrationShell>& item
13412 : value
13413 ) {
13414 wrapped.emplace_back(
13415 Wrap<E>(
13416 item,
13417 factory
13418 )
13419 );
13420 }
13421
13422 that->set_asset_administration_shells(
13423 common::make_optional(
13424 std::move(wrapped)
13425 )
13426 );
13427 }
13428
13429 if (that->submodels().has_value()) {
13430 const std::vector<
13431 std::shared_ptr<types::ISubmodel>
13432 >& value(
13433 that->submodels().value()
13434 );
13435 const std::size_t size = value.size();
13436
13437 std::vector<
13438 std::shared_ptr<types::ISubmodel>
13439 > wrapped;
13440 wrapped.reserve(size);
13441
13442 for (
13443 const std::shared_ptr<types::ISubmodel>& item
13444 : value
13445 ) {
13446 wrapped.emplace_back(
13447 Wrap<E>(
13448 item,
13449 factory
13450 )
13451 );
13452 }
13453
13454 that->set_submodels(
13455 common::make_optional(
13456 std::move(wrapped)
13457 )
13458 );
13459 }
13460
13461 if (that->concept_descriptions().has_value()) {
13462 const std::vector<
13463 std::shared_ptr<types::IConceptDescription>
13464 >& value(
13465 that->concept_descriptions().value()
13466 );
13467 const std::size_t size = value.size();
13468
13469 std::vector<
13470 std::shared_ptr<types::IConceptDescription>
13471 > wrapped;
13472 wrapped.reserve(size);
13473
13474 for (
13475 const std::shared_ptr<types::IConceptDescription>& item
13476 : value
13477 ) {
13478 wrapped.emplace_back(
13479 Wrap<E>(
13480 item,
13481 factory
13482 )
13483 );
13484 }
13485
13486 that->set_concept_descriptions(
13487 common::make_optional(
13488 std::move(wrapped)
13489 )
13490 );
13491 }
13492
13493 std::shared_ptr<E> enh(
13494 factory(that)
13495 );
13496 return (enh == nullptr)
13497 ? that
13498 : std::shared_ptr<types::IEnvironment>(
13499 new EnhancedEnvironment<E>(
13500 that,
13501 enh
13502 )
13503 );
13504}
13505
13515template<typename E>
13516std::shared_ptr<types::IEmbeddedDataSpecification> WrapEmbeddedDataSpecification(
13517 const std::shared_ptr<types::IEmbeddedDataSpecification>& that,
13518 const std::function<
13519 std::shared_ptr<E>(
13520 const std::shared_ptr<types::IClass>&
13521 )
13522 >& factory
13523) {
13524 // We assume that we already checked whether `that` has been enhanced
13525 // in the caller.
13526
13527 that->set_data_specification(
13528 Wrap<E>(
13529 that->data_specification(),
13530 factory
13531 )
13532 );
13533
13534 that->set_data_specification_content(
13535 Wrap<E>(
13536 that->data_specification_content(),
13537 factory
13538 )
13539 );
13540
13541 std::shared_ptr<E> enh(
13542 factory(that)
13543 );
13544 return (enh == nullptr)
13545 ? that
13546 : std::shared_ptr<types::IEmbeddedDataSpecification>(
13547 new EnhancedEmbeddedDataSpecification<E>(
13548 that,
13549 enh
13550 )
13551 );
13552}
13553
13563template<typename E>
13564std::shared_ptr<types::ILevelType> WrapLevelType(
13565 const std::shared_ptr<types::ILevelType>& that,
13566 const std::function<
13567 std::shared_ptr<E>(
13568 const std::shared_ptr<types::IClass>&
13569 )
13570 >& factory
13571) {
13572 // We assume that we already checked whether `that` has been enhanced
13573 // in the caller.
13574
13575 // No properties to be recursively enhanced.
13576
13577 std::shared_ptr<E> enh(
13578 factory(that)
13579 );
13580 return (enh == nullptr)
13581 ? that
13582 : std::shared_ptr<types::ILevelType>(
13583 new EnhancedLevelType<E>(
13584 that,
13585 enh
13586 )
13587 );
13588}
13589
13599template<typename E>
13600std::shared_ptr<types::IValueReferencePair> WrapValueReferencePair(
13601 const std::shared_ptr<types::IValueReferencePair>& that,
13602 const std::function<
13603 std::shared_ptr<E>(
13604 const std::shared_ptr<types::IClass>&
13605 )
13606 >& factory
13607) {
13608 // We assume that we already checked whether `that` has been enhanced
13609 // in the caller.
13610
13611 that->set_value_id(
13612 Wrap<E>(
13613 that->value_id(),
13614 factory
13615 )
13616 );
13617
13618 std::shared_ptr<E> enh(
13619 factory(that)
13620 );
13621 return (enh == nullptr)
13622 ? that
13623 : std::shared_ptr<types::IValueReferencePair>(
13624 new EnhancedValueReferencePair<E>(
13625 that,
13626 enh
13627 )
13628 );
13629}
13630
13640template<typename E>
13641std::shared_ptr<types::IValueList> WrapValueList(
13642 const std::shared_ptr<types::IValueList>& that,
13643 const std::function<
13644 std::shared_ptr<E>(
13645 const std::shared_ptr<types::IClass>&
13646 )
13647 >& factory
13648) {
13649 // We assume that we already checked whether `that` has been enhanced
13650 // in the caller.
13651
13652 {
13653 const std::vector<
13654 std::shared_ptr<types::IValueReferencePair>
13655 >& value(
13656 that->value_reference_pairs()
13657 );
13658 const std::size_t size = value.size();
13659
13660 std::vector<
13661 std::shared_ptr<types::IValueReferencePair>
13662 > wrapped;
13663 wrapped.reserve(size);
13664
13665 for (
13666 const std::shared_ptr<types::IValueReferencePair>& item
13667 : value
13668 ) {
13669 wrapped.emplace_back(
13670 Wrap<E>(
13671 item,
13672 factory
13673 )
13674 );
13675 }
13676
13677 that->set_value_reference_pairs(
13678 std::move(wrapped)
13679 );
13680 }
13681
13682 std::shared_ptr<E> enh(
13683 factory(that)
13684 );
13685 return (enh == nullptr)
13686 ? that
13687 : std::shared_ptr<types::IValueList>(
13688 new EnhancedValueList<E>(
13689 that,
13690 enh
13691 )
13692 );
13693}
13694
13704template<typename E>
13705std::shared_ptr<types::ILangStringPreferredNameTypeIec61360> WrapLangStringPreferredNameTypeIec61360(
13706 const std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>& that,
13707 const std::function<
13708 std::shared_ptr<E>(
13709 const std::shared_ptr<types::IClass>&
13710 )
13711 >& factory
13712) {
13713 // We assume that we already checked whether `that` has been enhanced
13714 // in the caller.
13715
13716 // No properties to be recursively enhanced.
13717
13718 std::shared_ptr<E> enh(
13719 factory(that)
13720 );
13721 return (enh == nullptr)
13722 ? that
13723 : std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>(
13724 new EnhancedLangStringPreferredNameTypeIec61360<E>(
13725 that,
13726 enh
13727 )
13728 );
13729}
13730
13740template<typename E>
13741std::shared_ptr<types::ILangStringShortNameTypeIec61360> WrapLangStringShortNameTypeIec61360(
13742 const std::shared_ptr<types::ILangStringShortNameTypeIec61360>& that,
13743 const std::function<
13744 std::shared_ptr<E>(
13745 const std::shared_ptr<types::IClass>&
13746 )
13747 >& factory
13748) {
13749 // We assume that we already checked whether `that` has been enhanced
13750 // in the caller.
13751
13752 // No properties to be recursively enhanced.
13753
13754 std::shared_ptr<E> enh(
13755 factory(that)
13756 );
13757 return (enh == nullptr)
13758 ? that
13759 : std::shared_ptr<types::ILangStringShortNameTypeIec61360>(
13760 new EnhancedLangStringShortNameTypeIec61360<E>(
13761 that,
13762 enh
13763 )
13764 );
13765}
13766
13776template<typename E>
13777std::shared_ptr<types::ILangStringDefinitionTypeIec61360> WrapLangStringDefinitionTypeIec61360(
13778 const std::shared_ptr<types::ILangStringDefinitionTypeIec61360>& that,
13779 const std::function<
13780 std::shared_ptr<E>(
13781 const std::shared_ptr<types::IClass>&
13782 )
13783 >& factory
13784) {
13785 // We assume that we already checked whether `that` has been enhanced
13786 // in the caller.
13787
13788 // No properties to be recursively enhanced.
13789
13790 std::shared_ptr<E> enh(
13791 factory(that)
13792 );
13793 return (enh == nullptr)
13794 ? that
13795 : std::shared_ptr<types::ILangStringDefinitionTypeIec61360>(
13796 new EnhancedLangStringDefinitionTypeIec61360<E>(
13797 that,
13798 enh
13799 )
13800 );
13801}
13802
13812template<typename E>
13813std::shared_ptr<types::IDataSpecificationIec61360> WrapDataSpecificationIec61360(
13814 const std::shared_ptr<types::IDataSpecificationIec61360>& that,
13815 const std::function<
13816 std::shared_ptr<E>(
13817 const std::shared_ptr<types::IClass>&
13818 )
13819 >& factory
13820) {
13821 // We assume that we already checked whether `that` has been enhanced
13822 // in the caller.
13823
13824 {
13825 const std::vector<
13826 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
13827 >& value(
13828 that->preferred_name()
13829 );
13830 const std::size_t size = value.size();
13831
13832 std::vector<
13833 std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>
13834 > wrapped;
13835 wrapped.reserve(size);
13836
13837 for (
13838 const std::shared_ptr<types::ILangStringPreferredNameTypeIec61360>& item
13839 : value
13840 ) {
13841 wrapped.emplace_back(
13842 Wrap<E>(
13843 item,
13844 factory
13845 )
13846 );
13847 }
13848
13849 that->set_preferred_name(
13850 std::move(wrapped)
13851 );
13852 }
13853
13854 if (that->short_name().has_value()) {
13855 const std::vector<
13856 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
13857 >& value(
13858 that->short_name().value()
13859 );
13860 const std::size_t size = value.size();
13861
13862 std::vector<
13863 std::shared_ptr<types::ILangStringShortNameTypeIec61360>
13864 > wrapped;
13865 wrapped.reserve(size);
13866
13867 for (
13868 const std::shared_ptr<types::ILangStringShortNameTypeIec61360>& item
13869 : value
13870 ) {
13871 wrapped.emplace_back(
13872 Wrap<E>(
13873 item,
13874 factory
13875 )
13876 );
13877 }
13878
13879 that->set_short_name(
13880 common::make_optional(
13881 std::move(wrapped)
13882 )
13883 );
13884 }
13885
13886 if (that->unit_id().has_value()) {
13887 const std::shared_ptr<types::IReference>& value(
13888 that->unit_id().value()
13889 );
13890
13891 std::shared_ptr<
13893 > wrapped(
13894 Wrap<E>(
13895 value,
13896 factory
13897 )
13898 );
13899
13900 that->set_unit_id(
13901 common::make_optional(
13902 std::move(wrapped)
13903 )
13904 );
13905 }
13906
13907 if (that->definition().has_value()) {
13908 const std::vector<
13909 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
13910 >& value(
13911 that->definition().value()
13912 );
13913 const std::size_t size = value.size();
13914
13915 std::vector<
13916 std::shared_ptr<types::ILangStringDefinitionTypeIec61360>
13917 > wrapped;
13918 wrapped.reserve(size);
13919
13920 for (
13921 const std::shared_ptr<types::ILangStringDefinitionTypeIec61360>& item
13922 : value
13923 ) {
13924 wrapped.emplace_back(
13925 Wrap<E>(
13926 item,
13927 factory
13928 )
13929 );
13930 }
13931
13932 that->set_definition(
13933 common::make_optional(
13934 std::move(wrapped)
13935 )
13936 );
13937 }
13938
13939 if (that->value_list().has_value()) {
13940 const std::shared_ptr<types::IValueList>& value(
13941 that->value_list().value()
13942 );
13943
13944 std::shared_ptr<
13946 > wrapped(
13947 Wrap<E>(
13948 value,
13949 factory
13950 )
13951 );
13952
13953 that->set_value_list(
13954 common::make_optional(
13955 std::move(wrapped)
13956 )
13957 );
13958 }
13959
13960 if (that->level_type().has_value()) {
13961 const std::shared_ptr<types::ILevelType>& value(
13962 that->level_type().value()
13963 );
13964
13965 std::shared_ptr<
13967 > wrapped(
13968 Wrap<E>(
13969 value,
13970 factory
13971 )
13972 );
13973
13974 that->set_level_type(
13975 common::make_optional(
13976 std::move(wrapped)
13977 )
13978 );
13979 }
13980
13981 std::shared_ptr<E> enh(
13982 factory(that)
13983 );
13984 return (enh == nullptr)
13985 ? that
13986 : std::shared_ptr<types::IDataSpecificationIec61360>(
13987 new EnhancedDataSpecificationIec61360<E>(
13988 that,
13989 enh
13990 )
13991 );
13992}
13993
14002template<
14003 typename E,
14004 typename T,
14005 typename std::enable_if<
14006 std::is_base_of<types::IClass, T>::value
14007 >::type* = nullptr
14008>
14009void AssertNotEnhanced(
14010 const std::shared_ptr<T>& that
14011) {
14012 std::shared_ptr<impl::IEnhanced<E> > enhanced(
14013 std::dynamic_pointer_cast<
14014 impl::IEnhanced<E>
14015 >(that)
14016 );
14017 if (enhanced != nullptr) {
14018 throw std::logic_error(
14020 "An instance of ",
14021 stringification::to_string(that->model_type()),
14022 " has been already wrapped."
14023 )
14024 );
14025 }
14026}
14027
14028} // namespace impl
14030
14046
14047template <typename E>
14048std::shared_ptr<
14051 const std::shared_ptr<
14053 >& that,
14054 const std::function<
14055 std::shared_ptr<E>(
14056 const std::shared_ptr<types::IClass>&
14057 )
14058 >& factory
14059) {
14060 impl::AssertNotEnhanced<
14061 E,
14063 >(that);
14064
14065 switch (that->model_type()) {
14067 return impl::WrapExtension<E>(
14068 std::dynamic_pointer_cast<
14070 >(that),
14071 factory
14072 );
14073 break;
14075 return impl::WrapAdministrativeInformation<E>(
14076 std::dynamic_pointer_cast<
14078 >(that),
14079 factory
14080 );
14081 break;
14083 return impl::WrapQualifier<E>(
14084 std::dynamic_pointer_cast<
14086 >(that),
14087 factory
14088 );
14089 break;
14091 return impl::WrapAssetAdministrationShell<E>(
14092 std::dynamic_pointer_cast<
14094 >(that),
14095 factory
14096 );
14097 break;
14099 return impl::WrapAssetInformation<E>(
14100 std::dynamic_pointer_cast<
14102 >(that),
14103 factory
14104 );
14105 break;
14107 return impl::WrapResource<E>(
14108 std::dynamic_pointer_cast<
14110 >(that),
14111 factory
14112 );
14113 break;
14115 return impl::WrapSpecificAssetId<E>(
14116 std::dynamic_pointer_cast<
14118 >(that),
14119 factory
14120 );
14121 break;
14123 return impl::WrapSubmodel<E>(
14124 std::dynamic_pointer_cast<
14126 >(that),
14127 factory
14128 );
14129 break;
14131 return impl::WrapRelationshipElement<E>(
14132 std::dynamic_pointer_cast<
14134 >(that),
14135 factory
14136 );
14137 break;
14139 return impl::WrapSubmodelElementList<E>(
14140 std::dynamic_pointer_cast<
14142 >(that),
14143 factory
14144 );
14145 break;
14147 return impl::WrapSubmodelElementCollection<E>(
14148 std::dynamic_pointer_cast<
14150 >(that),
14151 factory
14152 );
14153 break;
14155 return impl::WrapProperty<E>(
14156 std::dynamic_pointer_cast<
14158 >(that),
14159 factory
14160 );
14161 break;
14163 return impl::WrapMultiLanguageProperty<E>(
14164 std::dynamic_pointer_cast<
14166 >(that),
14167 factory
14168 );
14169 break;
14171 return impl::WrapRange<E>(
14172 std::dynamic_pointer_cast<
14174 >(that),
14175 factory
14176 );
14177 break;
14179 return impl::WrapReferenceElement<E>(
14180 std::dynamic_pointer_cast<
14182 >(that),
14183 factory
14184 );
14185 break;
14187 return impl::WrapBlob<E>(
14188 std::dynamic_pointer_cast<
14190 >(that),
14191 factory
14192 );
14193 break;
14195 return impl::WrapFile<E>(
14196 std::dynamic_pointer_cast<
14198 >(that),
14199 factory
14200 );
14201 break;
14203 return impl::WrapAnnotatedRelationshipElement<E>(
14204 std::dynamic_pointer_cast<
14206 >(that),
14207 factory
14208 );
14209 break;
14211 return impl::WrapEntity<E>(
14212 std::dynamic_pointer_cast<
14214 >(that),
14215 factory
14216 );
14217 break;
14219 return impl::WrapEventPayload<E>(
14220 std::dynamic_pointer_cast<
14222 >(that),
14223 factory
14224 );
14225 break;
14227 return impl::WrapBasicEventElement<E>(
14228 std::dynamic_pointer_cast<
14230 >(that),
14231 factory
14232 );
14233 break;
14235 return impl::WrapOperation<E>(
14236 std::dynamic_pointer_cast<
14238 >(that),
14239 factory
14240 );
14241 break;
14243 return impl::WrapOperationVariable<E>(
14244 std::dynamic_pointer_cast<
14246 >(that),
14247 factory
14248 );
14249 break;
14251 return impl::WrapCapability<E>(
14252 std::dynamic_pointer_cast<
14254 >(that),
14255 factory
14256 );
14257 break;
14259 return impl::WrapConceptDescription<E>(
14260 std::dynamic_pointer_cast<
14262 >(that),
14263 factory
14264 );
14265 break;
14267 return impl::WrapReference<E>(
14268 std::dynamic_pointer_cast<
14270 >(that),
14271 factory
14272 );
14273 break;
14275 return impl::WrapKey<E>(
14276 std::dynamic_pointer_cast<
14278 >(that),
14279 factory
14280 );
14281 break;
14283 return impl::WrapLangStringNameType<E>(
14284 std::dynamic_pointer_cast<
14286 >(that),
14287 factory
14288 );
14289 break;
14291 return impl::WrapLangStringTextType<E>(
14292 std::dynamic_pointer_cast<
14294 >(that),
14295 factory
14296 );
14297 break;
14299 return impl::WrapEnvironment<E>(
14300 std::dynamic_pointer_cast<
14302 >(that),
14303 factory
14304 );
14305 break;
14307 return impl::WrapEmbeddedDataSpecification<E>(
14308 std::dynamic_pointer_cast<
14310 >(that),
14311 factory
14312 );
14313 break;
14315 return impl::WrapLevelType<E>(
14316 std::dynamic_pointer_cast<
14318 >(that),
14319 factory
14320 );
14321 break;
14323 return impl::WrapValueReferencePair<E>(
14324 std::dynamic_pointer_cast<
14326 >(that),
14327 factory
14328 );
14329 break;
14331 return impl::WrapValueList<E>(
14332 std::dynamic_pointer_cast<
14334 >(that),
14335 factory
14336 );
14337 break;
14339 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
14340 std::dynamic_pointer_cast<
14342 >(that),
14343 factory
14344 );
14345 break;
14347 return impl::WrapLangStringShortNameTypeIec61360<E>(
14348 std::dynamic_pointer_cast<
14350 >(that),
14351 factory
14352 );
14353 break;
14355 return impl::WrapLangStringDefinitionTypeIec61360<E>(
14356 std::dynamic_pointer_cast<
14358 >(that),
14359 factory
14360 );
14361 break;
14363 return impl::WrapDataSpecificationIec61360<E>(
14364 std::dynamic_pointer_cast<
14365 types::IDataSpecificationIec61360
14366 >(that),
14367 factory
14368 );
14369 break;
14370 default:
14371 throw std::invalid_argument(
14373 "Unexpected model type: ",
14374 std::to_string(
14375 static_cast<std::uint32_t>(
14376 that->model_type()
14377 )
14378 )
14379 )
14380 );
14381 break;
14382 }
14383}
14384
14385template <typename E>
14386std::shared_ptr<
14389 const std::shared_ptr<
14391 >& that,
14392 const std::function<
14393 std::shared_ptr<E>(
14394 const std::shared_ptr<types::IClass>&
14395 )
14396 >& factory
14397) {
14398 impl::AssertNotEnhanced<
14399 E,
14401 >(that);
14402
14403 switch (that->model_type()) {
14405 return impl::WrapRelationshipElement<E>(
14406 std::dynamic_pointer_cast<
14408 >(that),
14409 factory
14410 );
14411 break;
14413 return impl::WrapAnnotatedRelationshipElement<E>(
14414 std::dynamic_pointer_cast<
14416 >(that),
14417 factory
14418 );
14419 break;
14421 return impl::WrapBasicEventElement<E>(
14422 std::dynamic_pointer_cast<
14424 >(that),
14425 factory
14426 );
14427 break;
14429 return impl::WrapBlob<E>(
14430 std::dynamic_pointer_cast<
14432 >(that),
14433 factory
14434 );
14435 break;
14437 return impl::WrapCapability<E>(
14438 std::dynamic_pointer_cast<
14440 >(that),
14441 factory
14442 );
14443 break;
14445 return impl::WrapEntity<E>(
14446 std::dynamic_pointer_cast<
14448 >(that),
14449 factory
14450 );
14451 break;
14453 return impl::WrapExtension<E>(
14454 std::dynamic_pointer_cast<
14456 >(that),
14457 factory
14458 );
14459 break;
14461 return impl::WrapFile<E>(
14462 std::dynamic_pointer_cast<
14464 >(that),
14465 factory
14466 );
14467 break;
14469 return impl::WrapMultiLanguageProperty<E>(
14470 std::dynamic_pointer_cast<
14472 >(that),
14473 factory
14474 );
14475 break;
14477 return impl::WrapOperation<E>(
14478 std::dynamic_pointer_cast<
14480 >(that),
14481 factory
14482 );
14483 break;
14485 return impl::WrapProperty<E>(
14486 std::dynamic_pointer_cast<
14488 >(that),
14489 factory
14490 );
14491 break;
14493 return impl::WrapQualifier<E>(
14494 std::dynamic_pointer_cast<
14496 >(that),
14497 factory
14498 );
14499 break;
14501 return impl::WrapRange<E>(
14502 std::dynamic_pointer_cast<
14504 >(that),
14505 factory
14506 );
14507 break;
14509 return impl::WrapReferenceElement<E>(
14510 std::dynamic_pointer_cast<
14512 >(that),
14513 factory
14514 );
14515 break;
14517 return impl::WrapSpecificAssetId<E>(
14518 std::dynamic_pointer_cast<
14520 >(that),
14521 factory
14522 );
14523 break;
14525 return impl::WrapSubmodel<E>(
14526 std::dynamic_pointer_cast<
14528 >(that),
14529 factory
14530 );
14531 break;
14533 return impl::WrapSubmodelElementCollection<E>(
14534 std::dynamic_pointer_cast<
14536 >(that),
14537 factory
14538 );
14539 break;
14541 return impl::WrapSubmodelElementList<E>(
14542 std::dynamic_pointer_cast<
14544 >(that),
14545 factory
14546 );
14547 break;
14548 default:
14549 throw std::invalid_argument(
14551 "Unexpected model type: ",
14552 std::to_string(
14553 static_cast<std::uint32_t>(
14554 that->model_type()
14555 )
14556 )
14557 )
14558 );
14559 break;
14560 }
14561}
14562
14563template <typename E>
14564std::shared_ptr<
14567 const std::shared_ptr<
14569 >& that,
14570 const std::function<
14571 std::shared_ptr<E>(
14572 const std::shared_ptr<types::IClass>&
14573 )
14574 >& factory
14575) {
14576 impl::AssertNotEnhanced<
14577 E,
14579 >(that);
14580
14581 switch (that->model_type()) {
14583 return impl::WrapExtension<E>(
14584 that,
14585 factory
14586 );
14587 break;
14588 default:
14589 throw std::invalid_argument(
14591 "Unexpected model type: ",
14592 std::to_string(
14593 static_cast<std::uint32_t>(
14594 that->model_type()
14595 )
14596 )
14597 )
14598 );
14599 break;
14600 }
14601}
14602
14603template <typename E>
14604std::shared_ptr<
14607 const std::shared_ptr<
14609 >& that,
14610 const std::function<
14611 std::shared_ptr<E>(
14612 const std::shared_ptr<types::IClass>&
14613 )
14614 >& factory
14615) {
14616 impl::AssertNotEnhanced<
14617 E,
14619 >(that);
14620
14621 switch (that->model_type()) {
14623 return impl::WrapRelationshipElement<E>(
14624 std::dynamic_pointer_cast<
14626 >(that),
14627 factory
14628 );
14629 break;
14631 return impl::WrapAnnotatedRelationshipElement<E>(
14632 std::dynamic_pointer_cast<
14634 >(that),
14635 factory
14636 );
14637 break;
14639 return impl::WrapAssetAdministrationShell<E>(
14640 std::dynamic_pointer_cast<
14642 >(that),
14643 factory
14644 );
14645 break;
14647 return impl::WrapBasicEventElement<E>(
14648 std::dynamic_pointer_cast<
14650 >(that),
14651 factory
14652 );
14653 break;
14655 return impl::WrapBlob<E>(
14656 std::dynamic_pointer_cast<
14658 >(that),
14659 factory
14660 );
14661 break;
14663 return impl::WrapCapability<E>(
14664 std::dynamic_pointer_cast<
14666 >(that),
14667 factory
14668 );
14669 break;
14671 return impl::WrapConceptDescription<E>(
14672 std::dynamic_pointer_cast<
14674 >(that),
14675 factory
14676 );
14677 break;
14679 return impl::WrapEntity<E>(
14680 std::dynamic_pointer_cast<
14682 >(that),
14683 factory
14684 );
14685 break;
14687 return impl::WrapFile<E>(
14688 std::dynamic_pointer_cast<
14690 >(that),
14691 factory
14692 );
14693 break;
14695 return impl::WrapMultiLanguageProperty<E>(
14696 std::dynamic_pointer_cast<
14698 >(that),
14699 factory
14700 );
14701 break;
14703 return impl::WrapOperation<E>(
14704 std::dynamic_pointer_cast<
14706 >(that),
14707 factory
14708 );
14709 break;
14711 return impl::WrapProperty<E>(
14712 std::dynamic_pointer_cast<
14714 >(that),
14715 factory
14716 );
14717 break;
14719 return impl::WrapRange<E>(
14720 std::dynamic_pointer_cast<
14722 >(that),
14723 factory
14724 );
14725 break;
14727 return impl::WrapReferenceElement<E>(
14728 std::dynamic_pointer_cast<
14730 >(that),
14731 factory
14732 );
14733 break;
14735 return impl::WrapSubmodel<E>(
14736 std::dynamic_pointer_cast<
14738 >(that),
14739 factory
14740 );
14741 break;
14743 return impl::WrapSubmodelElementCollection<E>(
14744 std::dynamic_pointer_cast<
14746 >(that),
14747 factory
14748 );
14749 break;
14751 return impl::WrapSubmodelElementList<E>(
14752 std::dynamic_pointer_cast<
14754 >(that),
14755 factory
14756 );
14757 break;
14758 default:
14759 throw std::invalid_argument(
14761 "Unexpected model type: ",
14762 std::to_string(
14763 static_cast<std::uint32_t>(
14764 that->model_type()
14765 )
14766 )
14767 )
14768 );
14769 break;
14770 }
14771}
14772
14773template <typename E>
14774std::shared_ptr<
14777 const std::shared_ptr<
14779 >& that,
14780 const std::function<
14781 std::shared_ptr<E>(
14782 const std::shared_ptr<types::IClass>&
14783 )
14784 >& factory
14785) {
14786 impl::AssertNotEnhanced<
14787 E,
14789 >(that);
14790
14791 switch (that->model_type()) {
14793 return impl::WrapRelationshipElement<E>(
14794 std::dynamic_pointer_cast<
14796 >(that),
14797 factory
14798 );
14799 break;
14801 return impl::WrapAnnotatedRelationshipElement<E>(
14802 std::dynamic_pointer_cast<
14804 >(that),
14805 factory
14806 );
14807 break;
14809 return impl::WrapAssetAdministrationShell<E>(
14810 std::dynamic_pointer_cast<
14812 >(that),
14813 factory
14814 );
14815 break;
14817 return impl::WrapBasicEventElement<E>(
14818 std::dynamic_pointer_cast<
14820 >(that),
14821 factory
14822 );
14823 break;
14825 return impl::WrapBlob<E>(
14826 std::dynamic_pointer_cast<
14828 >(that),
14829 factory
14830 );
14831 break;
14833 return impl::WrapCapability<E>(
14834 std::dynamic_pointer_cast<
14836 >(that),
14837 factory
14838 );
14839 break;
14841 return impl::WrapConceptDescription<E>(
14842 std::dynamic_pointer_cast<
14844 >(that),
14845 factory
14846 );
14847 break;
14849 return impl::WrapEntity<E>(
14850 std::dynamic_pointer_cast<
14852 >(that),
14853 factory
14854 );
14855 break;
14857 return impl::WrapFile<E>(
14858 std::dynamic_pointer_cast<
14860 >(that),
14861 factory
14862 );
14863 break;
14865 return impl::WrapMultiLanguageProperty<E>(
14866 std::dynamic_pointer_cast<
14868 >(that),
14869 factory
14870 );
14871 break;
14873 return impl::WrapOperation<E>(
14874 std::dynamic_pointer_cast<
14876 >(that),
14877 factory
14878 );
14879 break;
14881 return impl::WrapProperty<E>(
14882 std::dynamic_pointer_cast<
14884 >(that),
14885 factory
14886 );
14887 break;
14889 return impl::WrapRange<E>(
14890 std::dynamic_pointer_cast<
14892 >(that),
14893 factory
14894 );
14895 break;
14897 return impl::WrapReferenceElement<E>(
14898 std::dynamic_pointer_cast<
14900 >(that),
14901 factory
14902 );
14903 break;
14905 return impl::WrapSubmodel<E>(
14906 std::dynamic_pointer_cast<
14908 >(that),
14909 factory
14910 );
14911 break;
14913 return impl::WrapSubmodelElementCollection<E>(
14914 std::dynamic_pointer_cast<
14916 >(that),
14917 factory
14918 );
14919 break;
14921 return impl::WrapSubmodelElementList<E>(
14922 std::dynamic_pointer_cast<
14924 >(that),
14925 factory
14926 );
14927 break;
14928 default:
14929 throw std::invalid_argument(
14931 "Unexpected model type: ",
14932 std::to_string(
14933 static_cast<std::uint32_t>(
14934 that->model_type()
14935 )
14936 )
14937 )
14938 );
14939 break;
14940 }
14941}
14942
14943template <typename E>
14944std::shared_ptr<
14947 const std::shared_ptr<
14949 >& that,
14950 const std::function<
14951 std::shared_ptr<E>(
14952 const std::shared_ptr<types::IClass>&
14953 )
14954 >& factory
14955) {
14956 impl::AssertNotEnhanced<
14957 E,
14959 >(that);
14960
14961 switch (that->model_type()) {
14963 return impl::WrapAssetAdministrationShell<E>(
14964 std::dynamic_pointer_cast<
14966 >(that),
14967 factory
14968 );
14969 break;
14971 return impl::WrapConceptDescription<E>(
14972 std::dynamic_pointer_cast<
14974 >(that),
14975 factory
14976 );
14977 break;
14979 return impl::WrapSubmodel<E>(
14980 std::dynamic_pointer_cast<
14982 >(that),
14983 factory
14984 );
14985 break;
14986 default:
14987 throw std::invalid_argument(
14989 "Unexpected model type: ",
14990 std::to_string(
14991 static_cast<std::uint32_t>(
14992 that->model_type()
14993 )
14994 )
14995 )
14996 );
14997 break;
14998 }
14999}
15000
15001template <typename E>
15002std::shared_ptr<
15005 const std::shared_ptr<
15007 >& that,
15008 const std::function<
15009 std::shared_ptr<E>(
15010 const std::shared_ptr<types::IClass>&
15011 )
15012 >& factory
15013) {
15014 impl::AssertNotEnhanced<
15015 E,
15017 >(that);
15018
15019 switch (that->model_type()) {
15021 return impl::WrapSubmodel<E>(
15022 std::dynamic_pointer_cast<
15024 >(that),
15025 factory
15026 );
15027 break;
15028 default:
15029 throw std::invalid_argument(
15031 "Unexpected model type: ",
15032 std::to_string(
15033 static_cast<std::uint32_t>(
15034 that->model_type()
15035 )
15036 )
15037 )
15038 );
15039 break;
15040 }
15041}
15042
15043template <typename E>
15044std::shared_ptr<
15047 const std::shared_ptr<
15049 >& that,
15050 const std::function<
15051 std::shared_ptr<E>(
15052 const std::shared_ptr<types::IClass>&
15053 )
15054 >& factory
15055) {
15056 impl::AssertNotEnhanced<
15057 E,
15059 >(that);
15060
15061 switch (that->model_type()) {
15063 return impl::WrapAdministrativeInformation<E>(
15064 std::dynamic_pointer_cast<
15066 >(that),
15067 factory
15068 );
15069 break;
15071 return impl::WrapRelationshipElement<E>(
15072 std::dynamic_pointer_cast<
15074 >(that),
15075 factory
15076 );
15077 break;
15079 return impl::WrapAnnotatedRelationshipElement<E>(
15080 std::dynamic_pointer_cast<
15082 >(that),
15083 factory
15084 );
15085 break;
15087 return impl::WrapAssetAdministrationShell<E>(
15088 std::dynamic_pointer_cast<
15090 >(that),
15091 factory
15092 );
15093 break;
15095 return impl::WrapBasicEventElement<E>(
15096 std::dynamic_pointer_cast<
15098 >(that),
15099 factory
15100 );
15101 break;
15103 return impl::WrapBlob<E>(
15104 std::dynamic_pointer_cast<
15106 >(that),
15107 factory
15108 );
15109 break;
15111 return impl::WrapCapability<E>(
15112 std::dynamic_pointer_cast<
15114 >(that),
15115 factory
15116 );
15117 break;
15119 return impl::WrapConceptDescription<E>(
15120 std::dynamic_pointer_cast<
15122 >(that),
15123 factory
15124 );
15125 break;
15127 return impl::WrapEntity<E>(
15128 std::dynamic_pointer_cast<
15130 >(that),
15131 factory
15132 );
15133 break;
15135 return impl::WrapFile<E>(
15136 std::dynamic_pointer_cast<
15138 >(that),
15139 factory
15140 );
15141 break;
15143 return impl::WrapMultiLanguageProperty<E>(
15144 std::dynamic_pointer_cast<
15146 >(that),
15147 factory
15148 );
15149 break;
15151 return impl::WrapOperation<E>(
15152 std::dynamic_pointer_cast<
15154 >(that),
15155 factory
15156 );
15157 break;
15159 return impl::WrapProperty<E>(
15160 std::dynamic_pointer_cast<
15162 >(that),
15163 factory
15164 );
15165 break;
15167 return impl::WrapRange<E>(
15168 std::dynamic_pointer_cast<
15170 >(that),
15171 factory
15172 );
15173 break;
15175 return impl::WrapReferenceElement<E>(
15176 std::dynamic_pointer_cast<
15178 >(that),
15179 factory
15180 );
15181 break;
15183 return impl::WrapSubmodel<E>(
15184 std::dynamic_pointer_cast<
15186 >(that),
15187 factory
15188 );
15189 break;
15191 return impl::WrapSubmodelElementCollection<E>(
15192 std::dynamic_pointer_cast<
15194 >(that),
15195 factory
15196 );
15197 break;
15199 return impl::WrapSubmodelElementList<E>(
15200 std::dynamic_pointer_cast<
15202 >(that),
15203 factory
15204 );
15205 break;
15206 default:
15207 throw std::invalid_argument(
15209 "Unexpected model type: ",
15210 std::to_string(
15211 static_cast<std::uint32_t>(
15212 that->model_type()
15213 )
15214 )
15215 )
15216 );
15217 break;
15218 }
15219}
15220
15221template <typename E>
15222std::shared_ptr<
15225 const std::shared_ptr<
15227 >& that,
15228 const std::function<
15229 std::shared_ptr<E>(
15230 const std::shared_ptr<types::IClass>&
15231 )
15232 >& factory
15233) {
15234 impl::AssertNotEnhanced<
15235 E,
15237 >(that);
15238
15239 switch (that->model_type()) {
15241 return impl::WrapAdministrativeInformation<E>(
15242 that,
15243 factory
15244 );
15245 break;
15246 default:
15247 throw std::invalid_argument(
15249 "Unexpected model type: ",
15250 std::to_string(
15251 static_cast<std::uint32_t>(
15252 that->model_type()
15253 )
15254 )
15255 )
15256 );
15257 break;
15258 }
15259}
15260
15261template <typename E>
15262std::shared_ptr<
15265 const std::shared_ptr<
15267 >& that,
15268 const std::function<
15269 std::shared_ptr<E>(
15270 const std::shared_ptr<types::IClass>&
15271 )
15272 >& factory
15273) {
15274 impl::AssertNotEnhanced<
15275 E,
15277 >(that);
15278
15279 switch (that->model_type()) {
15281 return impl::WrapRelationshipElement<E>(
15282 std::dynamic_pointer_cast<
15284 >(that),
15285 factory
15286 );
15287 break;
15289 return impl::WrapAnnotatedRelationshipElement<E>(
15290 std::dynamic_pointer_cast<
15292 >(that),
15293 factory
15294 );
15295 break;
15297 return impl::WrapBasicEventElement<E>(
15298 std::dynamic_pointer_cast<
15300 >(that),
15301 factory
15302 );
15303 break;
15305 return impl::WrapBlob<E>(
15306 std::dynamic_pointer_cast<
15308 >(that),
15309 factory
15310 );
15311 break;
15313 return impl::WrapCapability<E>(
15314 std::dynamic_pointer_cast<
15316 >(that),
15317 factory
15318 );
15319 break;
15321 return impl::WrapEntity<E>(
15322 std::dynamic_pointer_cast<
15324 >(that),
15325 factory
15326 );
15327 break;
15329 return impl::WrapFile<E>(
15330 std::dynamic_pointer_cast<
15332 >(that),
15333 factory
15334 );
15335 break;
15337 return impl::WrapMultiLanguageProperty<E>(
15338 std::dynamic_pointer_cast<
15340 >(that),
15341 factory
15342 );
15343 break;
15345 return impl::WrapOperation<E>(
15346 std::dynamic_pointer_cast<
15348 >(that),
15349 factory
15350 );
15351 break;
15353 return impl::WrapProperty<E>(
15354 std::dynamic_pointer_cast<
15356 >(that),
15357 factory
15358 );
15359 break;
15361 return impl::WrapRange<E>(
15362 std::dynamic_pointer_cast<
15364 >(that),
15365 factory
15366 );
15367 break;
15369 return impl::WrapReferenceElement<E>(
15370 std::dynamic_pointer_cast<
15372 >(that),
15373 factory
15374 );
15375 break;
15377 return impl::WrapSubmodel<E>(
15378 std::dynamic_pointer_cast<
15380 >(that),
15381 factory
15382 );
15383 break;
15385 return impl::WrapSubmodelElementCollection<E>(
15386 std::dynamic_pointer_cast<
15388 >(that),
15389 factory
15390 );
15391 break;
15393 return impl::WrapSubmodelElementList<E>(
15394 std::dynamic_pointer_cast<
15396 >(that),
15397 factory
15398 );
15399 break;
15400 default:
15401 throw std::invalid_argument(
15403 "Unexpected model type: ",
15404 std::to_string(
15405 static_cast<std::uint32_t>(
15406 that->model_type()
15407 )
15408 )
15409 )
15410 );
15411 break;
15412 }
15413}
15414
15415template <typename E>
15416std::shared_ptr<
15419 const std::shared_ptr<
15421 >& that,
15422 const std::function<
15423 std::shared_ptr<E>(
15424 const std::shared_ptr<types::IClass>&
15425 )
15426 >& factory
15427) {
15428 impl::AssertNotEnhanced<
15429 E,
15431 >(that);
15432
15433 switch (that->model_type()) {
15435 return impl::WrapQualifier<E>(
15436 that,
15437 factory
15438 );
15439 break;
15440 default:
15441 throw std::invalid_argument(
15443 "Unexpected model type: ",
15444 std::to_string(
15445 static_cast<std::uint32_t>(
15446 that->model_type()
15447 )
15448 )
15449 )
15450 );
15451 break;
15452 }
15453}
15454
15455template <typename E>
15456std::shared_ptr<
15459 const std::shared_ptr<
15461 >& that,
15462 const std::function<
15463 std::shared_ptr<E>(
15464 const std::shared_ptr<types::IClass>&
15465 )
15466 >& factory
15467) {
15468 impl::AssertNotEnhanced<
15469 E,
15471 >(that);
15472
15473 switch (that->model_type()) {
15475 return impl::WrapAssetAdministrationShell<E>(
15476 that,
15477 factory
15478 );
15479 break;
15480 default:
15481 throw std::invalid_argument(
15483 "Unexpected model type: ",
15484 std::to_string(
15485 static_cast<std::uint32_t>(
15486 that->model_type()
15487 )
15488 )
15489 )
15490 );
15491 break;
15492 }
15493}
15494
15495template <typename E>
15496std::shared_ptr<
15499 const std::shared_ptr<
15501 >& that,
15502 const std::function<
15503 std::shared_ptr<E>(
15504 const std::shared_ptr<types::IClass>&
15505 )
15506 >& factory
15507) {
15508 impl::AssertNotEnhanced<
15509 E,
15511 >(that);
15512
15513 switch (that->model_type()) {
15515 return impl::WrapAssetInformation<E>(
15516 that,
15517 factory
15518 );
15519 break;
15520 default:
15521 throw std::invalid_argument(
15523 "Unexpected model type: ",
15524 std::to_string(
15525 static_cast<std::uint32_t>(
15526 that->model_type()
15527 )
15528 )
15529 )
15530 );
15531 break;
15532 }
15533}
15534
15535template <typename E>
15536std::shared_ptr<
15539 const std::shared_ptr<
15541 >& that,
15542 const std::function<
15543 std::shared_ptr<E>(
15544 const std::shared_ptr<types::IClass>&
15545 )
15546 >& factory
15547) {
15548 impl::AssertNotEnhanced<
15549 E,
15551 >(that);
15552
15553 switch (that->model_type()) {
15555 return impl::WrapResource<E>(
15556 that,
15557 factory
15558 );
15559 break;
15560 default:
15561 throw std::invalid_argument(
15563 "Unexpected model type: ",
15564 std::to_string(
15565 static_cast<std::uint32_t>(
15566 that->model_type()
15567 )
15568 )
15569 )
15570 );
15571 break;
15572 }
15573}
15574
15575template <typename E>
15576std::shared_ptr<
15579 const std::shared_ptr<
15581 >& that,
15582 const std::function<
15583 std::shared_ptr<E>(
15584 const std::shared_ptr<types::IClass>&
15585 )
15586 >& factory
15587) {
15588 impl::AssertNotEnhanced<
15589 E,
15591 >(that);
15592
15593 switch (that->model_type()) {
15595 return impl::WrapSpecificAssetId<E>(
15596 that,
15597 factory
15598 );
15599 break;
15600 default:
15601 throw std::invalid_argument(
15603 "Unexpected model type: ",
15604 std::to_string(
15605 static_cast<std::uint32_t>(
15606 that->model_type()
15607 )
15608 )
15609 )
15610 );
15611 break;
15612 }
15613}
15614
15615template <typename E>
15616std::shared_ptr<
15619 const std::shared_ptr<
15621 >& that,
15622 const std::function<
15623 std::shared_ptr<E>(
15624 const std::shared_ptr<types::IClass>&
15625 )
15626 >& factory
15627) {
15628 impl::AssertNotEnhanced<
15629 E,
15631 >(that);
15632
15633 switch (that->model_type()) {
15635 return impl::WrapSubmodel<E>(
15636 that,
15637 factory
15638 );
15639 break;
15640 default:
15641 throw std::invalid_argument(
15643 "Unexpected model type: ",
15644 std::to_string(
15645 static_cast<std::uint32_t>(
15646 that->model_type()
15647 )
15648 )
15649 )
15650 );
15651 break;
15652 }
15653}
15654
15655template <typename E>
15656std::shared_ptr<
15659 const std::shared_ptr<
15661 >& that,
15662 const std::function<
15663 std::shared_ptr<E>(
15664 const std::shared_ptr<types::IClass>&
15665 )
15666 >& factory
15667) {
15668 impl::AssertNotEnhanced<
15669 E,
15671 >(that);
15672
15673 switch (that->model_type()) {
15675 return impl::WrapRelationshipElement<E>(
15676 std::dynamic_pointer_cast<
15678 >(that),
15679 factory
15680 );
15681 break;
15683 return impl::WrapAnnotatedRelationshipElement<E>(
15684 std::dynamic_pointer_cast<
15686 >(that),
15687 factory
15688 );
15689 break;
15691 return impl::WrapBasicEventElement<E>(
15692 std::dynamic_pointer_cast<
15694 >(that),
15695 factory
15696 );
15697 break;
15699 return impl::WrapBlob<E>(
15700 std::dynamic_pointer_cast<
15702 >(that),
15703 factory
15704 );
15705 break;
15707 return impl::WrapCapability<E>(
15708 std::dynamic_pointer_cast<
15710 >(that),
15711 factory
15712 );
15713 break;
15715 return impl::WrapEntity<E>(
15716 std::dynamic_pointer_cast<
15718 >(that),
15719 factory
15720 );
15721 break;
15723 return impl::WrapFile<E>(
15724 std::dynamic_pointer_cast<
15726 >(that),
15727 factory
15728 );
15729 break;
15731 return impl::WrapMultiLanguageProperty<E>(
15732 std::dynamic_pointer_cast<
15734 >(that),
15735 factory
15736 );
15737 break;
15739 return impl::WrapOperation<E>(
15740 std::dynamic_pointer_cast<
15742 >(that),
15743 factory
15744 );
15745 break;
15747 return impl::WrapProperty<E>(
15748 std::dynamic_pointer_cast<
15750 >(that),
15751 factory
15752 );
15753 break;
15755 return impl::WrapRange<E>(
15756 std::dynamic_pointer_cast<
15758 >(that),
15759 factory
15760 );
15761 break;
15763 return impl::WrapReferenceElement<E>(
15764 std::dynamic_pointer_cast<
15766 >(that),
15767 factory
15768 );
15769 break;
15771 return impl::WrapSubmodelElementCollection<E>(
15772 std::dynamic_pointer_cast<
15774 >(that),
15775 factory
15776 );
15777 break;
15779 return impl::WrapSubmodelElementList<E>(
15780 std::dynamic_pointer_cast<
15782 >(that),
15783 factory
15784 );
15785 break;
15786 default:
15787 throw std::invalid_argument(
15789 "Unexpected model type: ",
15790 std::to_string(
15791 static_cast<std::uint32_t>(
15792 that->model_type()
15793 )
15794 )
15795 )
15796 );
15797 break;
15798 }
15799}
15800
15801template <typename E>
15802std::shared_ptr<
15805 const std::shared_ptr<
15807 >& that,
15808 const std::function<
15809 std::shared_ptr<E>(
15810 const std::shared_ptr<types::IClass>&
15811 )
15812 >& factory
15813) {
15814 impl::AssertNotEnhanced<
15815 E,
15817 >(that);
15818
15819 switch (that->model_type()) {
15821 return impl::WrapRelationshipElement<E>(
15822 that,
15823 factory
15824 );
15825 break;
15827 return impl::WrapAnnotatedRelationshipElement<E>(
15828 std::dynamic_pointer_cast<
15830 >(that),
15831 factory
15832 );
15833 break;
15834 default:
15835 throw std::invalid_argument(
15837 "Unexpected model type: ",
15838 std::to_string(
15839 static_cast<std::uint32_t>(
15840 that->model_type()
15841 )
15842 )
15843 )
15844 );
15845 break;
15846 }
15847}
15848
15849template <typename E>
15850std::shared_ptr<
15853 const std::shared_ptr<
15855 >& that,
15856 const std::function<
15857 std::shared_ptr<E>(
15858 const std::shared_ptr<types::IClass>&
15859 )
15860 >& factory
15861) {
15862 impl::AssertNotEnhanced<
15863 E,
15865 >(that);
15866
15867 switch (that->model_type()) {
15869 return impl::WrapSubmodelElementList<E>(
15870 that,
15871 factory
15872 );
15873 break;
15874 default:
15875 throw std::invalid_argument(
15877 "Unexpected model type: ",
15878 std::to_string(
15879 static_cast<std::uint32_t>(
15880 that->model_type()
15881 )
15882 )
15883 )
15884 );
15885 break;
15886 }
15887}
15888
15889template <typename E>
15890std::shared_ptr<
15893 const std::shared_ptr<
15895 >& that,
15896 const std::function<
15897 std::shared_ptr<E>(
15898 const std::shared_ptr<types::IClass>&
15899 )
15900 >& factory
15901) {
15902 impl::AssertNotEnhanced<
15903 E,
15905 >(that);
15906
15907 switch (that->model_type()) {
15909 return impl::WrapSubmodelElementCollection<E>(
15910 that,
15911 factory
15912 );
15913 break;
15914 default:
15915 throw std::invalid_argument(
15917 "Unexpected model type: ",
15918 std::to_string(
15919 static_cast<std::uint32_t>(
15920 that->model_type()
15921 )
15922 )
15923 )
15924 );
15925 break;
15926 }
15927}
15928
15929template <typename E>
15930std::shared_ptr<
15933 const std::shared_ptr<
15935 >& that,
15936 const std::function<
15937 std::shared_ptr<E>(
15938 const std::shared_ptr<types::IClass>&
15939 )
15940 >& factory
15941) {
15942 impl::AssertNotEnhanced<
15943 E,
15945 >(that);
15946
15947 switch (that->model_type()) {
15949 return impl::WrapBlob<E>(
15950 std::dynamic_pointer_cast<
15952 >(that),
15953 factory
15954 );
15955 break;
15957 return impl::WrapFile<E>(
15958 std::dynamic_pointer_cast<
15960 >(that),
15961 factory
15962 );
15963 break;
15965 return impl::WrapMultiLanguageProperty<E>(
15966 std::dynamic_pointer_cast<
15968 >(that),
15969 factory
15970 );
15971 break;
15973 return impl::WrapProperty<E>(
15974 std::dynamic_pointer_cast<
15976 >(that),
15977 factory
15978 );
15979 break;
15981 return impl::WrapRange<E>(
15982 std::dynamic_pointer_cast<
15984 >(that),
15985 factory
15986 );
15987 break;
15989 return impl::WrapReferenceElement<E>(
15990 std::dynamic_pointer_cast<
15992 >(that),
15993 factory
15994 );
15995 break;
15996 default:
15997 throw std::invalid_argument(
15999 "Unexpected model type: ",
16000 std::to_string(
16001 static_cast<std::uint32_t>(
16002 that->model_type()
16003 )
16004 )
16005 )
16006 );
16007 break;
16008 }
16009}
16010
16011template <typename E>
16012std::shared_ptr<
16015 const std::shared_ptr<
16017 >& that,
16018 const std::function<
16019 std::shared_ptr<E>(
16020 const std::shared_ptr<types::IClass>&
16021 )
16022 >& factory
16023) {
16024 impl::AssertNotEnhanced<
16025 E,
16027 >(that);
16028
16029 switch (that->model_type()) {
16031 return impl::WrapProperty<E>(
16032 that,
16033 factory
16034 );
16035 break;
16036 default:
16037 throw std::invalid_argument(
16039 "Unexpected model type: ",
16040 std::to_string(
16041 static_cast<std::uint32_t>(
16042 that->model_type()
16043 )
16044 )
16045 )
16046 );
16047 break;
16048 }
16049}
16050
16051template <typename E>
16052std::shared_ptr<
16055 const std::shared_ptr<
16057 >& that,
16058 const std::function<
16059 std::shared_ptr<E>(
16060 const std::shared_ptr<types::IClass>&
16061 )
16062 >& factory
16063) {
16064 impl::AssertNotEnhanced<
16065 E,
16067 >(that);
16068
16069 switch (that->model_type()) {
16071 return impl::WrapMultiLanguageProperty<E>(
16072 that,
16073 factory
16074 );
16075 break;
16076 default:
16077 throw std::invalid_argument(
16079 "Unexpected model type: ",
16080 std::to_string(
16081 static_cast<std::uint32_t>(
16082 that->model_type()
16083 )
16084 )
16085 )
16086 );
16087 break;
16088 }
16089}
16090
16091template <typename E>
16092std::shared_ptr<
16095 const std::shared_ptr<
16097 >& that,
16098 const std::function<
16099 std::shared_ptr<E>(
16100 const std::shared_ptr<types::IClass>&
16101 )
16102 >& factory
16103) {
16104 impl::AssertNotEnhanced<
16105 E,
16107 >(that);
16108
16109 switch (that->model_type()) {
16111 return impl::WrapRange<E>(
16112 that,
16113 factory
16114 );
16115 break;
16116 default:
16117 throw std::invalid_argument(
16119 "Unexpected model type: ",
16120 std::to_string(
16121 static_cast<std::uint32_t>(
16122 that->model_type()
16123 )
16124 )
16125 )
16126 );
16127 break;
16128 }
16129}
16130
16131template <typename E>
16132std::shared_ptr<
16135 const std::shared_ptr<
16137 >& that,
16138 const std::function<
16139 std::shared_ptr<E>(
16140 const std::shared_ptr<types::IClass>&
16141 )
16142 >& factory
16143) {
16144 impl::AssertNotEnhanced<
16145 E,
16147 >(that);
16148
16149 switch (that->model_type()) {
16151 return impl::WrapReferenceElement<E>(
16152 that,
16153 factory
16154 );
16155 break;
16156 default:
16157 throw std::invalid_argument(
16159 "Unexpected model type: ",
16160 std::to_string(
16161 static_cast<std::uint32_t>(
16162 that->model_type()
16163 )
16164 )
16165 )
16166 );
16167 break;
16168 }
16169}
16170
16171template <typename E>
16172std::shared_ptr<
16175 const std::shared_ptr<
16177 >& that,
16178 const std::function<
16179 std::shared_ptr<E>(
16180 const std::shared_ptr<types::IClass>&
16181 )
16182 >& factory
16183) {
16184 impl::AssertNotEnhanced<
16185 E,
16187 >(that);
16188
16189 switch (that->model_type()) {
16191 return impl::WrapBlob<E>(
16192 that,
16193 factory
16194 );
16195 break;
16196 default:
16197 throw std::invalid_argument(
16199 "Unexpected model type: ",
16200 std::to_string(
16201 static_cast<std::uint32_t>(
16202 that->model_type()
16203 )
16204 )
16205 )
16206 );
16207 break;
16208 }
16209}
16210
16211template <typename E>
16212std::shared_ptr<
16215 const std::shared_ptr<
16217 >& that,
16218 const std::function<
16219 std::shared_ptr<E>(
16220 const std::shared_ptr<types::IClass>&
16221 )
16222 >& factory
16223) {
16224 impl::AssertNotEnhanced<
16225 E,
16227 >(that);
16228
16229 switch (that->model_type()) {
16231 return impl::WrapFile<E>(
16232 that,
16233 factory
16234 );
16235 break;
16236 default:
16237 throw std::invalid_argument(
16239 "Unexpected model type: ",
16240 std::to_string(
16241 static_cast<std::uint32_t>(
16242 that->model_type()
16243 )
16244 )
16245 )
16246 );
16247 break;
16248 }
16249}
16250
16251template <typename E>
16252std::shared_ptr<
16255 const std::shared_ptr<
16257 >& that,
16258 const std::function<
16259 std::shared_ptr<E>(
16260 const std::shared_ptr<types::IClass>&
16261 )
16262 >& factory
16263) {
16264 impl::AssertNotEnhanced<
16265 E,
16267 >(that);
16268
16269 switch (that->model_type()) {
16271 return impl::WrapAnnotatedRelationshipElement<E>(
16272 that,
16273 factory
16274 );
16275 break;
16276 default:
16277 throw std::invalid_argument(
16279 "Unexpected model type: ",
16280 std::to_string(
16281 static_cast<std::uint32_t>(
16282 that->model_type()
16283 )
16284 )
16285 )
16286 );
16287 break;
16288 }
16289}
16290
16291template <typename E>
16292std::shared_ptr<
16295 const std::shared_ptr<
16297 >& that,
16298 const std::function<
16299 std::shared_ptr<E>(
16300 const std::shared_ptr<types::IClass>&
16301 )
16302 >& factory
16303) {
16304 impl::AssertNotEnhanced<
16305 E,
16307 >(that);
16308
16309 switch (that->model_type()) {
16311 return impl::WrapEntity<E>(
16312 that,
16313 factory
16314 );
16315 break;
16316 default:
16317 throw std::invalid_argument(
16319 "Unexpected model type: ",
16320 std::to_string(
16321 static_cast<std::uint32_t>(
16322 that->model_type()
16323 )
16324 )
16325 )
16326 );
16327 break;
16328 }
16329}
16330
16331template <typename E>
16332std::shared_ptr<
16335 const std::shared_ptr<
16337 >& that,
16338 const std::function<
16339 std::shared_ptr<E>(
16340 const std::shared_ptr<types::IClass>&
16341 )
16342 >& factory
16343) {
16344 impl::AssertNotEnhanced<
16345 E,
16347 >(that);
16348
16349 switch (that->model_type()) {
16351 return impl::WrapEventPayload<E>(
16352 that,
16353 factory
16354 );
16355 break;
16356 default:
16357 throw std::invalid_argument(
16359 "Unexpected model type: ",
16360 std::to_string(
16361 static_cast<std::uint32_t>(
16362 that->model_type()
16363 )
16364 )
16365 )
16366 );
16367 break;
16368 }
16369}
16370
16371template <typename E>
16372std::shared_ptr<
16375 const std::shared_ptr<
16377 >& that,
16378 const std::function<
16379 std::shared_ptr<E>(
16380 const std::shared_ptr<types::IClass>&
16381 )
16382 >& factory
16383) {
16384 impl::AssertNotEnhanced<
16385 E,
16387 >(that);
16388
16389 switch (that->model_type()) {
16391 return impl::WrapBasicEventElement<E>(
16392 std::dynamic_pointer_cast<
16394 >(that),
16395 factory
16396 );
16397 break;
16398 default:
16399 throw std::invalid_argument(
16401 "Unexpected model type: ",
16402 std::to_string(
16403 static_cast<std::uint32_t>(
16404 that->model_type()
16405 )
16406 )
16407 )
16408 );
16409 break;
16410 }
16411}
16412
16413template <typename E>
16414std::shared_ptr<
16417 const std::shared_ptr<
16419 >& that,
16420 const std::function<
16421 std::shared_ptr<E>(
16422 const std::shared_ptr<types::IClass>&
16423 )
16424 >& factory
16425) {
16426 impl::AssertNotEnhanced<
16427 E,
16429 >(that);
16430
16431 switch (that->model_type()) {
16433 return impl::WrapBasicEventElement<E>(
16434 that,
16435 factory
16436 );
16437 break;
16438 default:
16439 throw std::invalid_argument(
16441 "Unexpected model type: ",
16442 std::to_string(
16443 static_cast<std::uint32_t>(
16444 that->model_type()
16445 )
16446 )
16447 )
16448 );
16449 break;
16450 }
16451}
16452
16453template <typename E>
16454std::shared_ptr<
16457 const std::shared_ptr<
16459 >& that,
16460 const std::function<
16461 std::shared_ptr<E>(
16462 const std::shared_ptr<types::IClass>&
16463 )
16464 >& factory
16465) {
16466 impl::AssertNotEnhanced<
16467 E,
16469 >(that);
16470
16471 switch (that->model_type()) {
16473 return impl::WrapOperation<E>(
16474 that,
16475 factory
16476 );
16477 break;
16478 default:
16479 throw std::invalid_argument(
16481 "Unexpected model type: ",
16482 std::to_string(
16483 static_cast<std::uint32_t>(
16484 that->model_type()
16485 )
16486 )
16487 )
16488 );
16489 break;
16490 }
16491}
16492
16493template <typename E>
16494std::shared_ptr<
16497 const std::shared_ptr<
16499 >& that,
16500 const std::function<
16501 std::shared_ptr<E>(
16502 const std::shared_ptr<types::IClass>&
16503 )
16504 >& factory
16505) {
16506 impl::AssertNotEnhanced<
16507 E,
16509 >(that);
16510
16511 switch (that->model_type()) {
16513 return impl::WrapOperationVariable<E>(
16514 that,
16515 factory
16516 );
16517 break;
16518 default:
16519 throw std::invalid_argument(
16521 "Unexpected model type: ",
16522 std::to_string(
16523 static_cast<std::uint32_t>(
16524 that->model_type()
16525 )
16526 )
16527 )
16528 );
16529 break;
16530 }
16531}
16532
16533template <typename E>
16534std::shared_ptr<
16537 const std::shared_ptr<
16539 >& that,
16540 const std::function<
16541 std::shared_ptr<E>(
16542 const std::shared_ptr<types::IClass>&
16543 )
16544 >& factory
16545) {
16546 impl::AssertNotEnhanced<
16547 E,
16549 >(that);
16550
16551 switch (that->model_type()) {
16553 return impl::WrapCapability<E>(
16554 that,
16555 factory
16556 );
16557 break;
16558 default:
16559 throw std::invalid_argument(
16561 "Unexpected model type: ",
16562 std::to_string(
16563 static_cast<std::uint32_t>(
16564 that->model_type()
16565 )
16566 )
16567 )
16568 );
16569 break;
16570 }
16571}
16572
16573template <typename E>
16574std::shared_ptr<
16577 const std::shared_ptr<
16579 >& that,
16580 const std::function<
16581 std::shared_ptr<E>(
16582 const std::shared_ptr<types::IClass>&
16583 )
16584 >& factory
16585) {
16586 impl::AssertNotEnhanced<
16587 E,
16589 >(that);
16590
16591 switch (that->model_type()) {
16593 return impl::WrapConceptDescription<E>(
16594 that,
16595 factory
16596 );
16597 break;
16598 default:
16599 throw std::invalid_argument(
16601 "Unexpected model type: ",
16602 std::to_string(
16603 static_cast<std::uint32_t>(
16604 that->model_type()
16605 )
16606 )
16607 )
16608 );
16609 break;
16610 }
16611}
16612
16613template <typename E>
16614std::shared_ptr<
16617 const std::shared_ptr<
16619 >& that,
16620 const std::function<
16621 std::shared_ptr<E>(
16622 const std::shared_ptr<types::IClass>&
16623 )
16624 >& factory
16625) {
16626 impl::AssertNotEnhanced<
16627 E,
16629 >(that);
16630
16631 switch (that->model_type()) {
16633 return impl::WrapReference<E>(
16634 that,
16635 factory
16636 );
16637 break;
16638 default:
16639 throw std::invalid_argument(
16641 "Unexpected model type: ",
16642 std::to_string(
16643 static_cast<std::uint32_t>(
16644 that->model_type()
16645 )
16646 )
16647 )
16648 );
16649 break;
16650 }
16651}
16652
16653template <typename E>
16654std::shared_ptr<
16657 const std::shared_ptr<
16659 >& that,
16660 const std::function<
16661 std::shared_ptr<E>(
16662 const std::shared_ptr<types::IClass>&
16663 )
16664 >& factory
16665) {
16666 impl::AssertNotEnhanced<
16667 E,
16669 >(that);
16670
16671 switch (that->model_type()) {
16673 return impl::WrapKey<E>(
16674 that,
16675 factory
16676 );
16677 break;
16678 default:
16679 throw std::invalid_argument(
16681 "Unexpected model type: ",
16682 std::to_string(
16683 static_cast<std::uint32_t>(
16684 that->model_type()
16685 )
16686 )
16687 )
16688 );
16689 break;
16690 }
16691}
16692
16693template <typename E>
16694std::shared_ptr<
16697 const std::shared_ptr<
16699 >& that,
16700 const std::function<
16701 std::shared_ptr<E>(
16702 const std::shared_ptr<types::IClass>&
16703 )
16704 >& factory
16705) {
16706 impl::AssertNotEnhanced<
16707 E,
16709 >(that);
16710
16711 switch (that->model_type()) {
16713 return impl::WrapLangStringDefinitionTypeIec61360<E>(
16714 std::dynamic_pointer_cast<
16716 >(that),
16717 factory
16718 );
16719 break;
16721 return impl::WrapLangStringNameType<E>(
16722 std::dynamic_pointer_cast<
16724 >(that),
16725 factory
16726 );
16727 break;
16729 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
16730 std::dynamic_pointer_cast<
16732 >(that),
16733 factory
16734 );
16735 break;
16737 return impl::WrapLangStringShortNameTypeIec61360<E>(
16738 std::dynamic_pointer_cast<
16740 >(that),
16741 factory
16742 );
16743 break;
16745 return impl::WrapLangStringTextType<E>(
16746 std::dynamic_pointer_cast<
16748 >(that),
16749 factory
16750 );
16751 break;
16752 default:
16753 throw std::invalid_argument(
16755 "Unexpected model type: ",
16756 std::to_string(
16757 static_cast<std::uint32_t>(
16758 that->model_type()
16759 )
16760 )
16761 )
16762 );
16763 break;
16764 }
16765}
16766
16767template <typename E>
16768std::shared_ptr<
16771 const std::shared_ptr<
16773 >& that,
16774 const std::function<
16775 std::shared_ptr<E>(
16776 const std::shared_ptr<types::IClass>&
16777 )
16778 >& factory
16779) {
16780 impl::AssertNotEnhanced<
16781 E,
16783 >(that);
16784
16785 switch (that->model_type()) {
16787 return impl::WrapLangStringNameType<E>(
16788 that,
16789 factory
16790 );
16791 break;
16792 default:
16793 throw std::invalid_argument(
16795 "Unexpected model type: ",
16796 std::to_string(
16797 static_cast<std::uint32_t>(
16798 that->model_type()
16799 )
16800 )
16801 )
16802 );
16803 break;
16804 }
16805}
16806
16807template <typename E>
16808std::shared_ptr<
16811 const std::shared_ptr<
16813 >& that,
16814 const std::function<
16815 std::shared_ptr<E>(
16816 const std::shared_ptr<types::IClass>&
16817 )
16818 >& factory
16819) {
16820 impl::AssertNotEnhanced<
16821 E,
16823 >(that);
16824
16825 switch (that->model_type()) {
16827 return impl::WrapLangStringTextType<E>(
16828 that,
16829 factory
16830 );
16831 break;
16832 default:
16833 throw std::invalid_argument(
16835 "Unexpected model type: ",
16836 std::to_string(
16837 static_cast<std::uint32_t>(
16838 that->model_type()
16839 )
16840 )
16841 )
16842 );
16843 break;
16844 }
16845}
16846
16847template <typename E>
16848std::shared_ptr<
16851 const std::shared_ptr<
16853 >& that,
16854 const std::function<
16855 std::shared_ptr<E>(
16856 const std::shared_ptr<types::IClass>&
16857 )
16858 >& factory
16859) {
16860 impl::AssertNotEnhanced<
16861 E,
16863 >(that);
16864
16865 switch (that->model_type()) {
16867 return impl::WrapEnvironment<E>(
16868 that,
16869 factory
16870 );
16871 break;
16872 default:
16873 throw std::invalid_argument(
16875 "Unexpected model type: ",
16876 std::to_string(
16877 static_cast<std::uint32_t>(
16878 that->model_type()
16879 )
16880 )
16881 )
16882 );
16883 break;
16884 }
16885}
16886
16887template <typename E>
16888std::shared_ptr<
16891 const std::shared_ptr<
16893 >& that,
16894 const std::function<
16895 std::shared_ptr<E>(
16896 const std::shared_ptr<types::IClass>&
16897 )
16898 >& factory
16899) {
16900 impl::AssertNotEnhanced<
16901 E,
16903 >(that);
16904
16905 switch (that->model_type()) {
16907 return impl::WrapDataSpecificationIec61360<E>(
16908 std::dynamic_pointer_cast<
16909 types::IDataSpecificationIec61360
16910 >(that),
16911 factory
16912 );
16913 break;
16914 default:
16915 throw std::invalid_argument(
16917 "Unexpected model type: ",
16918 std::to_string(
16919 static_cast<std::uint32_t>(
16920 that->model_type()
16921 )
16922 )
16923 )
16924 );
16925 break;
16926 }
16927}
16928
16929template <typename E>
16930std::shared_ptr<
16933 const std::shared_ptr<
16935 >& that,
16936 const std::function<
16937 std::shared_ptr<E>(
16938 const std::shared_ptr<types::IClass>&
16939 )
16940 >& factory
16941) {
16942 impl::AssertNotEnhanced<
16943 E,
16945 >(that);
16946
16947 switch (that->model_type()) {
16949 return impl::WrapEmbeddedDataSpecification<E>(
16950 that,
16951 factory
16952 );
16953 break;
16954 default:
16955 throw std::invalid_argument(
16957 "Unexpected model type: ",
16958 std::to_string(
16959 static_cast<std::uint32_t>(
16960 that->model_type()
16961 )
16962 )
16963 )
16964 );
16965 break;
16966 }
16967}
16968
16969template <typename E>
16970std::shared_ptr<
16973 const std::shared_ptr<
16975 >& that,
16976 const std::function<
16977 std::shared_ptr<E>(
16978 const std::shared_ptr<types::IClass>&
16979 )
16980 >& factory
16981) {
16982 impl::AssertNotEnhanced<
16983 E,
16985 >(that);
16986
16987 switch (that->model_type()) {
16989 return impl::WrapLevelType<E>(
16990 that,
16991 factory
16992 );
16993 break;
16994 default:
16995 throw std::invalid_argument(
16997 "Unexpected model type: ",
16998 std::to_string(
16999 static_cast<std::uint32_t>(
17000 that->model_type()
17001 )
17002 )
17003 )
17004 );
17005 break;
17006 }
17007}
17008
17009template <typename E>
17010std::shared_ptr<
17013 const std::shared_ptr<
17015 >& that,
17016 const std::function<
17017 std::shared_ptr<E>(
17018 const std::shared_ptr<types::IClass>&
17019 )
17020 >& factory
17021) {
17022 impl::AssertNotEnhanced<
17023 E,
17025 >(that);
17026
17027 switch (that->model_type()) {
17029 return impl::WrapValueReferencePair<E>(
17030 that,
17031 factory
17032 );
17033 break;
17034 default:
17035 throw std::invalid_argument(
17037 "Unexpected model type: ",
17038 std::to_string(
17039 static_cast<std::uint32_t>(
17040 that->model_type()
17041 )
17042 )
17043 )
17044 );
17045 break;
17046 }
17047}
17048
17049template <typename E>
17050std::shared_ptr<
17053 const std::shared_ptr<
17055 >& that,
17056 const std::function<
17057 std::shared_ptr<E>(
17058 const std::shared_ptr<types::IClass>&
17059 )
17060 >& factory
17061) {
17062 impl::AssertNotEnhanced<
17063 E,
17065 >(that);
17066
17067 switch (that->model_type()) {
17069 return impl::WrapValueList<E>(
17070 that,
17071 factory
17072 );
17073 break;
17074 default:
17075 throw std::invalid_argument(
17077 "Unexpected model type: ",
17078 std::to_string(
17079 static_cast<std::uint32_t>(
17080 that->model_type()
17081 )
17082 )
17083 )
17084 );
17085 break;
17086 }
17087}
17088
17089template <typename E>
17090std::shared_ptr<
17093 const std::shared_ptr<
17095 >& that,
17096 const std::function<
17097 std::shared_ptr<E>(
17098 const std::shared_ptr<types::IClass>&
17099 )
17100 >& factory
17101) {
17102 impl::AssertNotEnhanced<
17103 E,
17105 >(that);
17106
17107 switch (that->model_type()) {
17109 return impl::WrapLangStringPreferredNameTypeIec61360<E>(
17110 that,
17111 factory
17112 );
17113 break;
17114 default:
17115 throw std::invalid_argument(
17117 "Unexpected model type: ",
17118 std::to_string(
17119 static_cast<std::uint32_t>(
17120 that->model_type()
17121 )
17122 )
17123 )
17124 );
17125 break;
17126 }
17127}
17128
17129template <typename E>
17130std::shared_ptr<
17133 const std::shared_ptr<
17135 >& that,
17136 const std::function<
17137 std::shared_ptr<E>(
17138 const std::shared_ptr<types::IClass>&
17139 )
17140 >& factory
17141) {
17142 impl::AssertNotEnhanced<
17143 E,
17145 >(that);
17146
17147 switch (that->model_type()) {
17149 return impl::WrapLangStringShortNameTypeIec61360<E>(
17150 that,
17151 factory
17152 );
17153 break;
17154 default:
17155 throw std::invalid_argument(
17157 "Unexpected model type: ",
17158 std::to_string(
17159 static_cast<std::uint32_t>(
17160 that->model_type()
17161 )
17162 )
17163 )
17164 );
17165 break;
17166 }
17167}
17168
17169template <typename E>
17170std::shared_ptr<
17173 const std::shared_ptr<
17175 >& that,
17176 const std::function<
17177 std::shared_ptr<E>(
17178 const std::shared_ptr<types::IClass>&
17179 )
17180 >& factory
17181) {
17182 impl::AssertNotEnhanced<
17183 E,
17185 >(that);
17186
17187 switch (that->model_type()) {
17189 return impl::WrapLangStringDefinitionTypeIec61360<E>(
17190 that,
17191 factory
17192 );
17193 break;
17194 default:
17195 throw std::invalid_argument(
17197 "Unexpected model type: ",
17198 std::to_string(
17199 static_cast<std::uint32_t>(
17200 that->model_type()
17201 )
17202 )
17203 )
17204 );
17205 break;
17206 }
17207}
17208
17209template <typename E>
17210std::shared_ptr<
17211 types::IDataSpecificationIec61360
17213 const std::shared_ptr<
17214 types::IDataSpecificationIec61360
17215 >& that,
17216 const std::function<
17217 std::shared_ptr<E>(
17218 const std::shared_ptr<types::IClass>&
17219 )
17220 >& factory
17221) {
17222 impl::AssertNotEnhanced<
17223 E,
17224 types::IDataSpecificationIec61360
17225 >(that);
17226
17227 switch (that->model_type()) {
17229 return impl::WrapDataSpecificationIec61360<E>(
17230 that,
17231 factory
17232 );
17233 break;
17234 default:
17235 throw std::invalid_argument(
17237 "Unexpected model type: ",
17238 std::to_string(
17239 static_cast<std::uint32_t>(
17240 that->model_type()
17241 )
17242 )
17243 )
17244 );
17245 break;
17246 }
17247}
17248
17250
17258template <typename E>
17259std::shared_ptr<E> Unwrap(
17260 const std::shared_ptr<types::IClass>& that
17261) {
17262 const std::shared_ptr<impl::IEnhanced<E> >& maybe_enhanced(
17263 std::dynamic_pointer_cast<impl::IEnhanced<E> >(that)
17264 );
17265
17266 if (!maybe_enhanced) {
17267 return nullptr;
17268 }
17269
17270 return maybe_enhanced->enhancement();
17271}
17272
17283template <typename E>
17284std::shared_ptr<E> MustUnwrap(
17285 const std::shared_ptr<types::IClass>& that
17286) {
17287 std::shared_ptr<E> enhancement(
17288 Unwrap<E>(that)
17289 );
17290 if (!enhancement) {
17291 throw std::invalid_argument(
17293 "Expected an instance of ",
17294 stringification::to_string(that->model_type()),
17295 " to have been already wrapped with an enhancement, "
17296 "but it has been not."
17297 )
17298 );
17299 }
17300 return enhancement;
17301}
17302
17303} // namespace enhancing
17304
17305
17306} // namespace aas_3_0
17307} // namespace aas_core
17308
17309// This code has been automatically generated by aas-core-codegen.
17310// Do NOT edit or append.
17311
17312#endif // AAS_CORE_AAS_3_0_ENHANCING_GUARD_
Strings with language tags.
Definition types.hpp:2777
Administrative meta-information for an element like version information.
Definition types.hpp:863
An annotated relationship element is a relationship element that can be annotated with additional dat...
Definition types.hpp:1949
An asset administration shell.
Definition types.hpp:1076
In IAssetInformation identifying meta data of the asset that is represented by an AAS is defined.
Definition types.hpp:1178
A basic event element.
Definition types.hpp:2238
A IBlob is a data element that represents a file that is contained with its source code in the value ...
Definition types.hpp:1860
A capability is the implementation-independent description of the potential of an asset to achieve a ...
Definition types.hpp:2498
Definition types.hpp:456
The semantics of a property or other elements that may have a semantic description is defined by a co...
Definition types.hpp:2563
A data element is a submodel element that is not further composed out of other submodel elements.
Definition types.hpp:1653
Data specification content is part of a data specification template and defines which additional attr...
Definition types.hpp:2920
Embed the content of a data specification.
Definition types.hpp:2927
An entity is a submodel element that is used to model entities.
Definition types.hpp:1987
Container for the sets of different identifiables.
Definition types.hpp:2828
An event element.
Definition types.hpp:2228
Defines the necessary information of an event instance sent out or received.
Definition types.hpp:2077
Single extension of an element.
Definition types.hpp:529
A File is a data element that represents an address to a file (a locator).
Definition types.hpp:1911
Element that can be extended by using data specification templates.
Definition types.hpp:825
Element that can be extended by proprietary extensions.
Definition types.hpp:606
An element with a kind is an element that can either represent a template or an instance.
Definition types.hpp:797
Element that can have a semantic definition plus some supplemental semantic definitions.
Definition types.hpp:472
An element that has a globally unique identifier.
Definition types.hpp:752
A key is a reference to an element by its ID.
Definition types.hpp:2734
String with length 1023 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3127
String with length 128 maximum and minimum 1 characters and with language tags.
Definition types.hpp:2810
String with length 255 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3113
String with length 18 maximum and minimum 1 characters and with language tags.
Definition types.hpp:3120
String with length 1023 maximum and minimum 1 characters and with language tags.
Definition types.hpp:2817
Value represented by up to four variants of a numeric value in a specific role: MIN,...
Definition types.hpp:2990
A property is a data element that has a multi-language value.
Definition types.hpp:1726
The value of an operation variable is a submodel element that is used as input and/or output variable...
Definition types.hpp:2474
An operation is a submodel element with input and output variables.
Definition types.hpp:2391
A property is a data element that has a single value.
Definition types.hpp:1667
The value of a qualifiable element may be further qualified by one or more qualifiers.
Definition types.hpp:946
A qualifier is a type-value-pair that makes additional statements w.r.t. the value of the element.
Definition types.hpp:989
A range data element is a data element that defines a range with min and max.
Definition types.hpp:1779
An element that is referable by its IReferable::id_short.
Definition types.hpp:645
A reference element is a data element that defines a logical reference to another element within the ...
Definition types.hpp:1831
Reference to either a model element of the same or another AAS or to an external entity.
Definition types.hpp:2669
A relationship element is used to define a relationship between two elements being either referable (...
Definition types.hpp:1446
Resource represents an address to a file (a locator). The value is an URI that can represent an absol...
Definition types.hpp:1286
A specific asset ID describes a generic supplementary identifying attribute of the asset.
Definition types.hpp:1330
A submodel element collection is a kind of struct, i.e. a a logical encapsulation of multiple named v...
Definition types.hpp:1611
A submodel element list is an ordered list of submodel elements.
Definition types.hpp:1511
A submodel element is an element suitable for the description and differentiation of assets.
Definition types.hpp:1438
A submodel defines a specific aspect of the asset represented by the AAS.
Definition types.hpp:1393
A set of value reference pairs.
Definition types.hpp:3085
A value reference pair within a value list. Each value has a global unique id defining its semantic.
Definition types.hpp:3050
std::string to_string(types::ModelType model_type)
std::string Concat(const std::string &part0, const std::string &part1)
Definition enhancing.hpp:23
std::shared_ptr< E > MustUnwrap(const std::shared_ptr< types::IClass > &that)
Definition enhancing.hpp:17284
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:14388
std::shared_ptr< E > Unwrap(const std::shared_ptr< types::IClass > &that)
Definition enhancing.hpp:17259
AasSubmodelElements
Enumeration of all possible elements of a ISubmodelElementList.
Definition types.hpp:115
ModellingKind
Enumeration for denoting whether an element is a template or an instance.
Definition types.hpp:75
ModelType
Definition types.hpp:33
@ kAdministrativeInformation
Definition types.hpp:35
@ kBasicEventElement
Definition types.hpp:54
@ kRelationshipElement
Definition types.hpp:42
@ kFile
Definition types.hpp:50
@ kValueList
Definition types.hpp:67
@ kAssetInformation
Definition types.hpp:38
@ kLevelType
Definition types.hpp:65
@ kRange
Definition types.hpp:47
@ kOperationVariable
Definition types.hpp:56
@ kReferenceElement
Definition types.hpp:48
@ kKey
Definition types.hpp:60
@ kSubmodel
Definition types.hpp:41
@ kLangStringTextType
Definition types.hpp:62
@ kValueReferencePair
Definition types.hpp:66
@ kSubmodelElementCollection
Definition types.hpp:44
@ kBlob
Definition types.hpp:49
@ kEmbeddedDataSpecification
Definition types.hpp:64
@ kLangStringDefinitionTypeIec61360
Definition types.hpp:70
@ kEntity
Definition types.hpp:52
@ kCapability
Definition types.hpp:57
@ kMultiLanguageProperty
Definition types.hpp:46
@ kEventPayload
Definition types.hpp:53
@ kEnvironment
Definition types.hpp:63
@ kProperty
Definition types.hpp:45
@ kQualifier
Definition types.hpp:36
@ kDataSpecificationIec61360
Definition types.hpp:71
@ kExtension
Definition types.hpp:34
@ kAssetAdministrationShell
Definition types.hpp:37
@ kLangStringNameType
Definition types.hpp:61
@ kSubmodelElementList
Definition types.hpp:43
@ kReference
Definition types.hpp:59
@ kSpecificAssetId
Definition types.hpp:40
@ kResource
Definition types.hpp:39
@ kOperation
Definition types.hpp:55
@ kLangStringPreferredNameTypeIec61360
Definition types.hpp:68
@ kLangStringShortNameTypeIec61360
Definition types.hpp:69
@ kAnnotatedRelationshipElement
Definition types.hpp:51
@ kConceptDescription
Definition types.hpp:58
DataTypeDefXsd
Enumeration listing all XSD anySimpleTypes.
Definition types.hpp:230
EntityType
Enumeration for denoting whether an entity is a self-managed entity or a co-managed entity.
Definition types.hpp:137
AssetKind
Enumeration for denoting whether an asset is a type asset or an instance asset.
Definition types.hpp:105
ReferenceTypes
Reference types.
Definition types.hpp:171
StateOfEvent
State of an event.
Definition types.hpp:163
Direction
Direction.
Definition types.hpp:152
QualifierKind
Enumeration for kinds of qualifiers.
Definition types.hpp:88
KeyTypes
Enumeration of different key value types within a key.
Definition types.hpp:179
Definition common.hpp:47
Definition common.hpp:46