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