COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgDispatcherOptionsParser.h
1//
2// Copyright 2019 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
10#include "comms/options.h"
11
12namespace comms
13{
14
15namespace details
16{
17
18template <typename... TOptions>
19class MsgDispatcherOptionsParser;
20
21template <>
22class MsgDispatcherOptionsParser<>
23{
24public:
25 static const bool HasForcedDispatch = false;
26 using ForcedDispatch = void;
27};
28
29template <typename T, typename... TOptions>
30class MsgDispatcherOptionsParser<comms::option::app::ForceDispatch<T>, TOptions...> :
31 public MsgDispatcherOptionsParser<TOptions...>
32{
33public:
34 static const bool HasForcedDispatch = true;
35 using ForcedDispatch = T;
36};
37
38template <typename... TOptions>
39class MsgDispatcherOptionsParser<
40 comms::option::app::EmptyOption,
41 TOptions...> : public MsgDispatcherOptionsParser<TOptions...>
42{
43};
44
45template <typename... TBundledOptions, typename... TOptions>
46class MsgDispatcherOptionsParser<
47 std::tuple<TBundledOptions...>,
48 TOptions...> : public MsgDispatcherOptionsParser<TBundledOptions..., TOptions...>
49{
50};
51
52} // namespace details
53
54} // namespace comms
Main namespace for all classes / functions of COMMS library.
STL namespace.
Contains definition of all the options used by the COMMS library.