12#include "comms/details/MessageInterfaceBases.h"
26template <
typename... TOptions>
27class MessageInterfaceOptionsParser;
30class MessageInterfaceOptionsParser<>
33 static constexpr bool HasEndian =
false;
34 static constexpr bool HasMsgIdType =
false;
35 static constexpr bool HasExtraTransportFields =
false;
36 static constexpr bool HasVersionInExtraTransportFields =
false;
37 static constexpr bool HasMsgIdInfo =
false;
38 static constexpr bool HasReadIterator =
false;
39 static constexpr bool HasWriteIterator =
false;
40 static constexpr bool HasValid =
false;
41 static constexpr bool HasLength =
false;
42 static constexpr bool HasHandler =
false;
43 static constexpr bool HasRefresh =
false;
44 static constexpr bool HasName =
false;
45 static constexpr bool HasNoVirtualDestructor =
false;
49 template <
typename TBase = MessageInterfaceEmptyBase>
50 using BuildEndian = TBase;
52 template <
typename TBase>
53 using BuildMsgIdType = TBase;
55 template <
typename TBase>
56 using BuildExtraTransportFields = TBase;
58 template <
typename TBase>
59 using BuildVersionInExtraTransportFields = TBase;
61 template <
typename TBase>
62 using BuildMsgIdInfo = TBase;
64 template <
typename TBase>
65 using BuildReadBase = TBase;
67 template <
typename TBase>
68 using BuildWriteBase = TBase;
70 template <
typename TBase>
71 using BuildValid = TBase;
73 template <
typename TBase>
74 using BuildLength = TBase;
76 template <
typename TBase>
77 using BuildHandler = TBase;
79 template <
typename TBase>
80 using BuildRefresh = TBase;
82 template <
typename TBase>
83 using BuildName = TBase;
86template <
typename T,
typename... TOptions>
87class MessageInterfaceOptionsParser<
88 comms::option::def::MsgIdType<T>,
89 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
93 static constexpr bool HasMsgIdType =
true;
95 template <
typename TBase>
96 using BuildMsgIdType = MessageInterfaceIdTypeBase<TBase, MsgIdType>;
99template <
typename... TOptions>
100class MessageInterfaceOptionsParser<
101 comms::option::app::IdInfoInterface,
102 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
105 static constexpr bool HasMsgIdInfo =
true;
107 template <
typename TBase>
108 using BuildMsgIdInfo = MessageInterfaceIdInfoBase<TBase>;
111template <
typename TEndian,
typename... TOptions>
112class MessageInterfaceOptionsParser<
113 comms::option::def::Endian<TEndian>,
114 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
117 static constexpr bool HasEndian =
true;
120 template <
typename TBase = MessageInterfaceEmptyBase>
121 using BuildEndian = MessageInterfaceEndianBase<Endian>;
124template <
typename TIter,
typename... TOptions>
125class MessageInterfaceOptionsParser<
126 comms::option::app::ReadIterator<TIter>,
127 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
130 static constexpr bool HasReadIterator =
true;
133 template <
typename TBase>
134 using BuildReadBase = MessageInterfaceReadBase<TBase, ReadIterator>;
137template <
typename TIter,
typename... TOptions>
138class MessageInterfaceOptionsParser<
139 comms::option::app::WriteIterator<TIter>,
140 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
143 static constexpr bool HasWriteIterator =
true;
146 template <
typename TBase>
147 using BuildWriteBase = MessageInterfaceWriteBase<TBase, WriteIterator>;
150template <
typename T,
typename... TOptions>
151class MessageInterfaceOptionsParser<
152 comms::option::app::Handler<T>,
153 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
156 static constexpr bool HasHandler =
true;
159 template <
typename TBase>
160 using BuildHandler = MessageInterfaceHandlerBase<TBase, Handler>;
163template <
typename... TOptions>
164class MessageInterfaceOptionsParser<
165 comms::option::app::ValidCheckInterface,
166 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
169 static constexpr bool HasValid =
true;
171 template <
typename TBase>
172 using BuildValid = MessageInterfaceValidBase<TBase>;
175template <
typename... TOptions>
176class MessageInterfaceOptionsParser<
177 comms::option::app::LengthInfoInterface,
178 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
181 static constexpr bool HasLength =
true;
183 template <
typename TBase>
184 using BuildLength = MessageInterfaceLengthBase<TBase>;
187template <
typename... TOptions>
188class MessageInterfaceOptionsParser<
189 comms::option::app::RefreshInterface,
190 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
193 static constexpr bool HasRefresh =
true;
195 template <
typename TBase>
196 using BuildRefresh = MessageInterfaceRefreshBase<TBase>;
199template <
typename... TOptions>
200class MessageInterfaceOptionsParser<
201 comms::option::app::NameInterface,
202 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
205 static constexpr bool HasName =
true;
207 template <
typename TBase>
208 using BuildName = MessageInterfaceNameBase<TBase>;
211template <
typename... TOptions>
212class MessageInterfaceOptionsParser<
213 comms::option::app::NoVirtualDestructor,
214 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
217 static constexpr bool HasNoVirtualDestructor =
true;
220template <
typename TFields,
typename... TOptions>
221class MessageInterfaceOptionsParser<
222 comms::option::def::ExtraTransportFields<TFields>,
223 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
225 static_assert(comms::util::isTuple<TFields>(),
226 "Template parameter to comms::option::def::ExtraTransportFields is expected to "
229 static constexpr bool HasExtraTransportFields =
true;
232 template <
typename TBase>
233 using BuildExtraTransportFields = MessageInterfaceExtraTransportFieldsBase<TBase, ExtraTransportFields>;
236template <std::size_t TIdx,
typename... TOptions>
237class MessageInterfaceOptionsParser<
238 comms::option::def::VersionInExtraTransportFields<TIdx>,
239 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
242 static constexpr bool HasVersionInExtraTransportFields =
true;
245 template <
typename TBase>
246 using BuildVersionInExtraTransportFields =
247 MessageInterfaceVersionInExtraTransportFieldsBase<TBase, VersionInExtraTransportFields>;
250template <
typename... TOptions>
251class MessageInterfaceOptionsParser<
252 comms::option::app::EmptyOption,
253 TOptions...> :
public MessageInterfaceOptionsParser<TOptions...>
257template <
typename... TBundledOptions,
typename... TOptions>
258class MessageInterfaceOptionsParser<
259 std::tuple<TBundledOptions...>,
260 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:1917
comms::option::app::WriteIterator< TIter > WriteIterator
Same as comms::option::app::WriteIterator.
Definition options.h:1983
comms::option::app::Handler< T > Handler
Same as comms::option::app::Handler.
Definition options.h:2008
comms::option::app::ReadIterator< TIter > ReadIterator
Same as comms::option::app::ReadIterator.
Definition options.h:1978
comms::option::def::ExtraTransportFields< TFields > ExtraTransportFields
Same as comms::option::def::ExtraTransportFields.
Definition options.h:1510
comms::option::def::VersionInExtraTransportFields< TIdx > VersionInExtraTransportFields
Same as comms::option::def::VersionInExtraTransportFields.
Definition options.h:1515
comms::option::def::Endian< TEndian > Endian
Same as comms::option::def::Endian.
Definition options.h:1473
comms::option::def::MsgIdType< T > MsgIdType
Same as comms::option::def::MsgIdType.
Definition options.h:1486
Main namespace for all classes / functions of COMMS library.
Contains definition of all the options used by the COMMS library.