Compute Graph Framework SDK Reference  5.6
ParameterDescriptor.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DW_FRAMEWORK_PARAMETERDESCRIPTOR_HPP_
32#define DW_FRAMEWORK_PARAMETERDESCRIPTOR_HPP_
33
36#include <dw/core/container/StringView.hpp>
37#include <dw/core/language/Tuple.hpp>
38
39namespace dw
40{
41namespace framework
42{
43
44// Indices within the tuple describing constructor arguments
45// coverity[autosar_cpp14_a0_1_1_violation]
46// coverity[autosar_cpp14_m0_1_4_violation]
47static constexpr size_t PARAMETER_CONSTRUCTOR_ARGUMENT_TYPE{0U};
48// coverity[autosar_cpp14_a0_1_1_violation]
49// coverity[autosar_cpp14_m0_1_4_violation]
51
58constexpr std::tuple<> describeConstructorArguments()
59{
60 return std::make_tuple();
61}
62
69template <
70 typename Argument1T,
71 typename Arg1>
72// Overloaded functions are provided for ease of use
73// coverity[autosar_cpp14_a2_10_5_violation]
74// coverity[autosar_cpp14_a13_3_1_violation]
75constexpr auto describeConstructorArguments(const Arg1&& arg1)
76{
77 return std::make_tuple(
78 std::make_tuple(
79 static_cast<Argument1T*>(nullptr),
80 std::forward<const Arg1>(arg1)));
81}
82
89template <
90 typename Argument1T, typename Argument2T,
91 typename Arg1, typename Arg2>
92// Overloaded functions are provided for ease of use
93// coverity[autosar_cpp14_a2_10_5_violation]
94// coverity[autosar_cpp14_a13_3_1_violation]
95constexpr auto describeConstructorArguments(const Arg1&& arg1, const Arg2&& arg2)
96{
97 return std::make_tuple(
98 std::make_tuple(
99 static_cast<Argument1T*>(nullptr),
100 std::forward<const Arg1>(arg1)),
101 std::make_tuple(
102 static_cast<Argument2T*>(nullptr),
103 std::forward<const Arg2>(arg2)));
104}
105
112template <
113 typename Argument1T, typename Argument2T, typename Argument3T,
114 typename Arg1, typename Arg2, typename Arg3>
115// Overloaded functions are provided for ease of use
116// coverity[autosar_cpp14_a2_10_5_violation]
117// coverity[autosar_cpp14_a13_3_1_violation]
118constexpr auto describeConstructorArguments(const Arg1&& arg1, const Arg2&& arg2, const Arg3&& arg3)
119{
120 return std::make_tuple(
121 std::make_tuple(
122 static_cast<Argument1T*>(nullptr),
123 std::forward<const Arg1>(arg1)),
124 std::make_tuple(
125 static_cast<Argument2T*>(nullptr),
126 std::forward<const Arg2>(arg2)),
127 std::make_tuple(
128 static_cast<Argument3T*>(nullptr),
129 std::forward<const Arg3>(arg3)));
130}
131
138template <
139 typename Argument1T, typename Argument2T, typename Argument3T, typename Argument4T,
140 typename Arg1, typename Arg2, typename Arg3, typename Arg4>
141// Overloaded functions are provided for ease of use
142// coverity[autosar_cpp14_a2_10_5_violation]
143// coverity[autosar_cpp14_a13_3_1_violation]
144constexpr auto describeConstructorArguments(const Arg1&& arg1, const Arg2&& arg2, const Arg3&& arg3, const Arg4&& arg4)
145{
146 return std::make_tuple(
147 std::make_tuple(
148 static_cast<Argument1T*>(nullptr),
149 std::forward<const Arg1>(arg1)),
150 std::make_tuple(
151 static_cast<Argument2T*>(nullptr),
152 std::forward<const Arg2>(arg2)),
153 std::make_tuple(
154 static_cast<Argument3T*>(nullptr),
155 std::forward<const Arg3>(arg3)),
156 std::make_tuple(
157 static_cast<Argument4T*>(nullptr),
158 std::forward<const Arg4>(arg4)));
159}
160
167template <
168 typename Argument1T, typename Argument2T, typename Argument3T, typename Argument4T, typename Argument5T,
169 typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
170// Overloaded functions are provided for ease of use
171// coverity[autosar_cpp14_a2_10_5_violation]
172// coverity[autosar_cpp14_a13_3_1_violation]
173constexpr auto describeConstructorArguments(const Arg1&& arg1, const Arg2&& arg2, const Arg3&& arg3, const Arg4&& arg4, const Arg5&& arg5)
174{
175 return std::make_tuple(
176 std::make_tuple(
177 static_cast<Argument1T*>(nullptr),
178 std::forward<const Arg1>(arg1)),
179 std::make_tuple(
180 static_cast<Argument2T*>(nullptr),
181 std::forward<const Arg2>(arg2)),
182 std::make_tuple(
183 static_cast<Argument3T*>(nullptr),
184 std::forward<const Arg3>(arg3)),
185 std::make_tuple(
186 static_cast<Argument4T*>(nullptr),
187 std::forward<const Arg4>(arg4)),
188 std::make_tuple(
189 static_cast<Argument5T*>(nullptr),
190 std::forward<const Arg5>(arg5)));
191}
192
199template <typename... Args>
200constexpr auto describeConstructorArgument(const Args&&... args)
201{
202 return dw::core::make_tuple(
203 std::forward<const Args>(args)...);
204}
205
206// Indices within the tuple describing parameters
207// coverity[autosar_cpp14_a0_1_1_violation]
208// coverity[autosar_cpp14_m0_1_4_violation]
209static constexpr size_t PARAMETER_TYPE_NAME{0U};
210// coverity[autosar_cpp14_a0_1_1_violation]
211// coverity[autosar_cpp14_m0_1_4_violation]
212static constexpr size_t PARAMETER_NAME{1U};
213// coverity[autosar_cpp14_a0_1_1_violation]
214// coverity[autosar_cpp14_m0_1_4_violation]
215static constexpr size_t PARAMETER_TYPE{2U};
216// coverity[autosar_cpp14_a0_1_1_violation]
217// coverity[autosar_cpp14_m0_1_4_violation]
218static constexpr size_t PARAMETER_SEMANTIC_TYPE{3U};
219// coverity[autosar_cpp14_a0_1_1_violation]
220// coverity[autosar_cpp14_m0_1_4_violation]
221static constexpr size_t PARAMETER_IS_INDEX{4U};
222// coverity[autosar_cpp14_a0_1_1_violation]
223// coverity[autosar_cpp14_m0_1_4_violation]
224static constexpr size_t PARAMETER_ARRAY_SIZE{5U};
225// coverity[autosar_cpp14_a0_1_1_violation]
226// coverity[autosar_cpp14_m0_1_4_violation]
227static constexpr size_t PARAMETER_MEMBER_PTRS{6U};
228// coverity[autosar_cpp14_a0_1_1_violation]
229// coverity[autosar_cpp14_m0_1_4_violation]
230static constexpr size_t PARAMETER_DEFAULT_VALUE{7U};
231
232} // namespace framework
233} // namespace dw
234
235// This is the only language feature able to avoid duplicating enumerators as strings
236// coverity[autosar_cpp14_a16_0_1_violation]
237// coverity[autosar_cpp14_m16_3_2_violation]
238#define DW_PARAMETER_TYPE_NAME_STRING_VIEW(TYPE_NAME_STR) TYPE_NAME_STR##_sv
239// This is the only language feature able to avoid duplicating enumerators as strings
240// TODO(dwplc): FP -- Cannot enclose template type in parentheses
241// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
242// coverity[autosar_cpp14_a16_0_1_violation]
243// coverity[autosar_cpp14_m16_0_6_violation]
244// coverity[autosar_cpp14_m16_3_1_violation]
245// coverity[autosar_cpp14_m16_3_2_violation]
246#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...) dw::framework::describeParameter<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
247// This is the only language feature able to avoid duplicating enumerators as strings
248// TODO(dwplc): FP -- Cannot enclose template type in parentheses
249// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
250// coverity[autosar_cpp14_a16_0_1_violation]
251// coverity[autosar_cpp14_m16_0_6_violation]
252// coverity[autosar_cpp14_m16_3_1_violation]
253// coverity[autosar_cpp14_m16_3_2_violation]
254#define DW_DESCRIBE_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...) dw::framework::describeParameter<TYPE_NAME, SEMANTIC_TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
255
256namespace dw
257{
258namespace framework
259{
260
269template <typename T, typename S, typename... MemberPointers>
270constexpr auto describeParameter(
271 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, const MemberPointers&&... memberPointers)
272{
273 return std::make_tuple(
274 std::move(typeName),
275 std::move(parameterName),
276 static_cast<T*>(nullptr),
277 static_cast<S*>(nullptr),
278 false,
279 static_cast<size_t>(0),
280 std::move(
281 std::make_tuple<const MemberPointers...>(std::forward<const MemberPointers>(memberPointers)...)));
282}
283
284} // namespace framework
285} // namespace dw
286
287// This is the only language feature able to avoid duplicating enumerators as strings
288// TODO(dwplc): FP -- Cannot enclose template type in parentheses
289// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
290// coverity[autosar_cpp14_a16_0_1_violation]
291// coverity[autosar_cpp14_m16_0_6_violation]
292// coverity[autosar_cpp14_m16_3_1_violation]
293// coverity[autosar_cpp14_m16_3_2_violation]
294#define DW_DESCRIBE_ABSTRACT_PARAMETER(TYPE_NAME, args...) dw::framework::describeAbstractParameter<TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
295// This is the only language feature able to avoid duplicating enumerators as strings
296// TODO(dwplc): FP -- Cannot enclose template type in parentheses
297// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
298// coverity[autosar_cpp14_a16_0_1_violation]
299// coverity[autosar_cpp14_m16_0_6_violation]
300// coverity[autosar_cpp14_m16_3_1_violation]
301// coverity[autosar_cpp14_m16_3_2_violation]
302#define DW_DESCRIBE_ABSTRACT_ARRAY_PARAMETER(TYPE_NAME, args...) dw::framework::describeAbstractArrayParameter<TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
303
304namespace dw
305{
306namespace framework
307{
308
314template <typename T>
316 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName)
317{
318 return std::make_tuple(
319 std::move(typeName),
320 std::move(parameterName),
321 static_cast<T*>(nullptr),
322 static_cast<T*>(nullptr),
323 false,
324 static_cast<size_t>(0));
325}
326
332template <typename T>
334 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, size_t arraySize)
335{
336 return std::make_tuple(
337 std::move(typeName),
338 std::move(parameterName),
339 static_cast<T*>(nullptr),
340 static_cast<T*>(nullptr),
341 false,
342 arraySize);
343}
344
345} // namespace framework
346} // namespace dw
347
348// This is the only language feature able to avoid duplicating enumerators as strings
349// TODO(dwplc): FP -- Cannot enclose template type in parentheses
350// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
351// coverity[autosar_cpp14_a16_0_1_violation]
352// coverity[autosar_cpp14_m16_0_6_violation]
353// coverity[autosar_cpp14_m16_3_1_violation]
354// coverity[autosar_cpp14_m16_3_2_violation]
355#define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...) dw::framework::describeIndexParameter<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
356// This is the only language feature able to avoid duplicating enumerators as strings
357// TODO(dwplc): FP -- Cannot enclose template type in parentheses
358// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
359// coverity[autosar_cpp14_a16_0_1_violation]
360// coverity[autosar_cpp14_m16_0_6_violation]
361// coverity[autosar_cpp14_m16_3_1_violation]
362// coverity[autosar_cpp14_m16_3_2_violation]
363#define DW_DESCRIBE_INDEX_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...) dw::framework::describeIndexParameter<TYPE_NAME, SEMANTIC_TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
364
365namespace dw
366{
367namespace framework
368{
369
376template <typename T, typename S, typename... MemberPointers>
378 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, const MemberPointers&&... memberPointers)
379{
380 return std::make_tuple(
381 std::move(typeName),
382 std::move(parameterName),
383 static_cast<T*>(nullptr),
384 static_cast<S*>(nullptr),
385 true,
386 static_cast<size_t>(0),
387 std::move(
388 std::make_tuple<const MemberPointers...>(std::forward<const MemberPointers>(memberPointers)...)));
389}
390
391} // namespace framework
392} // namespace dw
393
394// This is the only language feature able to avoid duplicating enumerators as strings
395// TODO(dwplc): FP -- Cannot enclose template type in parentheses
396// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
397// coverity[autosar_cpp14_a16_0_1_violation]
398// coverity[autosar_cpp14_m16_0_6_violation]
399// coverity[autosar_cpp14_m16_3_1_violation]
400// coverity[autosar_cpp14_m16_3_2_violation]
401#define DW_DESCRIBE_ARRAY_PARAMETER(TYPE_NAME, args...) dw::framework::describeArrayParameter<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
402// This is the only language feature able to avoid duplicating enumerators as strings
403// TODO(dwplc): FP -- Cannot enclose template type in parentheses
404// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
405// coverity[autosar_cpp14_a16_0_1_violation]
406// coverity[autosar_cpp14_m16_0_6_violation]
407// coverity[autosar_cpp14_m16_3_1_violation]
408// coverity[autosar_cpp14_m16_3_2_violation]
409#define DW_DESCRIBE_ARRAY_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...) dw::framework::describeArrayParameter<TYPE_NAME, SEMANTIC_TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
410
411namespace dw
412{
413namespace framework
414{
415
421template <typename T, typename S, typename... MemberPointers>
423 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, size_t arraySize, const MemberPointers&&... memberPointers)
424{
425 return std::make_tuple(
426 std::move(typeName),
427 std::move(parameterName),
428 static_cast<T*>(nullptr),
429 static_cast<S*>(nullptr),
430 false,
431 arraySize,
432 std::move(
433 std::make_tuple<const MemberPointers...>(std::forward<const MemberPointers>(memberPointers)...)));
434}
435
436} // namespace framework
437} // namespace dw
438
439// This is the only language feature able to avoid duplicating enumerators as strings
440// TODO(dwplc): FP -- Cannot enclose template type in parentheses
441// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
442// coverity[autosar_cpp14_a16_0_1_violation]
443// coverity[autosar_cpp14_m16_0_6_violation]
444// coverity[autosar_cpp14_m16_3_1_violation]
445// coverity[autosar_cpp14_m16_3_2_violation]
446#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...) dw::framework::describeUnnamedParameter<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
447// This is the only language feature able to avoid duplicating enumerators as strings
448// TODO(dwplc): FP -- Cannot enclose template type in parentheses
449// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
450// coverity[autosar_cpp14_a16_0_1_violation]
451// coverity[autosar_cpp14_m16_0_6_violation]
452// coverity[autosar_cpp14_m16_3_1_violation]
453// coverity[autosar_cpp14_m16_3_2_violation]
454#define DW_DESCRIBE_UNNAMED_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...) dw::framework::describeUnnamedParameter<TYPE_NAME, SEMANTIC_TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
455
456namespace dw
457{
458namespace framework
459{
460
467template <typename T, typename S, typename... MemberPointers>
469 dw::core::StringView const&& typeName, const MemberPointers&&... memberPointers)
470{
471 return describeParameter<T, S>(
472 std::move(typeName),
473 ""_sv,
474 std::forward<const MemberPointers>(memberPointers)...);
475}
476
477} // namespace framework
478} // namespace dw
479
480// This is the only language feature able to avoid duplicating enumerators as strings
481// TODO(dwplc): FP -- Cannot enclose template type in parentheses
482// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
483// coverity[autosar_cpp14_a16_0_1_violation]
484// coverity[autosar_cpp14_m16_0_6_violation]
485// coverity[autosar_cpp14_m16_3_1_violation]
486// coverity[autosar_cpp14_m16_3_2_violation]
487#define DW_DESCRIBE_UNNAMED_ARRAY_PARAMETER(TYPE_NAME, args...) dw::framework::describeUnnamedArrayParameter<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
488// This is the only language feature able to avoid duplicating enumerators as strings
489// TODO(dwplc): FP -- Cannot enclose template type in parentheses
490// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
491// coverity[autosar_cpp14_a16_0_1_violation]
492// coverity[autosar_cpp14_m16_0_6_violation]
493// coverity[autosar_cpp14_m16_3_1_violation]
494// coverity[autosar_cpp14_m16_3_2_violation]
495#define DW_DESCRIBE_UNNAMED_ARRAY_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...) dw::framework::describeUnnamedArrayParameter<TYPE_NAME, SEMANTIC_TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
496
497namespace dw
498{
499namespace framework
500{
501
508template <typename T, typename S, typename... MemberPointers>
510 dw::core::StringView const&& typeName, size_t arraySize, const MemberPointers&&... memberPointers)
511{
512 return describeArrayParameter<T, S>(
513 std::move(typeName),
514 ""_sv,
515 arraySize,
516 std::forward<const MemberPointers>(memberPointers)...);
517}
518
519} // namespace framework
520} // namespace dw
521
522// This is the only language feature able to avoid duplicating enumerators as strings
523// TODO(dwplc): FP -- Cannot enclose template type in parentheses
524// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
525// coverity[autosar_cpp14_a16_0_1_violation]
526// coverity[autosar_cpp14_m16_0_6_violation]
527// coverity[autosar_cpp14_m16_3_1_violation]
528// coverity[autosar_cpp14_m16_3_2_violation]
529#define DW_DESCRIBE_PARAMETER_WITH_DEFAULT(TYPE_NAME, args...) dw::framework::describeParameterWithDefault<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
530
531namespace dw
532{
533namespace framework
534{
535
541template <typename T, typename S, typename... MemberPointers>
543 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, T defaultValue, const MemberPointers&&... memberPointers)
544{
545 return std::make_tuple(
546 std::move(typeName),
547 std::move(parameterName),
548 static_cast<T*>(nullptr),
549 static_cast<S*>(nullptr),
550 false,
551 static_cast<size_t>(0),
552 std::move(
553 std::make_tuple<const MemberPointers...>(std::forward<const MemberPointers>(memberPointers)...)),
554 std::move(defaultValue));
555}
556
557} // namespace framework
558} // namespace dw
559
560// This is the only language feature able to avoid duplicating enumerators as strings
561// TODO(dwplc): FP -- Cannot enclose template type in parentheses
562// the macro must perform stringification of the type as well as accept an arbitrary number of member pointers
563// coverity[autosar_cpp14_a16_0_1_violation]
564// coverity[autosar_cpp14_m16_0_6_violation]
565// coverity[autosar_cpp14_m16_3_1_violation]
566// coverity[autosar_cpp14_m16_3_2_violation]
567#define DW_DESCRIBE_ARRAY_PARAMETER_WITH_DEFAULT(TYPE_NAME, args...) dw::framework::describeArrayParameterWithDefault<TYPE_NAME, TYPE_NAME>(DW_PARAMETER_TYPE_NAME_STRING_VIEW(#TYPE_NAME), ##args)
568
569namespace dw
570{
571namespace framework
572{
573
579template <typename T, typename S, size_t ArraySize, typename... MemberPointers>
581 dw::core::StringView const&& typeName, dw::core::StringView const&& parameterName, std::array<T, ArraySize> defaultValue, const MemberPointers&&... memberPointers)
582{
583 return std::make_tuple(
584 std::move(typeName),
585 std::move(parameterName),
586 static_cast<T*>(nullptr),
587 static_cast<S*>(nullptr),
588 false,
589 ArraySize,
590 std::move(
591 std::make_tuple<const MemberPointers...>(std::forward<const MemberPointers>(memberPointers)...)),
592 std::move(defaultValue));
593}
594
596template <typename NodeT>
597constexpr auto describeParameters()
598{
600}
601
602namespace detail
603{
604
606template <
607 typename Param, typename MemberPtr,
608 typename std::enable_if_t<std::tuple_size<Param>() <= PARAMETER_DEFAULT_VALUE, void>* = nullptr>
609// Output parameter is needed to populate member of arbitrary struct
610// coverity[autosar_cpp14_a8_4_8_violation]
611void populateDefault(const Param& param, MemberPtr& memberPtr)
612{
613 static_cast<void>(param);
614 static_cast<void>(memberPtr);
615}
616
618template <
619 typename Param, typename MemberPtr,
620 typename std::enable_if_t<PARAMETER_DEFAULT_VALUE<std::tuple_size<Param>(), void>* = nullptr>
621 // TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
622 // Output parameter is needed to populate member of arbitrary struct
623 // coverity[autosar_cpp14_a2_10_5_violation]
624 // coverity[autosar_cpp14_a8_4_8_violation]
625 void populateDefault(const Param& param, MemberPtr& memberPtr)
626{
627 auto defaultValue = std::get<PARAMETER_DEFAULT_VALUE>(param);
628 memberPtr = defaultValue;
629}
630
632template <
633 typename Param, typename MemberPtr,
634 typename std::enable_if_t<std::tuple_size<Param>() <= PARAMETER_DEFAULT_VALUE, void>* = nullptr>
635// Output parameter is needed to populate member of arbitrary struct
636// coverity[autosar_cpp14_a8_4_8_violation]
637void populateArrayDefault(const Param& param, MemberPtr& memberPtr, size_t index)
638{
639 static_cast<void>(param);
640 static_cast<void>(memberPtr);
641 static_cast<void>(index);
642}
643
645template <
646 typename Param, typename MemberPtr,
647 typename std::enable_if_t<PARAMETER_DEFAULT_VALUE<std::tuple_size<Param>(), void>* = nullptr>
648 // TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
649 // Output parameter is needed to populate member of arbitrary struct
650 // coverity[autosar_cpp14_a2_10_5_violation]
651 // coverity[autosar_cpp14_a8_4_8_violation]
652 void populateArrayDefault(const Param& param, MemberPtr& memberPtr, size_t index)
653{
654 auto defaultValue = std::get<PARAMETER_DEFAULT_VALUE>(param);
655 memberPtr[index] = defaultValue[index];
656}
657
659template <
660 size_t MemberIndex, typename ArgType, typename MemberPtrs,
661 typename std::enable_if_t<std::tuple_size<MemberPtrs>() == 0, void>* = nullptr>
662// Output parameter is needed to populate member of arbitrary struct
663// coverity[autosar_cpp14_a8_4_8_violation]
664auto& getMemberPtr(ArgType& arg, MemberPtrs memberPtrs)
665{
666 static_cast<void>(memberPtrs);
667 return arg;
668}
669
671template <
672 size_t MemberIndex, typename ArgType, typename MemberPtrs,
673 typename std::enable_if_t<MemberIndex + 1 == std::tuple_size<MemberPtrs>(), void>* = nullptr>
674// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
675// Output parameter is needed to populate member of arbitrary struct
676// coverity[autosar_cpp14_a2_10_5_violation]
677// coverity[autosar_cpp14_a8_4_8_violation]
678auto& getMemberPtr(ArgType& arg, MemberPtrs memberPtrs)
679{
680 auto member = std::get<MemberIndex>(memberPtrs);
681 return arg.*member;
682}
683
685template <
686 size_t MemberIndex, typename ArgType, typename MemberPtrs,
687 typename std::enable_if_t<MemberIndex + 1 < std::tuple_size<MemberPtrs>(), void>* = nullptr>
688// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
689// Output parameter is needed to populate member of arbitrary struct
690// coverity[autosar_cpp14_a2_10_5_violation]
691// coverity[autosar_cpp14_a8_4_8_violation]
692auto& getMemberPtr(ArgType& arg, MemberPtrs memberPtrs)
693{
694 auto& member = std::get<MemberIndex>(memberPtrs);
695 auto& m = arg.*member;
696 return getMemberPtr<MemberIndex + 1>(m, memberPtrs);
697}
698
700template <typename NodeT, size_t ConstructorParameterIndex>
701constexpr size_t constructorArgumentParameterSize()
702{
703 return dw::core::tuple_size<
704 std::tuple_element_t<
706 std::tuple_element_t<
707 ConstructorParameterIndex,
708 decltype(describeParameters<NodeT>())>>>();
709}
710
712template <
713 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
714 typename std::enable_if_t<ParamIndex == constructorArgumentParameterSize<NodeT, ConstructorParameterIndex>(), void>* = nullptr>
715// Output parameter is needed to populate member of arbitrary struct
716// coverity[autosar_cpp14_a8_4_8_violation]
717void populateParametersRecursion(const ParameterProvider& provider, ArgType& arg)
718{
719 static_cast<void>(arg);
720 static_cast<void>(provider);
721}
722
724template <typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex>
725constexpr bool isIndexParameter()
726{
727 constexpr auto param = dw::core::get<ParamIndex>(
728 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
729 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
730 return std::get<PARAMETER_IS_INDEX>(param);
731}
732
734template <typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex>
735constexpr bool isArrayParameter()
736{
737 constexpr auto param = dw::core::get<ParamIndex>(
738 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
739 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
740 constexpr size_t arraySize = std::get<
741 PARAMETER_ARRAY_SIZE>(param);
742 return arraySize > 0;
743}
744
746template <typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex>
747constexpr bool isAbstractParameter()
748{
749 constexpr auto param = dw::core::get<ParamIndex>(
750 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
751 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
752 return std::tuple_size<decltype(param)>() <= PARAMETER_MEMBER_PTRS;
753}
754
756template <
757 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
758 typename std::enable_if_t<isAbstractParameter<NodeT, ConstructorParameterIndex, ParamIndex>(), void>* = nullptr>
759// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
760// Output parameter is needed to populate member of arbitrary struct
761// coverity[autosar_cpp14_a2_10_5_violation]
762// coverity[autosar_cpp14_a8_4_8_violation]
763void populateParameter(const ParameterProvider& provider, ArgType& arg)
764{
765 static_cast<void>(arg);
766 static_cast<void>(provider);
767}
768
774template <
775 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
776 typename std::enable_if_t<!isAbstractParameter<NodeT, ConstructorParameterIndex, ParamIndex>() && !isArrayParameter<NodeT, ConstructorParameterIndex, ParamIndex>() && !isIndexParameter<NodeT, ConstructorParameterIndex, ParamIndex>(), void>* = nullptr>
777// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
778// Output parameter is needed to populate member of arbitrary struct
779// coverity[autosar_cpp14_a2_10_5_violation]
780// coverity[autosar_cpp14_a8_4_8_violation]
781void populateParameter(const ParameterProvider& provider, ArgType& arg)
782{
783 constexpr auto param = dw::core::get<ParamIndex>(
784 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
785 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
786
787 using DataType = std::remove_pointer_t<
788 std::tuple_element_t<
789 PARAMETER_TYPE, decltype(param)>>;
790 using SemanticDataType = std::remove_pointer_t<
791 std::tuple_element_t<
792 PARAMETER_SEMANTIC_TYPE, decltype(param)>>;
793
794 DataType& memberPtr = getMemberPtr<0>(arg, std::get<PARAMETER_MEMBER_PTRS>(param));
795 bool hadParameter = provider.getOptional<SemanticDataType, DataType>(std::get<PARAMETER_NAME>(param), &memberPtr);
796 if (!hadParameter)
797 {
798 populateDefault(param, memberPtr);
799 }
800}
801
807template <
808 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
809 typename std::enable_if_t<!isAbstractParameter<NodeT, ConstructorParameterIndex, ParamIndex>() && !isArrayParameter<NodeT, ConstructorParameterIndex, ParamIndex>() && isIndexParameter<NodeT, ConstructorParameterIndex, ParamIndex>(), void>* = nullptr>
810// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
811// Output parameter is needed to populate member of arbitrary struct
812// coverity[autosar_cpp14_a2_10_5_violation]
813// coverity[autosar_cpp14_a8_4_8_violation]
814void populateParameter(const ParameterProvider& provider, ArgType& arg)
815{
816 constexpr auto param = dw::core::get<ParamIndex>(
817 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
818 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
819
820 using DataType = std::remove_pointer_t<
821 std::tuple_element_t<
822 PARAMETER_TYPE, decltype(param)>>;
823 using SemanticDataType = std::remove_pointer_t<
824 std::tuple_element_t<
825 PARAMETER_SEMANTIC_TYPE, decltype(param)>>;
826 DataType& memberPtr = getMemberPtr<0>(arg, std::get<PARAMETER_MEMBER_PTRS>(param));
827
828 size_t index = static_cast<size_t>(-1);
829 bool hadParameter = provider.getOptional<size_t, size_t>(std::get<PARAMETER_NAME>(param), &index);
830 if (hadParameter)
831 {
832 hadParameter = provider.getOptional<SemanticDataType, DataType>("", index, &memberPtr);
833 }
834 if (!hadParameter)
835 {
836 populateDefault(param, memberPtr);
837 }
838}
839
845template <
846 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
847 typename std::enable_if_t<!isAbstractParameter<NodeT, ConstructorParameterIndex, ParamIndex>() && isArrayParameter<NodeT, ConstructorParameterIndex, ParamIndex>(), void>* = nullptr>
848// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
849// Output parameter is needed to populate member of arbitrary struct
850// coverity[autosar_cpp14_a2_10_5_violation]
851// coverity[autosar_cpp14_a8_4_8_violation]
852void populateParameter(const ParameterProvider& provider, ArgType& arg)
853{
854 constexpr auto param = dw::core::get<ParamIndex>(
855 std::get<PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR>(
856 std::get<ConstructorParameterIndex>(describeParameters<NodeT>())));
857
858 using DataType = std::remove_pointer_t<
859 std::tuple_element_t<
860 PARAMETER_TYPE, decltype(param)>>;
861 using SemanticDataType = std::remove_pointer_t<
862 std::tuple_element_t<
863 PARAMETER_SEMANTIC_TYPE, decltype(param)>>;
864
865 constexpr size_t arraySize = std::get<PARAMETER_ARRAY_SIZE>(
866 param);
867
868 DataType(&memberPtr)[arraySize] = getMemberPtr<0>(arg, std::get<PARAMETER_MEMBER_PTRS>(param));
869 for (size_t i = 0; i < arraySize; ++i)
870 {
871 bool hadParameter = provider.getOptional<SemanticDataType, DataType>(std::get<PARAMETER_NAME>(param), i, &memberPtr[i]);
872 if (!hadParameter)
873 {
874 populateArrayDefault(param, memberPtr, i);
875 }
876 }
877}
878
880template <
881 typename NodeT, size_t ConstructorParameterIndex, size_t ParamIndex, typename ArgType,
882 typename std::enable_if_t<ParamIndex<constructorArgumentParameterSize<NodeT, ConstructorParameterIndex>(), void>* = nullptr>
883 // TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
884 // Output parameter is needed to populate member of arbitrary struct
885 // coverity[autosar_cpp14_a2_10_5_violation]
886 // coverity[autosar_cpp14_a8_4_8_violation]
887 void populateParametersRecursion(const ParameterProvider& provider, ArgType& arg)
888{
889 populateParameter<NodeT, ConstructorParameterIndex, ParamIndex>(provider, arg);
890
891 populateParametersRecursion<NodeT, ConstructorParameterIndex, ParamIndex + 1>(provider, arg);
892}
893
899template <typename NodeT, size_t ConstructorParameterIndex, typename ArgType>
900// TODO(dwplc): FP -- The other populateParameters() functions are defined in the parent namespace
901// Output parameter is needed to populate member of arbitrary struct
902// coverity[autosar_cpp14_a2_10_5_violation]
903// coverity[autosar_cpp14_a8_4_8_violation]
904void populateParameters(const ParameterProvider& provider, ArgType& arg)
905{
906 try
907 {
908 populateParametersRecursion<NodeT, ConstructorParameterIndex, 0>(provider, arg);
909 }
910 catch (Exception& e)
911 {
912 throw Exception(e.status(), "Exception while populating parameters of mangled node type ", typeid(NodeT).name(), ": ", e.messageStr());
913 }
914}
915
916} // namespace detail
917
919template <
920 typename NodeT,
921 class ConstructorArguments,
922 typename std::enable_if_t<std::tuple_size<ConstructorArguments>() == 1, void>* = nullptr>
923// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
924// Output parameter is needed to populate member of arbitrary struct
925// coverity[autosar_cpp14_a2_10_5_violation]
926// coverity[autosar_cpp14_a8_4_8_violation]
927void populateParameters(ConstructorArguments& constructorArguments, const ParameterProvider& provider)
928{
929 auto& arg0 = std::get<0>(constructorArguments);
930 detail::populateParameters<NodeT, 0>(arg0, provider);
931}
932
934template <
935 typename NodeT,
936 class ConstructorArguments,
937 typename std::enable_if_t<std::tuple_size<ConstructorArguments>() == 2, void>* = nullptr>
938// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
939// Output parameter is needed to populate member of arbitrary struct
940// coverity[autosar_cpp14_a2_10_5_violation]
941// coverity[autosar_cpp14_a8_4_8_violation]
942void populateParameters(ConstructorArguments& constructorArguments, const ParameterProvider& provider)
943{
944 auto& arg0 = std::get<0>(constructorArguments);
945 detail::populateParameters<NodeT, 0>(provider, arg0);
946 auto& arg1 = std::get<1>(constructorArguments);
947 detail::populateParameters<NodeT, 1>(provider, arg1);
948}
949
951template <
952 typename NodeT,
953 class ConstructorArguments,
954 typename std::enable_if_t<std::tuple_size<ConstructorArguments>() == 3, void>* = nullptr>
955// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
956// Output parameter is needed to populate member of arbitrary struct
957// coverity[autosar_cpp14_a2_10_5_violation]
958// coverity[autosar_cpp14_a8_4_8_violation]
959void populateParameters(ConstructorArguments& constructorArguments, const ParameterProvider& provider)
960{
961 auto& arg0 = std::get<0>(constructorArguments);
962 detail::populateParameters<NodeT, 0>(provider, arg0);
963 auto& arg1 = std::get<1>(constructorArguments);
964 detail::populateParameters<NodeT, 1>(provider, arg1);
965 auto& arg2 = std::get<2>(constructorArguments);
966 detail::populateParameters<NodeT, 2>(provider, arg2);
967}
968
970template <
971 typename NodeT,
972 class ConstructorArguments,
973 typename std::enable_if_t<std::tuple_size<ConstructorArguments>() == 4, void>* = nullptr>
974// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
975// Output parameter is needed to populate member of arbitrary struct
976// coverity[autosar_cpp14_a2_10_5_violation]
977// coverity[autosar_cpp14_a8_4_8_violation]
978void populateParameters(ConstructorArguments& constructorArguments, const ParameterProvider& provider)
979{
980 auto& arg0 = std::get<0>(constructorArguments);
981 detail::populateParameters<NodeT, 0>(provider, arg0);
982 auto& arg1 = std::get<1>(constructorArguments);
983 detail::populateParameters<NodeT, 1>(provider, arg1);
984 auto& arg2 = std::get<2>(constructorArguments);
985 detail::populateParameters<NodeT, 2>(provider, arg2);
986 auto& arg3 = std::get<3>(constructorArguments);
987 detail::populateParameters<NodeT, 3>(provider, arg3);
988}
989
991template <
992 typename NodeT,
993 class ConstructorArguments,
994 typename std::enable_if_t<std::tuple_size<ConstructorArguments>() == 5, void>* = nullptr>
995// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
996// Output parameter is needed to populate member of arbitrary struct
997// coverity[autosar_cpp14_a2_10_5_violation]
998// coverity[autosar_cpp14_a8_4_8_violation]
999void populateParameters(ConstructorArguments& constructorArguments, const ParameterProvider& provider)
1000{
1001 auto& arg0 = std::get<0>(constructorArguments);
1002 detail::populateParameters<NodeT, 0>(provider, arg0);
1003 auto& arg1 = std::get<1>(constructorArguments);
1004 detail::populateParameters<NodeT, 1>(provider, arg1);
1005 auto& arg2 = std::get<2>(constructorArguments);
1006 detail::populateParameters<NodeT, 2>(provider, arg2);
1007 auto& arg3 = std::get<3>(constructorArguments);
1008 detail::populateParameters<NodeT, 3>(provider, arg3);
1009 auto& arg4 = std::get<4>(constructorArguments);
1010 detail::populateParameters<NodeT, 4>(provider, arg4);
1011}
1012
1013namespace detail
1014{
1015
1016// Get the Number of constructor arguments of the passed node.
1017template <typename NodeT>
1018constexpr std::size_t parameterConstructorArgumentSize()
1019{
1020 return std::tuple_size<decltype(describeParameters<NodeT>())>::value;
1021}
1022
1024template <
1025 typename NodeT, size_t ConstructorArgumentIndex,
1026 typename std::enable_if_t<ConstructorArgumentIndex == parameterConstructorArgumentSize<NodeT>(), void>* = nullptr>
1027// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
1028// coverity[autosar_cpp14_a2_10_5_violation]
1030{
1031 return std::make_tuple();
1032}
1033
1035template <
1036 typename NodeT, size_t ConstructorArgumentIndex,
1037 typename std::enable_if_t<ConstructorArgumentIndex<parameterConstructorArgumentSize<NodeT>(), void>* = nullptr>
1038 // TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
1039 // coverity[autosar_cpp14_a2_10_5_violation]
1041{
1042 using NodeParams = decltype(describeParameters<NodeT>());
1043
1044 using ConstructorParameter = std::tuple_element_t<ConstructorArgumentIndex, NodeParams>;
1045 using ArgType = std::remove_pointer_t<
1046 typename std::tuple_element_t<PARAMETER_CONSTRUCTOR_ARGUMENT_TYPE, ConstructorParameter>>;
1047 ArgType arg{};
1048
1049 return std::tuple_cat(std::make_tuple(arg), createConstructorArguments<NodeT, ConstructorArgumentIndex + 1>());
1050}
1051
1052} // namespace detail
1053
1055template <typename NodeT>
1057{
1058 return detail::createConstructorArguments<NodeT, 0>();
1059}
1060
1061namespace detail
1062{
1063
1065template <class T, class Tuple, size_t... Is>
1066// TODO(dwplc): FP -- The other parameterSize() functions are defined in a namespace
1067// coverity[autosar_cpp14_a2_10_5_violation]
1068auto makeUniqueFromTuple(const Tuple&& tuple, std::index_sequence<Is...>) -> std::unique_ptr<T>
1069{
1070 return std::unique_ptr<T>(new T{std::get<Is>(std::move(tuple))...});
1071}
1072}
1073
1075template <typename NodeT, class ConstructorArguments>
1076auto makeUniqueFromTuple(const ConstructorArguments&& constructorArguments) -> std::unique_ptr<NodeT>
1077{
1078 return detail::makeUniqueFromTuple<NodeT>(
1079 std::move(constructorArguments),
1080 std::make_index_sequence<std::tuple_size<std::decay_t<ConstructorArguments>>::value>{});
1081}
1082
1091template <typename NodeT>
1092auto create(const ParameterProvider& provider) -> std::unique_ptr<NodeT>
1093{
1094 auto constructorArguments = createConstructorArguments<NodeT>();
1095 populateParameters<NodeT>(constructorArguments, provider);
1096 return makeUniqueFromTuple<NodeT>(std::move(constructorArguments));
1097}
1098
1099// Number of parameters (sum across all constructor arguments)
1100namespace detail
1101{
1102
1104template <
1105 typename NodeT, size_t ConstructorArgumentIndex,
1106 typename std::enable_if_t<ConstructorArgumentIndex == parameterConstructorArgumentSize<NodeT>(), void>* = nullptr>
1107// TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
1108// coverity[autosar_cpp14_a2_10_5_violation]
1109constexpr std::size_t parameterSize()
1110{
1111 return 0;
1112}
1113
1115template <
1116 typename NodeT, size_t ConstructorArgumentIndex,
1117 typename std::enable_if_t<ConstructorArgumentIndex<parameterConstructorArgumentSize<NodeT>(), void>* = nullptr>
1118 // TODO(dwplc): FP -- The specific specialization of this templated function is selected by enable_if
1119 // coverity[autosar_cpp14_a2_10_5_violation]
1120 constexpr std::size_t parameterSize()
1121{
1122 return constructorArgumentParameterSize<NodeT, ConstructorArgumentIndex>() + parameterSize<NodeT, ConstructorArgumentIndex + 1>();
1123}
1124
1125} // namespace detail
1126
1128// TODO(dwplc): FP -- The other parameterSize() functions are defined in a namespace
1129// coverity[autosar_cpp14_a2_10_5_violation]
1130template <typename NodeT>
1131constexpr std::size_t parameterSize()
1132{
1133 return detail::parameterSize<NodeT, 0>();
1134}
1135
1136} // namespace framework
1137} // namespace dw
1138
1139#endif // DW_FRAMEWORK_PARAMETERDESCRIPTOR_HPP_
The interface to access parameter values identified by name and/or (semantic) type.
constexpr auto describeArrayParameterWithDefault(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, std::array< T, ArraySize > defaultValue, const MemberPointers &&... memberPointers)
constexpr auto describeAbstractParameter(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName)
static constexpr size_t PARAMETER_SEMANTIC_TYPE
auto makeUniqueFromTuple(const ConstructorArguments &&constructorArguments) -> std::unique_ptr< NodeT >
Instantiate a node using the passed constructor arguments.
static constexpr size_t PARAMETER_DEFAULT_VALUE
constexpr std::tuple describeConstructorArguments()
constexpr auto describeUnnamedArrayParameter(dw::core::StringView const &&typeName, size_t arraySize, const MemberPointers &&... memberPointers)
static constexpr size_t PARAMETER_MEMBER_PTRS
static constexpr size_t PARAMETER_NAME
constexpr auto describeUnnamedParameter(dw::core::StringView const &&typeName, const MemberPointers &&... memberPointers)
static constexpr size_t PARAMETER_CONSTRUCTOR_ARGUMENT_DESCRIPTOR
constexpr auto describeIndexParameter(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, const MemberPointers &&... memberPointers)
auto createConstructorArguments()
Create a tuple of constructor argument needed by the constructor of the passed node.
static constexpr size_t PARAMETER_ARRAY_SIZE
constexpr auto describeParameter(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, const MemberPointers &&... memberPointers)
constexpr auto describeAbstractArrayParameter(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, size_t arraySize)
void populateParameters(ConstructorArguments &constructorArguments, const ParameterProvider &provider)
Populate the constructor arguments using values from the parameter provider.
constexpr auto describeParameters()
Get described parameters for the passed node.
static constexpr size_t PARAMETER_IS_INDEX
constexpr auto describeConstructorArgument(const Args &&... args)
constexpr std::size_t parameterSize()
Get the number of parameters for a given node.
constexpr auto describeArrayParameter(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, size_t arraySize, const MemberPointers &&... memberPointers)
constexpr auto describeParameterWithDefault(dw::core::StringView const &&typeName, dw::core::StringView const &&parameterName, T defaultValue, const MemberPointers &&... memberPointers)
auto create(const ParameterProvider &provider) -> std::unique_ptr< NodeT >
static constexpr size_t PARAMETER_TYPE
static constexpr size_t PARAMETER_TYPE_NAME
static constexpr size_t PARAMETER_CONSTRUCTOR_ARGUMENT_TYPE
Definition: Exception.hpp:47