COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
FrameLayerBaseOptionsParser.h
1//
2// Copyright 2017 - 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 frame
16{
17
18namespace details
19{
20
21template <typename... TOptions>
22class FrameLayerBaseOptionsParser;
23
24template <>
25class FrameLayerBaseOptionsParser<>
26{
27public:
28 static constexpr bool HasForceReadUntilDataSplit = false;
29 static constexpr bool HasDisallowReadUntilDataSplit = false;
30};
31
32template <typename... TOptions>
33class FrameLayerBaseOptionsParser<
34 comms::option::def::FrameLayerForceReadUntilDataSplit, TOptions...> :
35 public FrameLayerBaseOptionsParser<TOptions...>
36{
37public:
38 static constexpr bool HasForceReadUntilDataSplit = true;
39};
40
41template <typename... TOptions>
42class FrameLayerBaseOptionsParser<
43 comms::option::def::FrameLayerDisallowReadUntilDataSplit, TOptions...> :
44 public FrameLayerBaseOptionsParser<TOptions...>
45{
46public:
47 static constexpr bool HasDisallowReadUntilDataSplit = true;
48};
49
50template <typename... TOptions>
51class FrameLayerBaseOptionsParser<
52 comms::option::app::EmptyOption,
53 TOptions...> : public FrameLayerBaseOptionsParser<TOptions...>
54{
55};
56
57template <typename... TBundledOptions, typename... TOptions>
58class FrameLayerBaseOptionsParser<
59 std::tuple<TBundledOptions...>,
60 TOptions...> : public FrameLayerBaseOptionsParser<TBundledOptions..., TOptions...>
61{
62};
63
64} // namespace details
65
66} // namespace frame
67
68} // namespace comms
Main namespace for all classes / functions of COMMS library.
STL namespace.
Contains definition of all the options used by the COMMS library.