10#include "comms/details/MessageInterfaceOptionsParser.h"
18template <
typename... TOptions>
19class MessageInterfaceBuilder
21 using ParsedOptions = MessageInterfaceOptionsParser<TOptions...>;
23 static_assert((!ParsedOptions::HasVersionInExtraTransportFields) || ParsedOptions::HasExtraTransportFields,
24 "comms::option::def::VersionInExtraTransportFields option should not be used "
25 "without comms::option::def::ExtraTransportFields.");
27 static constexpr bool MustHaveVirtualDestructor =
28 (!ParsedOptions::HasNoVirtualDestructor) &&
30 ParsedOptions::HasReadIterator ||
31 ParsedOptions::HasWriteIterator ||
32 ParsedOptions::HasMsgIdInfo ||
33 ParsedOptions::HasHandler ||
34 ParsedOptions::HasValid ||
35 ParsedOptions::HasLength ||
36 ParsedOptions::HasRefresh ||
37 ParsedOptions::HasName
40 using EndianBase =
typename ParsedOptions::template BuildEndian<>;
43 typename ParsedOptions::template BuildMsgIdType<EndianBase>;
45 using TransportFieldsBase =
46 typename ParsedOptions::template BuildExtraTransportFields<IdTypeBase>;
48 using VersionInTransportFieldsBase =
49 typename ParsedOptions::template BuildVersionInExtraTransportFields<TransportFieldsBase>;
52 typename ParsedOptions::template BuildMsgIdInfo<VersionInTransportFieldsBase>;
55 typename ParsedOptions::template BuildReadBase<IdInfoBase>;
58 typename ParsedOptions::template BuildWriteBase<ReadBase>;
61 typename ParsedOptions::template BuildValid<WriteBase>;
64 typename ParsedOptions::template BuildLength<ValidBase>;
67 typename ParsedOptions::template BuildHandler<LengthBase>;
70 typename ParsedOptions::template BuildRefresh<HandlerBase>;
73 typename ParsedOptions::template BuildName<RefreshBase>;
75 using VirtDestructorBase =
76 typename comms::util::LazyShallowDeepConditional<
77 MustHaveVirtualDestructor
79 MessageInterfaceVirtDestructorBase,
80 comms::util::TypeDeepWrap,
84 using Options = ParsedOptions;
85 using Type = VirtDestructorBase;
88template <
typename... TOptions>
89using MessageInterfaceBuilderT =
90 typename MessageInterfaceBuilder<TOptions...>::Type;
Main namespace for all classes / functions of COMMS library.