16#include "MessageInterfaceBases.h"
24template <
typename... TOptions>
25class MessageInterfaceOptionsParser;
28class MessageInterfaceOptionsParser<>
31 static constexpr bool HasEndian =
false;
32 static constexpr bool HasMsgIdType =
false;
33 static constexpr bool HasExtraTransportFields =
false;
34 static constexpr bool HasVersionInExtraTransportFields =
false;
35 static constexpr bool HasMsgIdInfo =
false;
36 static constexpr bool HasReadIterator =
false;
37 static constexpr bool HasWriteIterator =
false;
38 static constexpr bool HasValid =
false;
39 static constexpr bool HasLength =
false;
40 static constexpr bool HasHandler =
false;
41 static constexpr bool HasRefresh =
false;
42 static constexpr bool HasName =
false;
43 static constexpr bool HasNoVirtualDestructor =
false;
47 template <
typename TBase = MessageInterfaceEmptyBase>
48 using BuildEndian = TBase;
50 template <
typename TBase>
51 using BuildMsgIdType = TBase;
53 template <
typename TBase>
54 using BuildExtraTransportFields = TBase;
56 template <
typename TBase>
57 using BuildVersionInExtraTransportFields = TBase;
59 template <
typename TBase>
60 using BuildMsgIdInfo = TBase;
62 template <
typename TBase>
63 using BuildReadBase = TBase;
65 template <
typename TBase>
66 using BuildWriteBase = TBase;
68 template <
typename TBase>
69 using BuildValid = TBase;
71 template <
typename TBase>
72 using BuildLength = TBase;
74 template <
typename TBase>
75 using BuildHandler = TBase;
77 template <
typename TBase>
78 using BuildRefresh = TBase;
80 template <
typename TBase>
81 using BuildName = TBase;
84template <
typename T,
typename... TOptions>
85class MessageInterfaceOptionsParser<
86 comms::option::def::MsgIdType<T>,
87 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
91 static constexpr bool HasMsgIdType =
true;
93 template <
typename TBase>
94 using BuildMsgIdType = MessageInterfaceIdTypeBase<TBase, MsgIdType>;
97template <
typename... TOptions>
98class MessageInterfaceOptionsParser<
99 comms::option::app::IdInfoInterface,
100 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
103 static constexpr bool HasMsgIdInfo =
true;
105 template <
typename TBase>
106 using BuildMsgIdInfo = MessageInterfaceIdInfoBase<TBase>;
109template <
typename TEndian,
typename... TOptions>
110class MessageInterfaceOptionsParser<
111 comms::option::def::Endian<TEndian>,
112 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
115 static constexpr bool HasEndian =
true;
118 template <
typename TBase = MessageInterfaceEmptyBase>
119 using BuildEndian = MessageInterfaceEndianBase<Endian>;
122template <
typename TIter,
typename... TOptions>
123class MessageInterfaceOptionsParser<
124 comms::option::app::ReadIterator<TIter>,
125 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
128 static constexpr bool HasReadIterator =
true;
131 template <
typename TBase>
132 using BuildReadBase = MessageInterfaceReadBase<TBase, ReadIterator>;
135template <
typename TIter,
typename... TOptions>
136class MessageInterfaceOptionsParser<
137 comms::option::app::WriteIterator<TIter>,
138 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
141 static constexpr bool HasWriteIterator =
true;
144 template <
typename TBase>
145 using BuildWriteBase = MessageInterfaceWriteBase<TBase, WriteIterator>;
148template <
typename T,
typename... TOptions>
149class MessageInterfaceOptionsParser<
150 comms::option::app::Handler<T>,
151 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
154 static constexpr bool HasHandler =
true;
157 template <
typename TBase>
158 using BuildHandler = MessageInterfaceHandlerBase<TBase, Handler>;
161template <
typename... TOptions>
162class MessageInterfaceOptionsParser<
163 comms::option::app::ValidCheckInterface,
164 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
167 static constexpr bool HasValid =
true;
169 template <
typename TBase>
170 using BuildValid = MessageInterfaceValidBase<TBase>;
173template <
typename... TOptions>
174class MessageInterfaceOptionsParser<
175 comms::option::app::LengthInfoInterface,
176 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
179 static constexpr bool HasLength =
true;
181 template <
typename TBase>
182 using BuildLength = MessageInterfaceLengthBase<TBase>;
185template <
typename... TOptions>
186class MessageInterfaceOptionsParser<
187 comms::option::app::RefreshInterface,
188 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
191 static constexpr bool HasRefresh =
true;
193 template <
typename TBase>
194 using BuildRefresh = MessageInterfaceRefreshBase<TBase>;
197template <
typename... TOptions>
198class MessageInterfaceOptionsParser<
199 comms::option::app::NameInterface,
200 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
203 static constexpr bool HasName =
true;
205 template <
typename TBase>
206 using BuildName = MessageInterfaceNameBase<TBase>;
209template <
typename... TOptions>
210class MessageInterfaceOptionsParser<
211 comms::option::app::NoVirtualDestructor,
212 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
215 static constexpr bool HasNoVirtualDestructor =
true;
218template <
typename TFields,
typename... TOptions>
219class MessageInterfaceOptionsParser<
220 comms::option::def::ExtraTransportFields<TFields>,
221 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
223 static_assert(comms::util::isTuple<TFields>(),
224 "Template parameter to comms::option::def::ExtraTransportFields is expected to "
227 static constexpr bool HasExtraTransportFields =
true;
230 template <
typename TBase>
231 using BuildExtraTransportFields = MessageInterfaceExtraTransportFieldsBase<TBase, ExtraTransportFields>;
234template <std::size_t TIdx,
typename... TOptions>
235class MessageInterfaceOptionsParser<
236 comms::option::def::VersionInExtraTransportFields<TIdx>,
237 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
240 static constexpr bool HasVersionInExtraTransportFields =
true;
243 template <
typename TBase>
244 using BuildVersionInExtraTransportFields =
245 MessageInterfaceVersionInExtraTransportFieldsBase<TBase, VersionInExtraTransportFields>;
248template <
typename... TOptions>
249class MessageInterfaceOptionsParser<
250 comms::option::app::EmptyOption,
251 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
255template <
typename... TBundledOptions,
typename... TOptions>
256class MessageInterfaceOptionsParser<
257 std::tuple<TBundledOptions...>,
258 TOptions...> :
public MessageInterfaceOptionsParser<TBundledOptions..., TOptions...>
Contains various tuple type manipulation classes and functions.
comms::option::def::HasName HasName
Same as comms::option::def::HasName.
Definition options.h:1786
comms::option::app::WriteIterator< TIter > WriteIterator
Same as comms::option::app::WriteIterator.
Definition options.h:1839
comms::option::app::Handler< T > Handler
Same as comms::option::app::Handler.
Definition options.h:1858
comms::option::app::ReadIterator< TIter > ReadIterator
Same as comms::option::app::ReadIterator.
Definition options.h:1835
comms::option::def::ExtraTransportFields< TFields > ExtraTransportFields
Same as comms::option::def::ExtraTransportFields.
Definition options.h:1467
comms::option::def::VersionInExtraTransportFields< TIdx > VersionInExtraTransportFields
Same as comms::option::def::VersionInExtraTransportFields.
Definition options.h:1471
comms::option::def::Endian< TEndian > Endian
Same as comms::option::def::Endian.
Definition options.h:1438
comms::option::def::MsgIdType< T > MsgIdType
Same as comms::option::def::MsgIdType.
Definition options.h:1448
Main namespace for all classes / functions of COMMS library.
Contains definition of all the options used by the COMMS library.