COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgDispatcherOptionsParser.h
1//
2// Copyright 2019 - 2024 (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
38
39template <typename... TOptions>
40class MsgDispatcherOptionsParser<
41 comms::option::app::EmptyOption,
42 TOptions...> : public MsgDispatcherOptionsParser<TOptions...>
43{
44};
45
46template <typename... TBundledOptions, typename... TOptions>
47class MsgDispatcherOptionsParser<
48 std::tuple<TBundledOptions...>,
49 TOptions...> : public MsgDispatcherOptionsParser<TBundledOptions..., TOptions...>
50{
51};
52
53} // namespace details
54
55} // namespace comms
Main namespace for all classes / functions of COMMS library.
STL namespace.
Contains definition of all the options used by the COMMS library.